| From: | Mohamed ALi <moali(dot)pg(at)gmail(dot)com> |
|---|---|
| To: | wenhui qiu <qiuwenhuifx(at)gmail(dot)com> |
| Cc: | Quan Zongliang <quanzongliang(at)yeah(dot)net>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: [PATCH] vacuumdb: Add --exclude-database option |
| Date: | 2026-06-10 06:24:53 |
| Message-ID: | CAGnOmWrDYxvwJ=9kYZ-5fezHkA1nwK2d1cbezkM6UME9_5wYtA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Quan, wenhui,
Thanks for the review and feedback.
On Thu, Jun 5, 2026 at 09:25:52 AM, Quan Zongliang wrote:
> In the vacuum_all_databases function. If the condition 'if
> (dbsToExclude)' is used. All 'exclude-database' processing (including
> variable definitions) can be placed in a separate code block.
Good suggestion. Attached is v2 incorporating this change, the
exclude-database logic (including the `cell` and `first` variable
declarations) is now scoped inside an `if (dbsToExclude)` block.
This keeps the variables out of the function's top-level scope when
the feature isn't being used.
The patch is also tracked in CommitFest PG20-1:
https://commitfest.postgresql.org/patch/6833/
--
Mohamed Ali
AWS RDS
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-vacuumdb-Add-exclude-database-option-to-skip-data.patch | application/octet-stream | 10.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chao Li | 2026-06-10 06:26:19 | Fix md5_password_warnings for role/database settings |
| Previous Message | Bertrand Drouvot | 2026-06-10 06:16:36 | Re: Fix unqualified catalog references in psql describe queries |