Re: unnecessary creation of FSM files during bootstrap mode

From: John Naylor <jcnaylor(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: unnecessary creation of FSM files during bootstrap mode
Date: 2019-01-10 22:49:03
Message-ID: CAJVSVGUTLEkyf2njpN_F2-Siom6W=j4o_7JajeOcu1mw-ULF=g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thought I'd ping...
(sorry for the top post)

On Sat, Dec 15, 2018 at 12:02 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)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
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2019-01-10 23:21:28 Re: [PATCH] kNN for btree
Previous Message John Naylor 2019-01-10 22:24:10 Re: WIP: Avoid creation of the free space map for small tables