Re: Checksum errors in pg_stat_database - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Checksum errors in pg_stat_database
Date
Msg-id Y5aphKVucb6fVHaB@paquier.xyz
Whole thread Raw
In response to Re: Checksum errors in pg_stat_database  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Checksum errors in pg_stat_database  ("Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>)
List pgsql-hackers
On Sun, Dec 11, 2022 at 08:48:15PM -0500, Tom Lane wrote:
> I think a stats table indexed solely by relfilenode wouldn't be a great
> idea, because you'd lose all the stats about a table as soon as you
> do vacuum full/cluster/rewriting-alter-table/etc.  Can we create two
> index structures over the same stats table entries, so you can look
> up by either relfilenode or OID?  I'm not quite sure how to manage
> rewrites, where you transiently have two relfilenodes for "the
> same" table ... maybe we could allow multiple pointers to the same
> stats entry??

FWIW, I am not sure that I would care much if we were to dropped the
stats associated to a relfilenode on a rewrite.  In terms of checksum
failures, tuples are deformed so if there is one checksum failure a
rewrite would just not happen.  The potential complexity is not really
appealing compared to the implementation simplicity and its gains, and
rewrites are lock-heavy so I'd like to think that people avoid them
(cough)..
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Tree-walker callbacks vs -Wdeprecated-non-prototype
Next
From: David Rowley
Date:
Subject: Re: [PoC] Reducing planning time when tables have many partitions