From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: Improvement of procArray.xmin for VACUUM |
Date: | 2007-03-23 21:13:14 |
Message-ID: | 20070323211314.GD4507@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Bruce Momjian wrote:
> The attached patch updates procArray.xmin in this manner. Here is an
> example of how the patch improves dead row reuse:
I don't think this really works. Consider what happens if I change
session 2 this way:
> Session #:
> 1 2 3
>
> CREATE TABLE test(x int);
> INSERT INTO test VALUES (1);
> BEGIN;
> DELETE FROM test;
> BEGIN;
DECLARE foo CURSOR FOR
SELECT * FROM test;
> SELECT 1;
> COMMIT;
> VACUUM VERBOSE test;
> (row not reused)
> SELECT 1;
FETCH * FROM foo;
>
> (At this point #2 doesn't see
> the test row anymore. Patch
> updates procArray.xmin.)
>
> VACUUM VERBOSE test;
> (row reused with patch)
> COMMIT;
> VACUUM VERBOSE test;
> (normal row reuse)
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-03-23 21:35:01 | Re: Improvement of procArray.xmin for VACUUM |
Previous Message | Bruce Momjian | 2007-03-23 21:02:41 | Improvement of procArray.xmin for VACUUM |