pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Atul Kumar <akumar14871@gmail.com>
Cc: Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: strange behavior of WAL files
Date: Sat, 05 Jun 2021 15:44:46 -0400
Message-ID: <561515.1622922286@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+ONtZ7k=9sm4mBL3Gb5zRB88MZ6td58j9wj2RrCPZO-SXic6g@mail.gmail.com>
References: <CA+ONtZ74cL5Jw54JAWaZY087t4UMGnHXo8WGOZ-D7GK7-zTFbQ@mail.gmail.com>
	<20210604125656.47938b0c@firost>
	<CA+ONtZ77=jQvmumHOsyK9g-ppOV8bBeCzV0AMZk1CBfysCM56g@mail.gmail.com>
	<144409.1622815880@sss.pgh.pa.us>
	<CA+ONtZ7k=9sm4mBL3Gb5zRB88MZ6td58j9wj2RrCPZO-SXic6g@mail.gmail.com>

Atul Kumar <akumar14871@gmail.com> writes:
> Please check my findings below

> older
> -rw------- 1 enterprisedb enterprisedb 16777216 Jun  2 02:47
> 00000001000036CF000000A4
> -rw------- 1 enterprisedb enterprisedb 16777216 Jun  2 02:45
> 00000001000036CF000000A3
> -rw------- 1 enterprisedb enterprisedb 16777216 Jun  2 02:44
> 00000001000036CF000000A5

I suspect these files were archived awhile ago (with different
names) and have already been renamed in preparation for using
them as future WAL segments ...

> -rw------- 1 enterprisedb enterprisedb 16777216 Jun  4 08:23
> 00000001000036CF000000A3
> -rw------- 1 enterprisedb enterprisedb 16777216 Jun  4 08:23
> 00000001000036CF000000A4

... and here we see that they just got overwritten with new WAL data,
which would make their new contents eligible for archiving.

Have you made any attempt to correlate your observations with
the actual WAL write position?  (pg_controldata would give you
at least a rough approximation of that, i.e. the WAL write
position as of the most recent checkpoint.  I think you can
get a more up-to-date result from one or another system view,
but I don't remember which.)

			regards, tom lane





view thread (11+ messages)  latest in thread

Message-ID: <561515.1622922286@sss.pgh.pa.us>
Permalink:  ../561515.1622922286@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/561515.1622922286@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-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, akumar14871@gmail.com, jgdr@dalibo.com
  Subject: Re: strange behavior of WAL files
  In-Reply-To: <561515.1622922286@sss.pgh.pa.us>
  References: <CA+ONtZ74cL5Jw54JAWaZY087t4UMGnHXo8WGOZ-D7GK7-zTFbQ@mail.gmail.com> <20210604125656.47938b0c@firost> <CA+ONtZ77=jQvmumHOsyK9g-ppOV8bBeCzV0AMZk1CBfysCM56g@mail.gmail.com> <144409.1622815880@sss.pgh.pa.us> <CA+ONtZ7k=9sm4mBL3Gb5zRB88MZ6td58j9wj2RrCPZO-SXic6g@mail.gmail.com> <561515.1622922286@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