Re: unnecessary creation of FSM files during bootstrap mode - Mailing list pgsql-hackers

From John Naylor
Subject Re: unnecessary creation of FSM files during bootstrap mode
Date
Msg-id CAJVSVGUTLEkyf2njpN_F2-Siom6W=j4o_7JajeOcu1mw-ULF=g@mail.gmail.com
Whole thread Raw
In response to unnecessary creation of FSM files during bootstrap mode  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: unnecessary creation of FSM files during bootstrap mode  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Thought I'd ping...
(sorry for the top post)

On Sat, Dec 15, 2018 at 12:02 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> As pointed out by John Naylor [1], it seems during bootstrap mode, we
> are always creating FSM files which are not required.  In commit's
> b9d01fe288 and 3908473c80, we have added some code where we allowed
> the creation of files during mdopen even if they didn't exist during
> the bootstrap mode.  The comments in the code say: "During bootstrap,
> there are cases where a system relation will be accessed (by internal
> backend processes) before the bootstrap script nominally creates it."
> I am sure this will be the case when that code is added but is it
> required today?  While going through commit 3908473c80, I came across
> below comment:
>
> - * During bootstrap processing, we skip that check, because pg_time,
> - * pg_variable, and pg_log get created before their .bki file entries
> - * are processed.
> - */
> + fd = FileNameOpenFile(path, O_RDWR | O_CREAT | O_EXCL | PG_BINARY, 0600);
>
> The system tables mentioned in above commit are not present today, so
> do we really need that code and even if it is required shall we do it
> only for 'main' or 'init' forks?
>
> Tom, as you are a committer of the commits b9d01fe288 and 3908473c80,
> do you remember anything in this regard?
>
>
> [1] - https://www.postgresql.org/message-id/CAJVSVGVtf%2B-2sQGVyEZJQh15dpVicpFA6BBiPLugaD4oBEaiHg%40mail.gmail.com
>
> --
> With Regards,
> Amit Kapila.
> EnterpriseDB: http://www.enterprisedb.com
>


pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: WIP: Avoid creation of the free space map for small tables
Next
From: Alexander Korotkov
Date:
Subject: Re: [PATCH] kNN for btree