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

Re: Storing hot members of PGPROC out of the band

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Storing hot members of PGPROC out of the band
Date: 2011-11-07 12:28:57
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Mon, Nov 7, 2011 at 6:45 AM, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> While looking at GetSnapshotData(), it occurred to me that when a PGPROC
> entry does not have its xid set, ie. xid == InvalidTransactionId, it's
> pointless to check the subxid array for that proc. If a transaction has no
> xid, none of its subtransactions can have an xid either. That's a trivial
> optimization, see attached. I tested this with "pgbench -S -M prepared -c
> 500" on the 8-core box, and it seemed to make a 1-2% difference (without the
> other patch). So, almost in the noise, but it also doesn't cost us anything
> in terms of readability or otherwise.

Oh, that's a good idea.  +1 for doing that now, and then we can keep
working on the rest of it.

Robert Haas
The Enterprise PostgreSQL Company

In response to


pgsql-hackers by date

Next:From: Robert HaasDate: 2011-11-07 12:47:59
Subject: Re: -Wcast-qual cleanup, part 1
Previous:From: Thom BrownDate: 2011-11-07 12:14:30
Subject: Re: git trunk doesn't build

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