Re: Load Distributed Checkpoints, revised patch

From: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
To: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
Cc: "Patches" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Load Distributed Checkpoints, revised patch
Date: 2007-06-17 14:33:45
Message-ID: 1182090826.6855.48.camel@silverbirch.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Sun, 2007-06-17 at 12:00 +0100, Heikki Linnakangas wrote:
> Simon Riggs wrote:
> > On Sun, 2007-06-17 at 08:51 +0100, Heikki Linnakangas wrote:
> >>> Do we need to know it so exactly that we look
> >>> at WALInsertLock? Maybe use info_lck to request the latest page, since
> >>> that is less heavily contended and we need never wait across I/O.
> >> Is there such a value available, that's protected by just info_lck? I
> >> can't see one.
> >
> > XLogCtl->LogwrtRqst.Write
>
> That's the Write location. checkpoint_segments is calculated against the
> Insert location. In a normal OLTP scenario they would be close to each
> other, but if you're doing a huge data load in a transaction; restoring
> from backup for example, they could be really far apart.

XLogCtl->LogwrtRqst.Write is updated every time we insert an xlog record
that advances to a new page. It isn't exactly up to date, but it lags
behind by no more than a page.

LogwrtRqst and LogwrtResult may differ substantially in the situation
you mention.

--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2007-06-17 15:40:40 Re: Load Distributed Checkpoints, revised patch
Previous Message Pavel Stehule 2007-06-17 14:00:13 wrong sql statement crashes backend

Browse pgsql-patches by date

  From Date Subject
Next Message Heikki Linnakangas 2007-06-17 15:40:40 Re: Load Distributed Checkpoints, revised patch
Previous Message Heikki Linnakangas 2007-06-17 11:00:02 Re: Load Distributed Checkpoints, revised patch