public inbox for [email protected]
help / color / mirror / Atom feedFrom: Bossart, Nathan <[email protected]>
To: David Steele <[email protected]>
To: Andrew Dunstan <[email protected]>
To: Tom Lane <[email protected]>
Cc: Stephen Frost <[email protected]>
Cc: Laurenz Albe <[email protected]>
Cc: Michael Paquier <[email protected]>
Cc: Pg Hackers <[email protected]>
Cc: SATYANARAYANA NARLAPURAM <[email protected]>
Subject: Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file
Date: Fri, 7 Jan 2022 00:48:21 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CAHg+QDfiM+WU61tF6=nPZocMZvHDzCK47Kneyb0ZRULYzV5sKQ@mail.gmail.com>
<[email protected]>
<CAHg+QDekOasWArvmPeOqhyTUHR40DsDOWyt7OaKxpQ7eFYqysw@mail.gmail.com>
<YaB3Oj4GfPOZ/[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<CAOuzzgoYqzH+c_fzapjGFh6kiZjXDc0jPCQctbQjajn7a4vyxA@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
On 12/2/21, 1:34 PM, "Bossart, Nathan" <[email protected]> wrote:
> On 12/2/21, 9:50 AM, "David Steele" <[email protected]> wrote:
>> On 12/2/21 12:38, David Steele wrote:
>>> On 12/2/21 11:00, Andrew Dunstan wrote:
>>>>
>>>> Should we really be getting rid of
>>>> PostgreSQL::Test::Cluster::backup_fs_hot() ?
>>>
>>> Agreed, it would be better to update backup_fs_hot() to use exclusive
>>> mode and save out backup_label instead.
>>
>> Oops, of course I meant non-exclusive mode.
>
> +1. I'll fix that in the next revision.
I finally got around to looking into this, and I think I found why it
was done this way in 2018. backup_fs_hot() runs pg_start_backup(),
closes the session, copies the data, and then runs pg_stop_backup() in
a different session. This doesn't work with non-exclusive mode
because the backup will be aborted when the session that runs
pg_start_backup() is closed. pg_stop_backup() will fail with a
"backup is not in progress" error. Furthermore,
010_logical_decoding_timelines.pl seems to be the only test that uses
backup_fs_hot().
After a quick glance, I didn't see an easy way to hold a session open
while the test does other things. If there isn't one, modifying
backup_fs_hot() to work with non-exclusive mode might be more trouble
than it is worth.
Nathan
view thread (14+ messages) latest in thread
reply
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox