From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: A question about possible recovery inconsistency
Date: Wed, 11 Oct 2023 12:07:32 -0500
Message-ID: <dcb6d46e-0389-db66-ba5e-0e4a3ab13498@gmail.com> (raw)
In-Reply-To: <CAHKPvkYg2rKBH70Oqj8O+uiSqWfZTOOvyLc_hE2KsY_awcd4MA@mail.gmail.com>
References: <CAHKPvkZLN4ow=oFbzUFdGLBNtRdfXwfm97sQYKkYHwL2dJ8d_Q@mail.gmail.com>
<386a5cbfb38a6cd0c5fd5ed7f0d08154c2cdb49b.camel@cybertec.at>
<CAHKPvkYg2rKBH70Oqj8O+uiSqWfZTOOvyLc_hE2KsY_awcd4MA@mail.gmail.com>
On 10/11/23 09:52, Eugen Konkov wrote:
>> But why do you want to do that, if all that you have to do is specify
> "recovery_target = 'immediate'" to recover to the end of the backup?
>
> Because automation scripts do not know if transactions are available
> after some point in time or not. But automation scripts know that
> backup was completed successfully at that point.
> For example:
> We want to provide time to recover the database.
> 1. Base backup restored, wal files are applied successfully if there
> is a transaction.
Doesn't "pg_basebackup --wal-method=stream" already do that?
Since the commands below automagically starts physical streaming, there must
be a variation where all the wal data is applied but /doesn't/ start
replication.
pg_basebackup --dbname=service=basebackup -D $PGDATA --progress
--checkpoint=fast -v \
--write-recovery-conf --wal-method=stream --create-slot
--slot=pgstandby1 --compress=server-zstd
pg_ctl start -w
Maybe just remove the two "slot" options:
pg_basebackup --dbname=service=basebackup -D $PGDATA --progress
--checkpoint=fast -v \
--write-recovery-conf --wal-method=stream --compress=server-zstd
--
Born in Arizona, moved to Babylonia.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: ronljohnsonjr@gmail.com
Subject: Re: A question about possible recovery inconsistency
In-Reply-To: <dcb6d46e-0389-db66-ba5e-0e4a3ab13498@gmail.com>
References: <CAHKPvkZLN4ow=oFbzUFdGLBNtRdfXwfm97sQYKkYHwL2dJ8d_Q@mail.gmail.com> <386a5cbfb38a6cd0c5fd5ed7f0d08154c2cdb49b.camel@cybertec.at> <CAHKPvkYg2rKBH70Oqj8O+uiSqWfZTOOvyLc_hE2KsY_awcd4MA@mail.gmail.com> <dcb6d46e-0389-db66-ba5e-0e4a3ab13498@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox