Re: Stopping writes in master

Поиск
Список
Период
Сортировка
От Debraj Manna
Тема Re: Stopping writes in master
Дата
Msg-id CAF6DVKOMGX41rV-P=1_o1j=18pq7buLXhK7jr5Y9pFoFc_6cxQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Stopping writes in master  (Shreeyansh Dba <shreeyansh2014@gmail.com>)
Ответы Re: Stopping writes in master  (Shreeyansh Dba <shreeyansh2014@gmail.com>)
Re: Stopping writes in master  (Rui DeSousa <rui.desousa@icloud.com>)
Список pgsql-admin
Thanks Shreeyansh.  

Can this be handled from the server side may be setting some config parameters and then restarting the master so that existing connections gets dropped and the new ones not able to write?

On Thu 14 Jun, 2018, 5:36 PM Shreeyansh Dba, <shreeyansh2014@gmail.com> wrote:
Hi Debraj Manna,

Yes,You can make  the database read only as well  just by setting the below parameter is equal to true at the session level.But you need reconnect your existing connections.



ALTER DATABASE YOUR_DATABASE_NAME  SET default_transaction_read_only = true;

Hope this helps..




On Thu, Jun 14, 2018 at 4:53 PM, Debraj Manna <subharaj.manna@gmail.com> wrote:
Yes I want to switch the database to read-only mode. The existing connections should also be not able to write.

On Thu 14 Jun, 2018, 4:37 PM Robert Zenz, <robert.zenz@sibvisions.com> wrote:
Can existing connections be dropped or do they need to stay established? Also,
are you trying to switch the database to a read-only mode for backup purposes or
something different?


On 14.06.2018 12:46, Debraj Manna wrote:
> Hi
>
> In a 3 node cluster with 1 master and 2 slaves with postgres 10.4 is there
> any  configuration setting that will stop all writes to the master from the
> client. But the clients can read data from master and other slaves ?
>
> Thanks,
>

В списке pgsql-admin по дате отправления:

Предыдущее
От: Shreeyansh Dba
Дата:
Сообщение: Re: Stopping writes in master
Следующее
От: Shreeyansh Dba
Дата:
Сообщение: Re: Stopping writes in master