Move bki file pre-processing from initdb to bootstrap

From: Krishnakumar R <kksrcv001(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: "andres(at)anarazel(dot)de" <andres(at)anarazel(dot)de>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Subject: Move bki file pre-processing from initdb to bootstrap
Date: 2023-09-01 08:01:31
Message-ID: CAPMWgZ9TCByVjpfdsgyte4rx=YsrAttYay2xDK4UN4Lm=-wJMQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
v1-0001-Move-the-pre-processing-for-tokens-in-bki-file-fr.patch application/octet-stream 13.2 KB

Responses

Browse pgsql-hackers by date

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