On Wed, Feb 2, 2022 at 9:05 PM Julien Rouhaud <rjuju123@gmail.com> wrote:
>
> Hi,
>
> On Wed, Feb 02, 2022 at 08:53:13PM +0530, Bharath Rupireddy wrote:
> >
> > Here are some improvements we can make to pg_receivewal that were
> > emanated after working with it in production environments:
> >
> > 1) As a user, I, sometimes, want my pg_receivewal to start streaming
> > from the LSN that I provide as an input i.e. startpos instead of it
> > calculating the stream start position 1) from its target directory or
> > 2) from its replication slot's restart_lsn or 3) after sending
> > IDENTIFY_SYSTEM on to the primary.
>
> This is already being discussed (at least part of) as of
> https://www.postgresql.org/message-id/flat/18708360.4lzOvYHigE%40aivenronan.
FYI that thread is closed, it committed the change (f61e1dd [1]) that
pg_receivewal can read from its replication slot restart lsn.
I know that providing the start pos as an option came up there [2],
but I wanted to start the discussion fresh as that thread got closed.
[1]
commit f61e1dd2cee6b1a1da75c2bb0ca3bc72f18748c1
Author: Michael Paquier <michael@paquier.xyz>
Date: Tue Oct 26 09:30:37 2021 +0900
Allow pg_receivewal to stream from a slot's restart LSN
Author: Ronan Dunklau
Reviewed-by: Kyotaro Horiguchi, Michael Paquier, Bharath Rupireddy
Discussion: https://postgr.es/m/18708360.4lzOvYHigE@aivenronan
[2] https://www.postgresql.org/message-id/20210902.144554.1303720268994714850.horikyota.ntt%40gmail.com
Regards,
Bharath Rupireddy.