Re: BUG #14042: bug, PostgreSQL not cleanup temp table info after crash.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #14042: bug, PostgreSQL not cleanup temp table info after crash.
Дата
Msg-id 22423.1458828232@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #14042: bug, PostgreSQL not cleanup temp table info after crash.  (digoal@126.com)
Список pgsql-bugs
digoal@126.com writes:
> When PostgreSQL crashed during database have temp table, database not
> cleanup the temp table's info in pg_class.

This behavior is intentional.

> and there is some bad thing, if no one create the same name temp table after
> restart. this temp table will a zombie in pg_class, and vacuum freeze cann't
> reduce it's age and database's age.

This is not a problem, see the code in autovacuum.c:

                /*
                 * We found an orphan temp table (which was probably left
                 * behind by a crashed backend).  If it's so old as to need
                 * vacuum for wraparound, forcibly drop it.  Otherwise just
                 * log a complaint.
                 */

In practice, such tables will go away the next time some session uses the
temp schema containing them, so their lifespan isn't likely to be nearly
long enough for this code to activate.  But in any case, they won't create
a wraparound hazard.

            regards, tom lane

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

Предыдущее
От: "Reko Turja"
Дата:
Сообщение: Re: Missing rows with index scan when collation is not "C" (PostgreSQL 9.5);
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Re: Missing rows with index scan when collation is not "C" (PostgreSQL 9.5)