From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Hannu Krosing <hannu(at)skype(dot)net> |
Cc: | Bruce Momjian <bruce(at)momjian(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Neil Conway <neilc(at)samurai(dot)com>, pgsql-patches(at)postgresql(dot)org |
Subject: | Re: PATCH to allow concurrent VACUUMs to not lock each |
Date: | 2006-07-30 19:18:34 |
Message-ID: | 20060730191834.GA9229@surnet.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-07-30 19:19:23 | Re: PATCH to allow concurrent VACUUMs to not lock each |
Previous Message | Hannu Krosing | 2006-07-30 18:55:05 | Re: PATCH to allow concurrent VACUUMs to not lock each |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-07-30 19:19:23 | Re: PATCH to allow concurrent VACUUMs to not lock each |
Previous Message | Hannu Krosing | 2006-07-30 18:55:05 | Re: PATCH to allow concurrent VACUUMs to not lock each |