Re: is pg_log_standby_snapshot() really needed?

From: "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: is pg_log_standby_snapshot() really needed?
Date: 2023-06-08 05:12:17
Message-ID: 66adcb44-998a-c681-4dfc-3c1e70ea7271@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 6/7/23 8:50 PM, Jaime Casanova wrote:
> On Wed, Jun 7, 2023 at 5:19 AM Drouvot, Bertrand
> <bertranddrouvot(dot)pg(at)gmail(dot)com> wrote:
>>
>> Hi,
>>
>> On 6/7/23 7:32 AM, Jaime Casanova wrote:
>>>
>>> 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.
>>
>
> CHECKPOINT could be expensive in a busy system, but the problem
> pg_log_standby_snapshot() is solving is about a no-activity system,
> and in a no-activity system CHECKPOINT is very fast.

a no-activity system at the time the logical replication slot is being created.
Means at the time the system is "non active" it may be possible that the checkpoint
would still have a lot to do.

Regards,

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2023-06-08 05:23:33 Re: PG 16 draft release notes ready
Previous Message Amit Kapila 2023-06-08 05:05:54 Re: Support logical replication of DDLs