Re: relfilenode statistics
Kirill Reshke <reshkekirill@gmail.com>
From: Kirill Reshke <reshkekirill@gmail.com>
To: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>,
Michael Paquier <michael@paquier.xyz>, pgsql-hackers@lists.postgresql.org
Date: 2025-03-13T09:00:52Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add more tests for relation statistics with rewrites
- b23fe993e136 19 (unreleased) landed
On Fri, 3 Jan 2025 at 21:18, Bertrand Drouvot <bertranddrouvot.pg@gmail.com> wrote: > As mentioned by Andres in [1], relying on the relation OID would not work to > "recover" the stats because we don't have access to the relation oid during crash > recovery. So, I'm going to resume working on the "initial" idea (i.e having the > stats keyed by relfilenode). > > [1]: https://www.postgresql.org/message-id/xvetwjsnkhx2gp6np225g2h64f4mfmg6oopkuaiivrpzd2futj%40pflk55su36ho > Hmm. While it is true that catalog lookups cannot be performed during crash recovery, is it really necessary to save and retrieve statistics after a crash? Given that statistics are permitted to be outdated and server crashes are anticipated to be infrequent, it looks loke losing a few analysis runs due to server crashes is acceptable. In any case, I am totally OK with the relfilenode-based method because it is generally less restricted (to other postgresql parts e.g. wal- replay ) and simpler. Also, this patch needs a rebase;) -- Best regards, Kirill Reshke