Re: Move bki file pre-processing from initdb to bootstrap

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Move bki file pre-processing from initdb to bootstrap
Дата
Msg-id 665c448a-373f-4a2b-b379-b50c507e939f@eisentraut.org
обсуждение исходный текст
Ответ на Re: Move bki file pre-processing from initdb to bootstrap  (Krishnakumar R <kksrcv001@gmail.com>)
Список pgsql-hackers
On 06.10.23 02:24, Krishnakumar R wrote:
>> elog(INFO, "Open bki file %s\n", bki_file);
>> +   boot_yyin = fopen(bki_file, "r");
>>
>> Why is this needed?  It already reads the bki file from stdin?
> We no longer open the bki file in initdb and pass to postgres to parse
> from stdin, instead we open the bki file directly in bootstrap and
> pass the file stream to the parser. Hence the need to switch the yyin.
> Have added a comment in the commit logs to capture this.

Why this change?  I mean, there is nothing wrong with it, but I don't 
follow how changing from reading from stdin to reading from a named file 
is related to moving the parameter substitution from initdb to the backend.

One effect of this is that we would now have two different ways initdb 
interacts with the backend.  In bootstrap mode, it reads from a named 
file, and the second run (the one that loads the system views etc.) 
reads from stdin.  It's already confusing enough, so any further 
divergence should be adequately explained.




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Nazir Bilal Yavuz
Дата:
Сообщение: Re: Failure during Building Postgres in Windows with Meson
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Move bki file pre-processing from initdb to bootstrap