advance local xmin more aggressively - Mailing list pgsql-hackers

From Jeff Davis
Subject advance local xmin more aggressively
Date
Msg-id 1234296405.2450.18.camel@dell.linuxdev.us.dell.com
Whole thread Raw
Responses Re: advance local xmin more aggressively
Re: advance local xmin more aggressively
List pgsql-hackers
With the new snapshot maintenance code, it looks like we can advance the
xmin more aggressively.

For instance:

S1:
INSERT INTO foo VALUES(1);

S2:
BEGIN;
DECLARE c1 CURSOR FOR SELECT i FROM foo;

S1:
DELETE FROM foo;

S2:
DECLARE c2 CURSOR FOR SELECT i FROM foo;
CLOSE c1;

S1:
VACUUM VERBOSE foo;

The VACUUM should be able to clean up the deleted tuple, because it's no
longer visible to anyone.

Attached a small patch to accomplish this. I don't expect it to be put
in 8.4, but it's small enough that I thought I should at least send it
in just in case.

Regards,
    Jeff Davis

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Optimization rules for semi and anti joins
Next
From: Alvaro Herrera
Date:
Subject: Re: [COMMITTERS] pgsql: Update autovacuum to use reloptions instead of a system catalog,