Re: Problem with dropping a tablespace

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Problem with dropping a tablespace
Дата
Msg-id 11666.1123000960@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Problem with dropping a tablespace  (Oliver Siegmar <o.siegmar@vitrado.de>)
Ответы Re: Problem with dropping a tablespace  (Oliver Siegmar <o.siegmar@vitrado.de>)
Список pgsql-general
Oliver Siegmar <o.siegmar@vitrado.de> writes:
> On Tuesday 02 August 2005 17:01, Michael Fuhr wrote:
>> Hmmm...based on the file names, it looks like the directory contains
>> only system tables.  Do you know what database this was?

> Yes, a business database - not a system one. The database were created using
> template0.

>> Did you explicitly drop it, or is its disappearance (or appearance) a
>> mystery?

> I dropped the database with 'DROP DATABASE xxx;' without any problems (after
> the tablespace run out of space).

How exactly do you know that OID 595675173 is the database you dropped,
and not that of some other DB?

I'm theorizing that the scenario went like this:

    CREATE DATABASE starts to create a database, for which it
    assigns the OID 595675173.

    Copying the template database goes fine.  (If we'd run out of
    space in this step, we'd have removed the partially copied
    directories before reporting failure.)

    While trying to make the pg_database entry for the new database,
    we run out of space and fail.

There isn't any provision for removing the copied data if we fail at
late stages of the CREATE process :-(.  I'm not sure it's possible to
plug this hole completely, but we could at least catch any error up
to the end of createdb() by wrapping all that code in a
PG_TRY/PG_RECOVER block.  With the recent shared dependency patch,
our exposure to an out-of-space failure at this stage has gone up by
orders of magnitude because so many more catalog rows need to be added.

            regards, tom lane

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

Предыдущее
От: "Wang, Mary Y"
Дата:
Сообщение: Re: Unable to Update a Record
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Slow Inserts on 1 table?