Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> The problem is that when a postmaster subprocess is launched, it calls
> read_nondefault_variables() very early, before shmem initialization, to
> read the non-default config options from the file that postmaster wrote.
> When check_XactIsoLevel() calls RecoveryInProgress(), it crashes,
> because XLogCtl is NULL.
Hm, how did the same code fail to crash in the postmaster itself, when
the postmaster read the setting from postgresql.conf?
A larger point is that I think it's broken for any GUC assignment
function to be calling something as transient as RecoveryInProgress to
start with. We probably ought to re-think the logic, not just band-aid
this by having it skip the check when shmem isn't initialized yet.
I'm thinking that the check has to occur somewhere outside GUC.
regards, tom lane