Move bki file pre-processing from initdb to bootstrap - Mailing list pgsql-hackers

From Krishnakumar R
Subject Move bki file pre-processing from initdb to bootstrap
Date
Msg-id CAPMWgZ9TCByVjpfdsgyte4rx=YsrAttYay2xDK4UN4Lm=-wJMQ@mail.gmail.com
Whole thread Raw
Responses Re: Move bki file pre-processing from initdb to bootstrap
Re: Move bki file pre-processing from initdb to bootstrap
List pgsql-hackers
Hi All,

This patch moves the pre-processing for tokens in the bki file from
initdb to bootstrap. With these changes the bki file will only be
opened once in bootstrap and parsing will be done by the bootstrap
parser.

The flow of bki file processing will be as follows:
- In initdb gather the values used to replace the tokens in the bki file.
- Pass these values into postgres bootstrap startup using '-i' option
as key-value pairs.
- In bootstrap open the bki file (the bki file name was received as a
parameter).
- During the parsing of the bki file, replace the tokens received as
parameters with their values.

Related discussion can be found here:
https://www.postgresql.org/message-id/20220216021219.ygzrtb3hd5bn7olz%40alap3.anarazel.de

Note: Currently the patch breaks on windows due to placement of extra
quotes when passing parameters (Thanks to Thomas Munro for helping me
find that). Will follow up with v2 fixing the windows issues on
passing  the parameters and format fixes.

Please review and provide feedback.

--
Thanks and Regards,
Krishnakumar (KK).
[Microsoft]

Attachment

pgsql-hackers by date:

Previous
From: Alexander Lakhin
Date:
Subject: Re: lockup in parallel hash join on dikkop (freebsd 14.0-current)
Next
From: "Ryo Matsumura (Fujitsu)"
Date:
Subject: PATCH: document for regression test forgets libpq test