Re: advance local xmin more aggressively

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: advance local xmin more aggressively
Дата
Msg-id 1234370408.31945.43.camel@jdavis
обсуждение исходный текст
Ответ на Re: advance local xmin more aggressively  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: advance local xmin more aggressively
Список pgsql-hackers
On Wed, 2009-02-11 at 10:20 -0500, Robert Haas wrote:
> On Tue, Feb 10, 2009 at 3:06 PM, Jeff Davis <pgsql@j-davis.com> wrote:
> > With the new snapshot maintenance code, it looks like we can advance the
> > xmin more aggressively.
> 
> Can you clarify the circumstances in which this patch would show a
> benefit over the current system?

In the current code, if the process is always holding at least one
snapshot, the process' xmin never advances. That means VACUUM will never
be able to reclaim tuples visible during the first snapshot taken during
the transaction.

With the patch, as long as snapshots are being released, the process'
xmin will keep advancing to reflect the oldest snapshot currently held
by that process.

In order to accomplish that, every time a snapshot is released I have to
look at every snapshot that the process still holds to find the new
local minimum xmin. The current code will only change the process' xmin
if there are no snapshots at all.

As Tom pointed out, one of the assumptions I made writing the patch is
not always true. I am still trying to determine the implications of
that.

Regards,Jeff Davis



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: DISCARD ALL failing to acquire locks on pg_listen
Следующее
От: Tom Lane
Дата:
Сообщение: Re: A deprecation policy