Re: default_isolation_level='serializable' crashes on Windows - Mailing list pgsql-hackers

From Tom Lane
Subject Re: default_isolation_level='serializable' crashes on Windows
Date
Msg-id 2397.1344782363@sss.pgh.pa.us
Whole thread Raw
In response to default_isolation_level='serializable' crashes on Windows  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: default_isolation_level='serializable' crashes on Windows
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: default_isolation_level='serializable' crashes on Windows
Next
From: Alexander Korotkov
Date:
Subject: Re: Statistics and selectivity estimation for ranges