Re: Something is wrong with wal_compression
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>,
Andrey Borodin <amborodin86@gmail.com>,
Justin Pryzby <pryzby@telsasoft.com>,
pgsql-hackers@lists.postgresql.org
Date: 2023-01-27T02:04:04Z
Lists: pgsql-hackers
Thomas Munro <thomas.munro@gmail.com> writes: > On Fri, Jan 27, 2023 at 1:30 PM Michael Paquier <michael@paquier.xyz> wrote: >> My opinion would be to make this function more reliable, FWIW, even if >> that involves a performance impact when called in a close loop by >> forcing more WAL flushes to ensure its report durability and >> consistency. > Yeah, the other thread has a patch for that. But it would hurt some > workloads. I think we need to get the thing correct first and worry about performance later. What's wrong with simply making pg_xact_status write and flush a record of the XID's existence before returning it? Yeah, it will cost you if you use that function, but not if you don't. > A better patch would do some kind of amortisation > (reserving N xids at a time or some such scheme, while being careful > to make sure the right CLOG pages etc exist if you crash and skip a > bunch of xids on recovery) but be more complicated. Maybe that would be appropriate for HEAD, but I'd be wary of adding anything complicated to the back branches. This is clearly a very under-tested area. regards, tom lane
Commits
-
Remove recovery test 011_crash_recovery.pl
- 403d82dd54b5 11.19 landed
- e8fb2a721b36 12.14 landed
- ee11824ac4c2 13.10 landed
- 96d42bd27fef 14.7 landed
- c5b2975ec183 15.2 landed
- 8c1cd726c5d9 16.0 landed
-
Add a txid_status function.
- 857ee8e391ff 10.0 cited