Thread
Commits
-
vacuumdb: Add missing PQfinish() calls to vacuum_one_database().
- f3e4aeb744da 18.0 landed
- eeaf6891be48 14.16 landed
- e8d8174caf75 16.7 landed
- d6ea82f5da18 13.19 landed
- 8c2dd212d1bc 15.11 landed
- 8703cdec2055 17.3 landed
-
Add --min-xid-age and --min-mxid-age options to vacuumdb
- 00d1e88d3668 12.0 cited
-
add missing PQfinish() calls to vacuumdb
Nathan Bossart <nathandbossart@gmail.com> — 2025-02-04T16:30:58Z
I noticed that vacuum_one_database() doesn't call PQfinish() before pg_fatal() in a few of the server version checks. I seem to have unintentionally established this precedent in commit 00d1e88. Michael claimed to have fixed it before committing [0], but that seems to have been missed, too. I don't think this is a huge problem, but it does seem nicer to properly close the connection before exiting. If there are no objections, I plan to commit and back-patch the attached patch shortly. [0] https://postgr.es/m/20190108020300.GH22498%40paquier.xyz -- nathan
-
Re: add missing PQfinish() calls to vacuumdb
Daniel Gustafsson <daniel@yesql.se> — 2025-02-04T16:51:28Z
> On 4 Feb 2025, at 17:30, Nathan Bossart <nathandbossart@gmail.com> wrote: > > I noticed that vacuum_one_database() doesn't call PQfinish() before > pg_fatal() in a few of the server version checks. I seem to have > unintentionally established this precedent in commit 00d1e88. Michael > claimed to have fixed it before committing [0], but that seems to have been > missed, too. I don't think this is a huge problem, but it does seem nicer > to properly close the connection before exiting. If there are no > objections, I plan to commit and back-patch the attached patch shortly. No objections, I too prefer to do the right thing here. +1 on backpatching. -- Daniel Gustafsson
-
Re: add missing PQfinish() calls to vacuumdb
Nathan Bossart <nathandbossart@gmail.com> — 2025-02-04T19:30:38Z
On Tue, Feb 04, 2025 at 05:51:28PM +0100, Daniel Gustafsson wrote: > No objections, I too prefer to do the right thing here. +1 on backpatching. Committed. Thanks for looking. -- nathan
-
Re: add missing PQfinish() calls to vacuumdb
Michael Paquier <michael@paquier.xyz> — 2025-02-05T00:36:00Z
On Tue, Feb 04, 2025 at 10:30:58AM -0600, Nathan Bossart wrote: > I noticed that vacuum_one_database() doesn't call PQfinish() before > pg_fatal() in a few of the server version checks. I seem to have > unintentionally established this precedent in commit 00d1e88. Michael > claimed to have fixed it before committing [0], but that seems to have been > missed, too. I don't think this is a huge problem, but it does seem nicer > to properly close the connection before exiting. If there are no > objections, I plan to commit and back-patch the attached patch shortly. > > [0] https://postgr.es/m/20190108020300.GH22498%40paquier.xyz Indeed. It looks like my fingers have slipped during a rebase for this one, or something like that. The incorrect pattern has spread later in ae78cae3be62, not 4211fbd8413b. Thanks for the fix, Nathan. -- Michael