[PATCH] Add memory usage reporting to VACUUM VERBOSE

From: 河田達也 <kawatatatsuya0913(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: [PATCH] Add memory usage reporting to VACUUM VERBOSE
Date: 2025-11-16 16:01:03
Message-ID: CAHza6qcPitBCkyiKJosDTt3bmxMvzZOTONoebwCkBZrr3rk65Q@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I would like to propose a patch that adds memory usage reporting to
VACUUM VERBOSE output. This helps users understand how much memory
is being used for dead tuple tracking and whether memory limits are
being hit during vacuum operations.

I have tested this patch with both serial and parallel VACUUM:
- Serial VACUUM with two maintenance_work_mem settings
- Parallel VACUUM with two maintenance_work_mem settings
- Cases with and without memory resets

Test cases are included showing:
1. Reset behavior with constrained memory (64KB)
2. No reset behavior with ample memory (64MB)
3. Both serial and parallel VACUUM scenarios

I look forward to your feedback.

Best regards,
Tatsuya Kawata

Attachment Content-Type Size
test_memory_tracking.sql application/octet-stream 2.7 KB
0001-Add-memory-usage-reporting-to-VACUUM-VERBOSE.patch application/octet-stream 4.1 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Dolgov 2025-11-16 16:45:15 Re: System views for versions reporting
Previous Message Alexander Korotkov 2025-11-16 15:20:25 Re: Implement waiting for wal lsn replay: reloaded