| From: | Baji Shaik <baji(dot)pgdev(at)gmail(dot)com> |
|---|---|
| To: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
| Cc: | Vadim Ponomarev <vbponomarev(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
| Subject: | Re: Parallel heap vacuum |
| Date: | 2026-12-01 18:26:27 |
| Message-ID: | CA+fm-RPg+jg_aG_Ogv0K6Lv0EXKiTy1HtJ3gB4AXPYGUx5rGGA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hello Bharath,
On Mon, Nov 23, 2026 at 7:59 PM Bharath Rupireddy <
bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
>
> Please find the attached v22 patches. I fixed the failsafe issue and a
> couple of other things identified in self-review: removed some unused
> variables, moved the truncate-related param back to LVRelState, fixed
> the worker calculations depending on the size of the table, improved
> some doc wordings, fixed the progress reporting of dead_tuple_bytes,
> etc.
>
> Thoughts?
>
Thanks for working on this. I ran some benchmarks on v22 on an
i4i.4xlarge (16 vCPU, 123GB RAM, local NVMe), unlogged table, asserts
off, median of 5 runs:
- No regression with 0 workers, at any index count.
- With no indexes, about 2.4x faster than head; with 1-4 indexes,
about 1.3-1.4x.
- No errors with concurrent INSERT/UPDATE running during the vacuum.
- PARALLEL_LV_CHUNK_SIZE matters: on a 10GB table with no indexes,
32768 gives about 3.1x at 4 workers vs 2.1x with the default 1024.
At 2 workers 32768 is slightly slower.
- Requesting 8 workers on an 8-10GB table launches only 5-6.
- I also tried to break it (forced failsafe, cancel/kill of workers,
many index passes, concurrent writes, comparing results with serial
vacuum via amcheck/pg_visibility) and didn't find any issues.
Full numbers attached.
Thanks,
Baji Shaik
| Attachment | Content-Type | Size |
|---|---|---|
| PARALLEL_HEAP_VACUUM_V22_BENCHMARK.md | text/markdown | 5.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Dunstan | 2026-12-01 18:35:21 | Re: Should we skip foreign key checks in binary upgrade mode? |
| Previous Message | Baji Shaik | 2026-12-01 18:14:43 | Re: Use-after-free in ER_get_flat_size() when a PL/pgSQL expression references a TOASTed field and the whole record |