You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove BKI file token pre-processing logic from initdb.
With this patch genbki replaces some token at compile time. Some others
are initially populated with placeholder values from catalog/*.dat. Initdb
run time UPDATEs these place holders plus the left over token with
the respective configured values.
Here are more details:
- NAMEDATALEN, FLOAT8PASSBYVAL, SIZEOF_VOID_P, ALIGNOF_POINTER are replaced
during compilation from genbki.pl by reading those from header files.
- SIZEOF_VOID_P is available only after configuration (in pg_config.h).
A new parameter include-conf had to be added to genbki to point to header files
generated after configuration.
- The pg_database.dat now has placeholder values which are filled in template1
during creation. Initdb uses UPDATE to set the right values for rolname in
pg_authid and rest of the configured values in pg_database.
- Earlier bki file was opened by initdb, and passed to postgres started in
bootstrap mode. With this changes, the bki file is no longer opened in initdb,
instead the file path is passed to bootstrap which solely handles the bki file.
This means we have pass the file stream as yyin to allow the parsing from file
directly.
- Comparison of BKI file version and postgres build major version is moved from
initdb to bootstrap. It only compares the version string to avoid needing
platform compatability checks with EOL.
- On Windows, in front end code, text mode is enforced. Please refer to
src/port/open.c. In backend, bki file opens in binary mode. Add text mode
flag explicitly to handle EOL properly.
0 commit comments