Re: Question on Hot Standby in PostgreSQL

Поиск
Список
Период
Сортировка
От Yaser Raja
Тема Re: Question on Hot Standby in PostgreSQL
Дата
Msg-id CALkbEVnROXHJixwHfvjd8y7d8MRhvoxoifTvgEfAwprKYMRqJA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Question on Hot Standby in PostgreSQL  (Albe Laurenz <laurenz.albe@wien.gv.at>)
Ответы Re: Question on Hot Standby in PostgreSQL
Список pgsql-admin
On Wed, Nov 25, 2015 at 3:43 AM, Albe Laurenz <laurenz.albe@wien.gv.at> wrote:
Alex Williams wrote:
> Concerning these two params below, when using hot_standby_feedback,  what would you set them if you
> had the situation where you had queries constantly running on the standby, some quick and some long,
> practically all day/night, everyday?
>
> max_standby_archive_delay (integer)
> max_standby_streaming_delay (integer)

> Should I still keep them as -1 (infinite)?

I'd say set them both to 0.

If you have hot_standby_feedback=on, the primary will not remove any rows still
needed on the standby, so there should never be a need to delay WAL application.

hot_standby_feedback will significantly reduce the conflicts but it will not totally eliminate them. For example if a new column is added to a table, any query using this table on slave will be cancelled to apply this change.

IF query cancellation is totally not acceptable then you will have to set these delays to -1.

 

The drawback is that you may get considerable bloat on the primary if many
DELETE/UPDATE operation are going on and queries on the standby take a long time.

Yours,
Laurenz Albe

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

Предыдущее
От: Yaser Raja
Дата:
Сообщение: Re: How to store the PSQL command result into an array or Python dictionary?
Следующее
От: Terry Schmitt
Дата:
Сообщение: Re: How to store the PSQL command result into an array or Python dictionary?