From: David Steele <david@pgmasters.net>
To: Zsolt Ero <zsolt.ero@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org, Michael Paquier <michael@paquier.xyz>
Subject: Re: could not link file in wal restore lines
Date: Mon, 25 Jul 2022 08:40:12 -0400
Message-ID: <4b392ab1-d4a5-5557-adf0-ae319e723da5@pgmasters.net> (raw)
In-Reply-To: <CAKw-smA-0yhaJJQxqjmYn+dMzLmWoCbwiS7P5jeKe5DjzvM2xA@mail.gmail.com>
References: <CAKw-smBhLOGtRJTC5c=qKTPz8gz5+WPoVAXrHB6mY-1U4_N7-w@mail.gmail.com>
<Yttsz99SeUpyFBD/@paquier.xyz>
<ed20d3de-2ef1-4019-3d0e-7e7348d315ba@pgmasters.net>
<CAKw-smCCyW_jx5a0JOr3eGAJ9X3Ki97_DvPQnCgDP8wesgbTpg@mail.gmail.com>
<1bbb2f44-fdf8-71ef-a8f7-24b3fadb3176@pgmasters.net>
<CAKw-smA-0yhaJJQxqjmYn+dMzLmWoCbwiS7P5jeKe5DjzvM2xA@mail.gmail.com>
On 7/23/22 12:53, Zsolt Ero wrote:
> On 23. Jul 2022 at 18:43:57, David Steele <david@pgmasters.net
> <mailto:david@pgmasters.net>> wrote:
>> On 7/23/22 12:39, Zsolt Ero wrote:
>>> > On 23. Jul 2022 at 15:20:32, David Steele <david@pgmasters.net
>>> <mailto:david@pgmasters.net>
>>> > <mailto:david@pgmasters.net <mailto:david@pgmasters.net>>> wrote:
>>> > Zsolt, can you add --log-level-console=info to your archive_command so
>>> > we can see what parameters are being passed to pgbackrest?
>>>
>>> archive_command = 'pgbackrest --stanza=app --log-level-console=info
>>> archive-push %p'
>>>
>>> on the destination server (where the restore happens). There are no
>>> changes in the log, only 3 lines appear once everything is done. I've
>>> attached the log. Do I need to change this command on the source server?
>>
>> Oops, sorry, I meant the restore_command on the server where you do the
>> restore.
>>
>> You'll need to edit this in postgresql.auto.conf after the pgbackrest
>> restore but before starting PostgreSQL.
>
> I did that, attached the new log.
From this log it looks like pgBackRest is writing to RECOVERYXLOG as I
expected.
The error happens relatively rarely (18) compared to the number of WAL
segments fetched (1029). pgBackRest does not write the files in
question, e.g.
LOG: could not link file "pg_wal/000000010000015B0000002C" to
"pg_wal/000000010000015B000000F4": File exists
And the pg_wal directory started empty.
I ran one our standard stress tests on 12.11 (recovering 1592 WAL
segments) and I did not see the "could not link file" message.
Your system seems to be doing recovery pretty quickly. I wonder if there
is a race condition in WAL recycling?
One thing you could try is to set wal_recycle = false.
Regards,
-David
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-bugs@postgresql.org
Cc: david@pgmasters.net, zsolt.ero@gmail.com, michael@paquier.xyz
Subject: Re: could not link file in wal restore lines
In-Reply-To: <4b392ab1-d4a5-5557-adf0-ae319e723da5@pgmasters.net>
References: <CAKw-smBhLOGtRJTC5c=qKTPz8gz5+WPoVAXrHB6mY-1U4_N7-w@mail.gmail.com> <Yttsz99SeUpyFBD/@paquier.xyz> <ed20d3de-2ef1-4019-3d0e-7e7348d315ba@pgmasters.net> <CAKw-smCCyW_jx5a0JOr3eGAJ9X3Ki97_DvPQnCgDP8wesgbTpg@mail.gmail.com> <1bbb2f44-fdf8-71ef-a8f7-24b3fadb3176@pgmasters.net> <CAKw-smA-0yhaJJQxqjmYn+dMzLmWoCbwiS7P5jeKe5DjzvM2xA@mail.gmail.com> <4b392ab1-d4a5-5557-adf0-ae319e723da5@pgmasters.net>
* 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