pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: last_archived_wal is not necessary the latest WAL file (was Re: pgsql: Add test case for an archive recovery corner case.)
Date: Tue, 15 Feb 2022 16:28:27 -0500
Message-ID: <3186114.1644960507@sss.pgh.pa.us> (raw)
In-Reply-To: <831b6ab9-45d6-7ab0-ea9c-6efd4383afb8@iki.fi>
References: <E1nJXkI-0004VV-C3@gemulon.postgresql.org>
	<2842251.1644849700@sss.pgh.pa.us>
	<8f15e602-337e-fbb2-4b2e-e83a01ef9088@iki.fi>
	<831b6ab9-45d6-7ab0-ea9c-6efd4383afb8@iki.fi>

Heikki Linnakangas <hlinnaka@iki.fi> writes:
> That was interesting: the order that WAL segments are archived when a 
> standby is promoted is not fully deterministic.

Oh, of course.

> I find it a bit surprising that pg_stat_archiver.last_archived_wal is 
> not necessarily the highest-numbered segment that was archived. I 
> propose that we mention that in the docs, as in the attached patch.

+1, but I think the description of that field in the pg-stat-archiver-view
table is also pretty misleading.  Maybe like

-      Name of the last WAL file successfully archived
+      Name of the WAL file most recently successfully archived

and similarly s/last/most recent/ for the other fields claiming
to be "last" something.

			regards, tom lane





view thread (6+ messages)  latest in thread

Message-ID: <3186114.1644960507@sss.pgh.pa.us>
Permalink:  ../3186114.1644960507@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3186114.1644960507@sss.pgh.pa.us

 · 

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 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-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, hlinnaka@iki.fi, pgsql-hackers@postgresql.org
  Subject: Re: last_archived_wal is not necessary the latest WAL file (was Re: pgsql: Add test case for an archive recovery corner case.)
  In-Reply-To: <3186114.1644960507@sss.pgh.pa.us>
  References: <E1nJXkI-0004VV-C3@gemulon.postgresql.org> <2842251.1644849700@sss.pgh.pa.us> <8f15e602-337e-fbb2-4b2e-e83a01ef9088@iki.fi> <831b6ab9-45d6-7ab0-ea9c-6efd4383afb8@iki.fi> <3186114.1644960507@sss.pgh.pa.us>

* 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