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

Re: Hot Standby: Caches and Locks

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Hot Standby: Caches and Locks
Date: 2008-10-30 13:04:02
Message-ID: 1225371842.3971.388.camel@ebony.2ndQuadrant (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Thu, 2008-10-30 at 08:30 -0400, Tom Lane wrote:
> Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
> >> We can't augment the commit/abort messages because
> >> we must cater for non-transactional invalidations also, plus commit
> >> xlrecs are already complex enough. So we log invalidations prior to
> >> commit, queue them and then trigger the send at commit (if it
> >> happens).
> > Augmenting the commit messages seems like the better approach. It allows
> > invalidation messages to be fired as they are read off the xlrec. Still
> > need the additional message type to handle nontransactional
> > invalidation. There are other messages possibly more complex than this
> > already.
> I guess I hadn't been paying attention, but: adding syscache inval
> traffic to WAL seems like a completely horrid idea, both from the
> complexity and performance standpoints.  

Well, it's coming out fairly simple actually. Can you explain where you
think the performance loss is? My expectation is less than a 0.1% WAL
volume overhead for typical systems. My comment this morning was to say
I've managed to augment the commit record, so we're not even sending
many additional messages.

It also makes much of the Hot Standby patch fairly simple, even if it is
large. Write something to WAL, act on it on the other side. I've paid
very close attention to minimising the effects on both the number of
lock acquisitions and total WAL volume, but having said that I expect
there to be many tuning opportunities.

> What about using the existing
> syscache logic to re-derive inval information from watching the update
> operations?

That does sound possible, but it makes some big assumptions about
transactional machinery being in place. It ain't. Subtransactions make
everything about 5 times more difficult, so it seems pretty scary to me.

 Simon Riggs 
 PostgreSQL Training, Services and Support

In response to


pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2008-10-30 13:14:14
Subject: Optimizing COPY
Previous:From: Tom LaneDate: 2008-10-30 12:52:09
Subject: Re: Question about GetAttributeByNum(Name) ExecQual.c

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