Re: Issue in GIN fast-insert: XLogBeginInsert + Read/LockBuffer ordering
Zhang Mingli <zmlpostgres@gmail.com>
From: Zhang Mingli <zmlpostgres@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>, Matthias van de
Meent <boekewurm+postgres@gmail.com>
Date: 2022-10-12T13:39:11Z
Lists: pgsql-hackers
Attachments
- v2-0001-Fix-GIN-fast-path-XLogBeginInsert-and-Read-LockBu.patch (application/octet-stream) patch v2-0001
HI, On Oct 12, 2022, 10:09 +0800, Michael Paquier <michael@paquier.xyz>, wrote: > > Nice catches, both of you. Let's adjust everything spotted in one > shot. Matthias' patch makes the ordering right, but the > initialization path a bit harder to follow when using a separate list. > The code is short so it does not strike me as a big deal, and it comes > from the fact that we need to lock an existing buffer when merging two > lists. For the branch where we insert into a tail page, the pages are > already locked but it looks to be enough to move XLogBeginInsert() > before the first XLogRegisterBuffer() call. > > Would any of you like to write a patch? > -- > Michael Patch added. Regards, Zhang Mingli
Commits
-
Fix ordering issue with WAL operations in GIN fast insert path
- b02fc7df193b 10.23 landed
- 341fba2a6291 11.18 landed
- 51c24d9e21d7 12.13 landed
- 594b97509e49 13.9 landed
- 5a30d43fa986 14.6 landed
- ca4070f2b4b1 15.1 landed
- 56b662523fd4 16.0 landed