Re: Dubious server log messages after pg_upgrade - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: Dubious server log messages after pg_upgrade
Date
Msg-id Z9I3XSM-uJbFSAF-@nathan
Whole thread Raw
In response to Dubious server log messages after pg_upgrade  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Mar 12, 2025 at 08:41:29PM -0400, Tom Lane wrote:
> The "corrupted statistics file" whine is most likely
> caused by pg_upgrade copying the old system's pgstat.stat file
> into the new installation --- is that a good idea?

I don't believe pg_upgrade copies that file to the new cluster.  At least,
that would be news to me.

> I have
> no idea what's causing the redo LSN complaint, but it seems
> like that might deserve closer investigation.

pgstat_read_statsfile() emits a warning before it jumps to the section that
emits the LOG.  The LSN complaint seems to just be providing some context
around what exactly is corrupted in pgstat.stat.  Commit b860848 seems
rather suspect.  I've added Michael here...

-- 
nathan



pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: pg_rewind with --write-recovery-conf option doesn't write dbname to primary_conninfo value.
Next
From: vignesh C
Date:
Subject: Re: Separate GUC for replication origins