Re: Question about (lazy) vacuum

From: Hannu Krosing <hannu(at)skype(dot)net>
To: Gregory Stark <gsstark(at)mit(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Question about (lazy) vacuum
Date: 2006-08-23 11:08:46
Message-ID: 1156331326.2961.18.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ühel kenal päeval, K, 2006-08-23 kell 05:23, kirjutas Gregory Stark:
> With all this code to handle ignoring vacuum transactions in calculating the
> global xmin it just occurred to me to wonder: Does lazy vacuum need a
> transaction at all? It doesn't do the tuple moving tricks with xvac that
> vacuum full does so does lazy vacuum's xid ever make it into tables? Couldn't
> it just use GetTopTransactionId instead of its own xid? Would this cause any
> problems?

When I asked the same question, I was told that a lot of core
functionality vacuum uses needs to be in transaction. I guess bad things
can happen, if some other backend ends a transaction you claim to be in.

And it is not so much about what ends up in tables, but about what other
backends think.

BTW, I think that CONCURRENT CREATE INDEX should be modified to use long
transactions which actually build the index and are ignored by vacuum
and short ones which write data to system tables and are not ignored.
That way we have one less obstacle for keeping high-update tables in
shape.

>
--
----------------
Hannu Krosing
Database Architect
Skype Technologies OÜ
Akadeemia tee 21 F, Tallinn, 12618, Estonia

Skype me: callto:hkrosing
Get Skype for free: http://www.skype.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Markus Schiltknecht 2006-08-23 11:09:36 Re: Replication
Previous Message Hannu Krosing 2006-08-23 09:42:11 Re: Replication