Re: Re: [COMMITTERS] pgsql: In checkpoint, move the check for in-progress xacts out of criti

Lists: pgsql-committerspgsql-hackers
From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: In checkpoint, move the check for in-progress xacts out of criti
Date: 2014-04-04 14:32:08
Message-ID: E1WW5A9-0001e0-0B@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

In checkpoint, move the check for in-progress xacts out of critical section.

GetVirtualXIDsDelayingChkpt calls palloc, which isn't safe in a critical
section. I thought I covered this case with the exemption for the
checkpointer, but CreateCheckPoint is also called from the startup process.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/d9e7873bbbdee76a49e76ddaa49787cab112bb2e

Modified Files
--------------
src/backend/access/transam/xlog.c | 72 ++++++++++++++++++-------------------
1 file changed, 36 insertions(+), 36 deletions(-)


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: In checkpoint, move the check for in-progress xacts out of criti
Date: 2014-04-04 15:06:16
Message-ID: CA+Tgmobcm+ZAMD7Evpi+MJJ8bMQQy=UYU0E-f4nrdzr1PC_XEA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On Fri, Apr 4, 2014 at 10:32 AM, Heikki Linnakangas
<heikki(dot)linnakangas(at)iki(dot)fi> wrote:
> In checkpoint, move the check for in-progress xacts out of critical section.
>
> GetVirtualXIDsDelayingChkpt calls palloc, which isn't safe in a critical
> section. I thought I covered this case with the exemption for the
> checkpointer, but CreateCheckPoint is also called from the startup process.

This commit un-broke "make check", which you might have wanted to run
before committing, but "make -C src/test/isolation check" is still
broken.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: In checkpoint, move the check for in-progress xacts out of criti
Date: 2014-04-04 15:26:20
Message-ID: 533ECF1C.7040709@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On 04/04/2014 06:06 PM, Robert Haas wrote:
> On Fri, Apr 4, 2014 at 10:32 AM, Heikki Linnakangas
> <heikki(dot)linnakangas(at)iki(dot)fi> wrote:
>> In checkpoint, move the check for in-progress xacts out of critical section.
>>
>> GetVirtualXIDsDelayingChkpt calls palloc, which isn't safe in a critical
>> section. I thought I covered this case with the exemption for the
>> checkpointer, but CreateCheckPoint is also called from the startup process.
>
> This commit un-broke "make check", which you might have wanted to run
> before committing, but "make -C src/test/isolation check" is still
> broken.

Yeah.. Fixed now.

- Heikki