Re: Support for REINDEX CONCURRENTLY - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Support for REINDEX CONCURRENTLY
Date
Msg-id 12548.1355074145@sss.pgh.pa.us
Whole thread Raw
In response to Re: Support for REINDEX CONCURRENTLY  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
Simon Riggs <simon@2ndQuadrant.com> writes:
> On 8 December 2012 15:14, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Or we could wait for MVCC catalog access ...

> If there was a published design for that, it would help believe in it more.
> Do you think one exists?

Well, there have been discussion threads about it in the past.  I don't
recall whether any insoluble issues were raised.  I think the concerns
were mostly about performance, if we start taking many more snapshots
than we have in the past.

The basic idea isn't hard: anytime a catalog scan is requested with
SnapshotNow, replace that with a freshly taken MVCC snapshot.  I think
we'd agreed that this could safely be optimized to "only take a new
snapshot if any new heavyweight lock has been acquired since the last
one".  But that'll still be a lot of snapshots, and we know the
snapshot-getting code is a bottleneck already. I think the discussions
mostly veered off at this point into how to make snapshots cheaper.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Review of Row Level Security
Next
From: Simon Riggs
Date:
Subject: Re: Review of Row Level Security