Re: is pg_log_standby_snapshot() really needed?

Поиск
Список
Период
Сортировка
От Drouvot, Bertrand
Тема Re: is pg_log_standby_snapshot() really needed?
Дата
Msg-id 6ad6638f-1eb1-380b-c5e1-4e0472e8bf60@gmail.com
обсуждение исходный текст
Ответ на is pg_log_standby_snapshot() really needed?  (Jaime Casanova <jcasanov@systemguards.com.ec>)
Ответы Re: is pg_log_standby_snapshot() really needed?  (Jaime Casanova <jcasanov@systemguards.com.ec>)
Список pgsql-hackers
Hi,

On 6/7/23 7:32 AM, Jaime Casanova wrote:
> Hi,
> 
> I'm testing the ability to have a logical replica subscribed from a standby.
> 
> Of course, I'm doing this in a laboratory with no activity so
> everything get stuck after creating the subscription (the main slot).
> This is clearly because every time it will create a temp slot for copy
> a table it needs the running xacts from the primary.
> 
> Now, I was solving this by executing CHECKPOINT on the primary, and
> also noted that pg_switch_wal() works too. After that, I read about
> pg_log_standby_snapshot().
> 
> So, I wonder if that function is really needed because as I said I
> solved it with already existing functionality. Or if it is really
> needed maybe it is a bug that a CHECKPOINT and pg_switch_wal() have
> the same effect?
> 

Even if CHECKPOINT and pg_switch_wal() do produce the same effect, I think
they are expensive (as compare to pg_log_standby_snapshot() which does nothing but
emit a xl_running_xacts).

For this reason, I think pg_log_standby_snapshot() is worth to have/keep.

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com



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

Предыдущее
От: Alexander Pyhalov
Дата:
Сообщение: Re: Partial aggregates pushdown
Следующее
От: Nishant Sharma
Дата:
Сообщение: Re: postgres_fdw: wrong results with self join + enable_nestloop off