Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
> On Tue, Nov 22, 2011 at 11:40 PM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
>>> I think this is unsafe for shared catalogs.
>> I think so too. Thats why it uses IsMVCCSnapshot() to confirm when it
>> is safe to do so.
> Ah, you mean access to shared catalogs using MVCC snapshots.
[ having now read the patch a bit more carefully ]
I think the fundamental problem with this is that it's conflating "what
to do in shared catalogs" with "what to do when an MVCC snapshot is
being used". HOT cleanup activity really ought not have anything at all
to do with what snapshot is being used to scan the page.
I'm also extremely uncomfortable with the fact that your proposed coding
changes not only the RecentGlobalXmin output of GetSnapshotData, but the
actual snapshot output --- you have not even made an argument why that
is safe, and I doubt that it is.
What I think might make more sense is to keep two variables,
RecentGlobalXmin with its current meaning and RecentDatabaseWideXmin
which considers only xmins of transactions in the current database.
Then HOT cleanup could select the appropriate cutoff depending on
whether it's working on a shared or non-shared relation.
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: Jan Urbański||Date: 2011-11-23 18:58:55|
|Subject: Re: plpython SPI cursors|
|Previous:||From: Tom Lane||Date: 2011-11-23 18:15:58|
|Subject: Re: Not HOT enough |