Re: Question about (lazy) vacuum - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: Question about (lazy) vacuum
Date
Msg-id 1156331326.2961.18.camel@localhost.localdomain
Whole thread Raw
In response to Question about (lazy) vacuum  (Gregory Stark <gsstark@mit.edu>)
Responses Re: Question about (lazy) vacuum
Re: Question about (lazy) vacuum
List 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




pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: Replication
Next
From: Markus Schiltknecht
Date:
Subject: Re: Replication