From: | Amit Kapila <amit(dot)kapila(at)huawei(dot)com> |
---|---|
To: | "'Heikki Linnakangas'" <heikki(dot)linnakangas(at)enterprisedb(dot)com>, "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "'PostgreSQL-development'" <pgsql-hackers(at)postgresql(dot)org>, "'Kevin Grittner'" <kevin(dot)grittner(at)wicourts(dot)gov> |
Subject: | Re: default_isolation_level='serializable' crashes on Windows |
Date: | 2012-08-13 07:17:04 |
Message-ID: | 003b01cd7923$a4d2ff40$ee78fdc0$@kapila@huawei.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
From: pgsql-hackers-owner(at)postgresql(dot)org
[mailto:pgsql-hackers-owner(at)postgresql(dot)org] On Behalf Of Heikki Linnakangas
Sent: Monday, August 13, 2012 12:14 PM
On 12.08.2012 17:39, Tom Lane wrote:
> Heikki Linnakangas<heikki(dot)linnakangas(at)enterprisedb(dot)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?
>It's not the check function for default_transaction_isolation that
>crashes, but the one for transaction_isolation.
> I 'm not exactly sure how transaction_isolation gets set to a non-default
> value, though. The default for transaction_isolation is 'default', so
> it's understandable that the underlying XactIsoLevel variable gets set
> to XACT_SERIALIZABLE, but AFAICS the code to read/write the GUCs from/to
> file only cares about the string value of the guc, not the integer value
> of the underlying global variable.
Here What I am able to trace is that function read_nondefault_variables(),
reads all variables
from config_exec_params which contains both default_transaction_isolation
and transaction_isolation.
1. it first reads default_transaction_isolation and sets value of
DefaultXactIsoLevel to 'serializable'.
2. As for parameter default_transaction_isolation, there is no check
function it passes.
3. After that when variable transaction_isolation is processed, function
check_XactIsoLevel() sets
XactIsoLevel to XACT_SERIALIZABLE which causes crash.
Actually function read_nondefault_variables(), should only process non
default values (default_transaction_isolation)
not transaction_isolation, but currently it processes both?
With Regards,
Amit Kapila.
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2012-08-13 08:07:35 | Re: default_isolation_level='serializable' crashes on Windows |
Previous Message | Tom Lane | 2012-08-13 07:10:41 | Re: default_isolation_level='serializable' crashes on Windows |