Hi,
On 10/27/23 10:51 AM, shveta malik wrote:
> On Wed, Oct 25, 2023 at 3:15 PM Drouvot, Bertrand
> <bertranddrouvot.pg@gmail.com> wrote:
>
> I discussed this with my colleague Hou-San and we think that one
> possibility could be to somehow accelerate the increment of
> restart_lsn on primary. This can be achieved by connecting to the
> remote and executing pg_log_standby_snapshot() at reasonable intervals
> while waiting on standby during slot creation. This may increase speed
> to a reasonable extent w/o having to wait for the user or bgwriter to
> do the same for us. The current logical decoding uses a similar
> approach to speed up the slot creation. I refer to usage of
> LogStandbySnapshot in SnapBuildWaitSnapshot() and
> ReplicationSlotReserveWal()).
> Thoughts?
>
I think that's 2 distinct area.
My concern was more when there is no activity at all on a newly
created slot on the primary. The slot is created on the standby,
but then we loop until there is activity on this slot on the
primary.
That's the test case I described in [1]
[1]: https://www.postgresql.org/message-id/afe4ab6c-dde3-48ea-acd8-6f6052c7b8fd%40gmail.com
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com