Re: Not HOT enough

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Not HOT enough
Дата
Msg-id 760.1322073018@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Not HOT enough  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: Not HOT enough  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Simon Riggs <simon@2ndQuadrant.com> writes:
> On Tue, Nov 22, 2011 at 11:40 PM, Simon Riggs <simon@2ndquadrant.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Not HOT enough
Следующее
От: Jan Urbański
Дата:
Сообщение: Re: plpython SPI cursors