Re: pg_walinspect - a new extension to get raw WAL data and WAL stats
Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
From: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: "Bossart, Nathan" <bossartn@amazon.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, "satyanarlapuram@gmail.com" <satyanarlapuram@gmail.com>,
"marvin_liang@qq.com" <marvin_liang@qq.com>, "actyzhang@outlook.com" <actyzhang@outlook.com>,
Ashutosh Sharma <ashu.coek88@gmail.com>
Date: 2021-09-10T14:29:48Z
Lists: pgsql-hackers
On Fri, Sep 10, 2021 at 7:21 AM Michael Paquier <michael@paquier.xyz> wrote: > > On Thu, Sep 09, 2021 at 10:49:46PM +0000, Bossart, Nathan wrote: > > +1 > > A backend approach has the advantage that you can use the proper locks > to make sure that a segment is not recycled or removed by a concurrent > checkpoint, so that would be reliable. Thanks for sharing your thoughts. IMO, using locks for showing WAL stats isn't a good way, because these new functions may block the checkpointer from removing/recycling the WAL files. We don't want to do that. If at all, user has asked stats of an LSN/range of LSNs if it is/they are available in the pg_wal directory, we provide the info otherwise we can throw warnings/errors. This behaviour is pretty much in sycn with what pg_waldump does right now. And, some users may not need these new functions at all, so in such cases going with an extension way makes it more usable. Regards, Bharath Rupireddy.
Commits
-
Doc build fix: remove tab from filelist.sgml.
- 8638c76cc9f4 15.0 landed
-
Add contrib/pg_walinspect.
- 2258e76f90bf 15.0 landed
-
Simplify SRFs using materialize mode in contrib/ modules
- 5b81703787bf 15.0 cited
-
Invent "trusted" extensions, and remove the pg_pltemplate catalog.
- 50fc694e4374 13.0 cited