From: | Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: GenBKI emits useless open;close for catalogs without rows |
Date: | 2023-09-01 17:50:27 |
Message-ID: | CAEze2Wg=fce=3cw7QUF6Aa7WEZLi1DD3D3PW_4XaKRmzRuK+Og@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, 1 Sept 2023 at 19:43, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
>
> On 2023-Sep-01, Matthias van de Meent wrote:
>
> > A potential addition to the patch would to stop manually closing
> > relations: initdb and check-world succeed without manual 'close'
> > operations because the 'open' command auto-closes the previous open
> > relation (in boot_openrel). Testing also suggests that the last opened
> > relation apparently doesn't need closing - check-world succeeds
> > without issues (incl. with TAP enabled). That is therefore implemented
> > in attached patch 2 - it removes the 'close' syntax in its entirety.
>
> Hmm, what happens with the last relation in the bootstrap process? Is
> closerel() called via some other path for that one?
There is a final cleanup() call that closes the last open boot_reldesc
relation (if any) at the end of BootstrapModeMain, after boot_yyparse
has completed and its changes have been committed.
- Matthias
From | Date | Subject | |
---|---|---|---|
Next Message | Nathan Bossart | 2023-09-01 17:51:29 | Re: Inefficiency in parallel pg_restore with many tables |
Previous Message | Alvaro Herrera | 2023-09-01 17:43:30 | Re: GenBKI emits useless open;close for catalogs without rows |