From: | Greg Nancarrow <gregn4422(at)gmail(dot)com> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Skip vacuum log report code in lazy_scan_heap() if possible |
Date: | 2021-10-29 10:51:57 |
Message-ID: | CAJcOf-fH5FGsF3mpPL1m5yHLeR0HdXWQp9RA=LnHu0Qd=eq9DA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
When recently debugging a vacuum-related issue, I noticed that there
is some log-report processing/formatting code at the end of
lazy_scan_heap() that, unless the vacuum VERBOSE option is specified,
typically results in no log output (as the log-level is then DEBUG2).
I think it is worth skipping this code if ultimately nothing is going
to be logged (and I found that even for a tiny database, a VACUUM may
execute this code hundreds of times).
I have attached a simple patch for this.
Regards,
Greg Nancarrow
Fujitsu Australia
Attachment | Content-Type | Size |
---|---|---|
v1-0001-Skip-vacuum-log-report-processing-in-lazy_scan_heap-if-possible.patch | application/octet-stream | 1.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2021-10-29 11:19:59 | Re: Skipping logical replication transactions on subscriber side |
Previous Message | Joel Mariadasan (jomariad) | 2021-10-29 10:40:06 | Vulnerability identified with Postgres 13.4 for Windows |