From: | Zhang Mingli <zmlpostgres(at)gmail(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com> |
Subject: | Re: Issue in GIN fast-insert: XLogBeginInsert + Read/LockBuffer ordering |
Date: | 2022-10-12 13:39:11 |
Message-ID: | 2d406e3a-07d7-4c00-9d10-fcee8f191bd5@Spark |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
HI,
On Oct 12, 2022, 10:09 +0800, Michael Paquier <michael(at)paquier(dot)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
Attachment | Content-Type | Size |
---|---|---|
v2-0001-Fix-GIN-fast-path-XLogBeginInsert-and-Read-LockBu.patch | application/octet-stream | 1.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2022-10-12 13:49:56 | Re: ExecRTCheckPerms() and many prunable partitions |
Previous Message | Önder Kalacı | 2022-10-12 13:30:34 | Re: [Proposal] Add foreign-server health checks infrastructure |