Re: log shipping with pg_receivewal - Mailing list pgsql-general

From Dilip Kumar
Subject Re: log shipping with pg_receivewal
Date
Msg-id CAFiTN-sfLT2XW45G4Ufwq-QzPxxE-eOx48MvS8eu6pUwgq0QdQ@mail.gmail.com
Whole thread Raw
In response to log shipping with pg_receivewal  (Marc Millas <marc.millas@mokadb.com>)
List pgsql-general
On Tue, Dec 14, 2021 at 9:55 AM Marc Millas <marc.millas@mokadb.com> wrote:
>
> Hi,
> postgres 13 question,
>
> if I setup pg_receivewal from a primary instance to a given directory, and then setup a standby with a
restore_commandpointing to that directory,, the changes on the primary are applied on the standby at each wal change.
Andthis, even if I run pg_receivewal with the --synchronous option. 
>
> My question: as the synchronous option is supposed to make pg_receivewal write transaction immediately in the wal
files,is there a way to ask the standby to apply them on the fly ie. without waiting a wal file change ? 

I don't think that can be done, actually, the wal_receiver process is
running in the same cluster so we can interact with that process and
know exactly up to what LSN it has flush and what wal data is valid to
be applied and wal receiver also continues to append more WAL to the
same file.  But  pg_receivewal is a separate utility so this can serve
as an archive location that means we can restore the complete WAL file
only.

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com



pgsql-general by date:

Previous
From: Michael Paquier
Date:
Subject: Re: log shipping with pg_receivewal
Next
From: "David G. Johnston"
Date:
Subject: Re: locks within select