From: Jerry Sievers <gsievers19@comcast.net>
To: Christophe Pettus <xof@thebuild.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Advancing the archiver position safely
Date: Thu, 06 Aug 2020 20:45:55 -0500
Message-ID: <87ft8zfcto.fsf@jsievers.enova.com> (raw)
In-Reply-To: <520661CC-7D55-4E6C-9474-35FA7974F8D0@thebuild.com>
References: <520661CC-7D55-4E6C-9474-35FA7974F8D0@thebuild.com>
Christophe Pettus <xof@thebuild.com> writes:
> I've encountered a rather unusual situation (PostgreSQL 9.6). On a
> particular server, for reasons I've not fully diagnosed, the archiver
> thinks that the current WAL segment to be archived is
> 0000000200003B6800000062. This is unfortunate, because the oldest WAL
> segment that actually exists on disk is 0000000200003F1100000004, so
> the archive script is failing repeatedly because of the missing
> segment.
>
> The system is not actually missing important (for recovery) WAL segments, at least:
>
> Latest checkpoint's REDO WAL file: 000000020000417600000029
>
> I'd like to "catch up" the archiver such that it is operating on files
> that actually exist; besides setting archive_command to '/bin/true'
> and letting it chew through the old ones, is there a way of safely
> advancing the position of the archiver?
Take a look at the contents of your pg_xlog/archive_status directory
where you will likely find a .ready file corresponding to the missing
segment and perhaps others.
Deleting the .ready file should allow the archiver to get past the
missing file.
Make certain you're *not* mucking with the WAL files themselves.
> --
> -- Christophe Pettus
> xof@thebuild.com
>
>
>
>
--
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consulting@comcast.net
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: gsievers19@comcast.net, xof@thebuild.com
Subject: Re: Advancing the archiver position safely
In-Reply-To: <87ft8zfcto.fsf@jsievers.enova.com>
References: <520661CC-7D55-4E6C-9474-35FA7974F8D0@thebuild.com> <87ft8zfcto.fsf@jsievers.enova.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