Re: Improvement of procArray.xmin for VACUUM
| От | Alvaro Herrera |
|---|---|
| Тема | Re: Improvement of procArray.xmin for VACUUM |
| Дата | |
| Msg-id | 20070323211314.GD4507@alvh.no-ip.org обсуждение |
| Ответ на | Improvement of procArray.xmin for VACUUM (Bruce Momjian <bruce@momjian.us>) |
| Список | 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.
В списке pgsql-patches по дате отправления: