Re: PATCH to allow concurrent VACUUMs to not lock each - Mailing list pgsql-patches

From Alvaro Herrera
Subject Re: PATCH to allow concurrent VACUUMs to not lock each
Date
Msg-id 20060730191834.GA9229@surnet.cl
Whole thread Raw
In response to Re: PATCH to allow concurrent VACUUMs to not lock each  (Hannu Krosing <hannu@skype.net>)
List pgsql-patches
Hannu Krosing wrote:
> Ühel kenal päeval, P, 2006-07-30 kell 14:11, kirjutas Alvaro Herrera:

> > What was idea behind moving vac_update_relstats to a separate
> > transaction?  I'm wondering if it's still needed, if it further enhances
> > the system somehow, or your patch did something differently than what
> > was applied.
>
> The part of transactions which actually modified the data (iirc it updates
> relpages and reltuples in pg_class) is not safe to ignore by concurrent
> vacuum, say a vacuum on pg_class .
>
> When the updating is done in the same trx that marks itself inVacuum,
> then these vacuums would be permitted to remove the old versions of
> pg_class and then, in case the inVacuum transaction aborts after that we
> are left with no valid pg_class row.

I understand.  But the pg_class row is updated using in-place update,
which means that it continues having the same Xmin as before -- to the
rest of the system, it's exactly the same row as before, and it won't be
removed.  So this is not a problem.  Thanks for clarifying.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-patches by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: PATCH to allow concurrent VACUUMs to not lock each
Next
From: Tom Lane
Date:
Subject: Re: PATCH to allow concurrent VACUUMs to not lock each