Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Configuring BLCKSZ and XLOGSEGSZ (in 8.3)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Cc: "Peter Eisentraut" <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] Configuring BLCKSZ and XLOGSEGSZ (in 8.3)
Date: 2006-12-05 22:26:13
Message-ID: 14231.1165357573@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
"Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
> On Tue, 2006-12-05 at 16:24 -0500, Tom Lane wrote:
>> Sure, what would happen is that every backend passing through this code
>> would execute the several lines of computation needed to decide whether
>> to call RequestCheckpoint.

> Right, but the calculation uses RedoRecPtr, which may not be completely
> up to date. So presumably you want to re-read the shared memory value
> again to make sure we are exactly accurate and allow only one person to
> call checkpoint? Either way we have to take a lock. Insert lock causes
> deadlock, so we would need to use infolock. 

Not at all.  It's highly unlikely that RedoRecPtr would be so out of
date as to result in a false request for a checkpoint, and if it does,
so what?  Worst case is we perform an extra checkpoint.

Also, given the current structure of the routine, this is probably not
the best place for that code at all --- it'd make more sense for it to
be in the just-finished-a-segment code stretch, which would ensure that
it's only done by one backend once per segment.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2006-12-05 22:30:03
Subject: Re: psql possible TODO
Previous:From: Oleg BartunovDate: 2006-12-05 22:15:07
Subject: Re: Postgres95 archives in mbox format

pgsql-patches by date

Next:From: Simon RiggsDate: 2006-12-06 00:54:05
Subject: Re: [HACKERS] Configuring BLCKSZ and XLOGSEGSZ (in 8.3)
Previous:From: Simon RiggsDate: 2006-12-05 21:58:16
Subject: Re: [HACKERS] Configuring BLCKSZ and XLOGSEGSZ (in 8.3)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group