| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…ldren initdb -C stores the identifier case mode in pg_control, and at startup SetCaseGucOption sets ivorysql.identifier_case_switch from it with PGC_S_DEFAULT. Only the postmaster ran that code. On Linux every backend inherits the postmaster's memory, so it did not matter; under EXEC_BACKEND a child process starts from the compiled defaults and reads back the postmaster's non-default variables, and a variable set with PGC_S_DEFAULT is not among them. On Windows every backend therefore ran in interchange mode whatever initdb -C had said: "show ivorysql.identifier_case_switch" answered interchange on a cluster made with -C normal, and a quoted lower-case name such as the regression driver's CREATE DATABASE "regression" came out as REGRESSION on the Oracle port, which is why the Oracle-mode test suites on Windows found no database and failed every test. The value is a default computed at startup, so it is set with PGC_S_DYNAMIC_DEFAULT: the postmaster then writes it to the non-default variables file and the children read it back. The precedence against postgresql.conf and SET is unchanged.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info ⚙️ Run configuration
Reviewing files that changed from the base of the PR and between 069766e and 9739f87. 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 Walkthrough WalkthroughThe NORMAL, INTERCHANGE, and LOWERCASE Oracle compatibility modes now set ivorysql.identifier_case_switch with PGC_S_DYNAMIC_DEFAULT instead of PGC_S_DEFAULT. A comment describes the control-file-derived startup default and its handling for EXEC_BACKEND child processes. ChangesIdentifier Case Startup Default
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to 9739f The control-file-derived identifier setting now reaches EXEC_BACKEND children, while explicit configuration and session overrides retain precedence. No actionable merge risk is established. 🚥 Pre-merge checks | ✅ 5 ✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. ❤️ ShareComment @coderabbitai help to get the list of available commands. |
Sorry, something went wrong.
|
The suites, with this change: on Windows (MSVC, meson) together with #2321 and the meson registration of the Oracle-mode suites (new PR), the PL/iSQL suite passes 22 of 22, the core Oracle suite 250 of 258 and the extension suite 26 of 31 (https://github.com/Muzzammil242/IvorySQL/actions/runs/37855437140); without it every test of the three suites failed, because the driver's quoted regression came out as REGRESSION. The remaining thirteen are platform differences (collation, unicode width, xml, time zone names, file paths). Linux is unchanged: all three suites green. |
Sorry, something went wrong.
|
Thanks for the contribution; using PGC_S_DYNAMIC_DEFAULT appropriately propagates the control-file case mode to EXEC_BACKEND children, and a regression test covering all three modes would strengthen this fix. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
What
initdb -C stores the identifier case mode in pg_control, and at startup SetCaseGucOption() sets ivorysql.identifier_case_switch from it with PGC_S_DEFAULT. Only the postmaster runs that code. On Linux every backend inherits the postmaster's memory, so it does not matter. Under EXEC_BACKEND (Windows) a child process starts from the compiled defaults and reads back the postmaster's non-default variables, and a variable set with PGC_S_DEFAULT is not among them (write_nondefault_variables() skips that source). So on Windows every backend ran in interchange mode whatever initdb -C had said.
Evidence, on a windows-2022 runner
Cluster made with initdb -C normal, connections to the Oracle port and the PostgreSQL port (https://github.com/Muzzammil242/IvorySQL/actions/runs/37853137231):
That is why the Oracle-mode regression suites fail every test on Windows (#2320 series): the driver's CREATE DATABASE "regression" over the Oracle port creates REGRESSION, and the tests then find no regression.
With this change, same runner, same commands (https://github.com/Muzzammil242/IvorySQL/actions/runs/37854194953):
Change
The value is a default computed at startup, so SetCaseGucOption() sets it with PGC_S_DYNAMIC_DEFAULT: the postmaster then writes it to the non-default variables file and the children read it back. The precedence against postgresql.conf and SET is unchanged. Nine lines, three of them a comment.
Summary by CodeRabbit