Re: Combine pg_walinspect till_end_of_wal functions with others
Matthias van de Meent <boekewurm+postgres@gmail.com>
From: Matthias van de Meent <boekewurm+postgres@gmail.com>
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: Julien Rouhaud <rjuju123@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Michael Paquier <michael@paquier.xyz>
Date: 2023-03-06T15:21:47Z
Lists: pgsql-hackers
On Mon, 6 Mar 2023 at 16:06, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> wrote: > If we try to make these functions figure out the oldest WAl file and > start from there, then it'll unnecessarily complicate the APIs and > functions. If we still think we need a better function for the users > to figure out the oldest WAL file, perhaps, add a SQL-only > view/function to pg_walinspect that returns "select name from > pg_ls_waldir() order by name limit 1;", but honestly, that's so > trivial. That "order by name limit 1" has subtle bugs when you're working on a system that has experienced timeline switches. It is entirely possible that the first file (as sorted by the default collation) is not the first record you can inspect, or even in your timeline's history. Kind regards, Matthias van de Meent
Commits
-
Improve a bit the tests of pg_walinspect
- 4f1882b96059 16.0 landed
-
Tweak regression test of pg_walinspect to be less collation-sensitive
- e643a315fc58 16.0 landed
-
Rework design of functions in pg_walinspect
- 5c1b6628075a 16.0 landed
-
Refactor and improve tests of pg_walinspect
- 1f282c24e464 16.0 landed
-
doc: Fix description of pg_get_wal_stats_till_end_of_wal() in pg_walinspect
- 019f8624664d 16.0 cited