vacuum does not reclaim rows

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема vacuum does not reclaim rows
Дата
Msg-id 20030706.000039.78704633.t-ishii@sra.co.jp
обсуждение исходный текст
Ответы Re: vacuum does not reclaim rows  (Kurt Roeckx <Q@ping.be>)
Re: vacuum does not reclaim rows  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

Does anybody know why vacuum full does not relcaim deleted rows if a
open transaction which started before the deletion happens is running
even on a different database?

Here is an example:

T1: psql db1
T2: psql db2
T3: psql db2

T2: create table t1(i int); insert into t1 values(1);
T1: begin;
T2: delete from t1;
T3: vacuum full t1;

here vacuum will not reclaim deleted rows.

While tracking this, I found that GetOldestXmin(false) checks the
database id correctly:
 if (allDbs || proc->databaseId == MyDatabaseId)

but after that it checks proc->xmin, where xmin may not be running on
the same database. I wonder if this is correct or not. Maybe we should
make sure that xmin is running on the same database if GetOldestXmin()
is called with its arg being set false? This is PostgreSQL 7.3.3.
--
Tatsuo Ishii


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: Re: How to submit Tsearch V2 ?
Следующее
От: Kurt Roeckx
Дата:
Сообщение: Re: vacuum does not reclaim rows