pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Gregory Stark <stark@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Steven Flatt <steven.flatt@gmail.com>
Cc: Mark Kirkwood <markir@paradise.net.nz>
Cc: Bill Moran <wmoran@collaborativefusion.com>
Cc: Vivek Khera <vivek@khera.org>
Cc: Pgsql performance <pgsql-performance@postgresql.org>
Subject: Re: When/if to Reindex
Date: Fri, 24 Aug 2007 21:06:53 +0100
Message-ID: <876434zogy.fsf@oxford.xeocode.com> (raw )
In-Reply-To: <2774.1187976535@sss.pgh.pa.us >
References: <357fa7590707181008k65ab2f20l55bebb3c14f52770@mail.gmail.com >
<11801.1186624308@sss.pgh.pa.us >
<357fa7590708090651p71b9bc47n66739f8dbbb4ff57@mail.gmail.com >
<357fa7590708220955h441cd75ap4c0f0342a1c30a14@mail.gmail.com >
<873aybw2le.fsf@oxford.xeocode.com >
<357fa7590708231525h2f48ce4dw3e48ecca5ccddf72@mail.gmail.com >
<17370.1187927942@sss.pgh.pa.us >
<46CE6883.10104@paradise.net.nz >
<357fa7590708240722m204d678eid02b7ce3470eba1a@mail.gmail.com >
<1759.1187972125@sss.pgh.pa.us >
<357fa7590708240956k18e3ba7dv735cdaa99a667312@mail.gmail.com >
<2774.1187976535@sss.pgh.pa.us >
"Tom Lane" <tgl@sss.pgh.pa.us> writes:
> "Steven Flatt" <steven.flatt@gmail.com> writes:
>> So, can we simply trust what's in pg_class.relpages and ignore looking
>> directly at the index?
>
> No, we can't. In the light of morning I remember more about the reason
> for the aforesaid patch: it's actually unsafe to read the pg_class row
> at all if you have not got lock on the index. We are reading with
> SnapshotNow in order to be sure we see up-to-date info, and that means
> that a concurrent update of the row (eg, for REINDEX to report the new
> relfilenode) can have the following behavior:
Should reindex be doing an in-place update? Don't we have to do in-place
updates for other system catalogs which are read in snapshotnow for precisely
the same reasons?
Alternatively, why does the planner need access to the pg_class entry and not
just the pg_index record?
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
view thread (23+ messages) latest in thread
Message-ID: <876434zogy.fsf@oxford.xeocode.com>
Permalink: ../876434zogy.fsf@oxford.xeocode.com/
Also on: postgresql.org/message-id/876434zogy.fsf@oxford.xeocode.com
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: stark@enterprisedb.com, tgl@sss.pgh.pa.us, steven.flatt@gmail.com, markir@paradise.net.nz, wmoran@collaborativefusion.com, vivek@khera.org
Subject: Re: When/if to Reindex
In-Reply-To: <876434zogy.fsf@oxford.xeocode.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox