Re: IPC/MultixactCreation on the Standby server
Heikki Linnakangas <hlinnaka@iki.fi>
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Andrey Borodin <x4mmm@yandex-team.ru>
Cc: Álvaro Herrera <alvherre@kurilemu.de>, pgsql-hackers@lists.postgresql.org, Ivan Bykov <i.bykov@modernsys.ru>, Kirill Reshke <reshkekirill@gmail.com>
Date: 2025-12-01T12:40:01Z
Lists: pgsql-hackers
Attachments
- v15-master-0001-Set-next-multixid-s-offset-when-creating-.patch (text/x-patch) patch v15-0001
- v15-pg14-0001-Set-next-multixid-s-offset-when-creating-a-.patch (text/x-patch) patch v15-0001
- v15-pg15-0001-Set-next-multixid-s-offset-when-creating-a-.patch (text/x-patch) patch v15-0001
- v15-pg16-0001-Set-next-multixid-s-offset-when-creating-a-.patch (text/x-patch) patch v15-0001
- v15-pg17-0001-Set-next-multixid-s-offset-when-creating-a-.patch (text/x-patch) patch v15-0001
- v15-pg18-0001-Set-next-multixid-s-offset-when-creating-a-.patch (text/x-patch) patch v15-0001
On 30/11/2025 14:15, Andrey Borodin wrote:
> On 29 Nov 2025, at 00:51, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
>> I didn't understand why the 'kill9' and 'poll_start' stuff is
>> needed. We have plenty of tests that kill the server with regular
>> "$node->stop('immediate')", and restart the server normally. The
>> checkpoint in the middle of the tests seems unnecessary too. I
>> removed all that, and the test still seems to work. Was there a
>> particular reason for them?
>
> In current shutdown sequence test seems to be reproducing corruption
> without checkpointing. I recollect that in July standby deadlock was
> reachable without checkpoint, but corruption was not. But now it
> seems test is working.
Ok.
>> I moved the wraparound test to a separate test file and commit.
>> More test coverage is good, but it's quite separate from the
>> bugfix and the wraparound related test shares very little with the
>> other test. The wraparound test needs a little more cleanup: use
>> plain perl instead of 'dd' and 'rm' for the file operations, for
>> example. (I did that with the tests in the 64-bit mxoff patches,
>> so we could copy from there.)
>
> PFA test version without dd and rm.
Thanks! I will focus on the main patch and TAP test now, but will commit
the wraparound test separately afterwards. At quick glance, it looks
good now.
> Did I get your right, that we do not backport wraparound test,
> backport fixes for 001_multixact.pl test down to 17 where it
> appeared?
Yes, that's my plan. Except that 001_multixact.pl appeared in v18, not v17.
> First two patches are v13 intact, second pair is my suggestions.
Thanks, here's a new set of patches, now with backpatched versions for
all the branches. As you said, there were a number of differences
between branches:
- On master, don't include the compatibility hacks for reading WAL
generated with older minor versions. Because WAL is not compatible
across major versions anyway.
- REL_18_STABLE didn't have the SimpleLruZeroAndWritePage() function
(introduced in commit c616785516).
- REL_17_STABLE didn't have the 001_multixact.pl TAP test. So I didn't
backport the new TAP test to v17 and below either.
- REL_16_STABLE used 32-bit SLRU page numbers, didn't have bank locks,
and used a simple sleep-loop instead of the condition variable.
- REL_15_STABLE and REL_14_STABLE: no conflicts from REL_16_STABLE
All of those conflicts were pretty straightforward to handle, but it's
enough code churn for silly mistakes to slip in, especially when the TAP
test didn't apply. So if you have a chance, please help to review and
test each of these backpatched versions too.
In addition to the backpatching, I did some more cosmetic cleanups to
the TAP test.
- Heikki
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix test to work with non-8kB block sizes
- 7c2061bdfba7 19 (unreleased) landed
-
Fix setting next multixid's offset at offset wraparound
- 48969555447f 14.21 landed
- b9a02b9780bc 15.16 landed
- 4d689a17693e 16.12 landed
- cad40cec24f3 17.8 landed
- 02ba5e3be4f3 18.2 landed
- 4d936c3fff1a 19 (unreleased) landed
-
Add test for multixid wraparound
- 7b81be9b4267 19 (unreleased) landed
-
Set next multixid's offset when creating a new multixid
- 81416e1016dd 14.21 landed
- 8cfb174a61eb 15.16 landed
- 635166913078 16.12 landed
- 8ba61bc06386 17.8 landed
- e46041fd973c 18.2 landed
- 789d65364cde 19 (unreleased) landed
-
psql: Improve tab completion for large objects.
- 14ee8e640300 19 (unreleased) cited
-
Refactor some repetitive SLRU code
- c61678551699 19 (unreleased) cited
-
Transaction IDs wrap around, per my proposal of 13-Aug-01. More
- bc7d37a525c0 7.2.1 cited