| From: | "Kevin Rocker" <me(at)kevinrocker(dot)com> |
|---|---|
| To: | "Neil Chen" <carpenter(dot)nail(dot)cz(at)gmail(dot)com> |
| Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: [PATCH] Fix vacuum_delay_point happening inside lock |
| Date: | 2026-08-03 15:20:59 |
| Message-ID: | f620cac7-ee26-4a49-b21e-396167c303ff@app.fastmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Neil,
The `LockBuffer(buffer, GIN_UNLOCK)` you mentioned does call the vacuum delay as part of inserting each entry to disk, so the gain would be one additional delay_point before the scan and the first insertion. That unlock is also only in the flush-to-disk path, so it's not a direct replacement for the removed one.
The unconditional part of the loop is 'processPendingPage' then release the buffer and call vacuum_delay right after the if/else. Given all that, it's probably fine as is? Let me know what you think. I've attached a patch with your suggestion as well.
- Kevin Rocker
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0002-Additional-vacuum_delay_point-before-flushing-ent.patch | text/x-patch | 1000 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fujii Masao | 2026-08-03 15:24:53 | Re: 030_pg_recvlogical fails because the same PID is assigned |
| Previous Message | Philip Alger | 2026-08-03 15:15:39 | Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement |