Temporary table failed to drop after power failure

Поиск
Список
Период
Сортировка
От Gnanakumar
Тема Temporary table failed to drop after power failure
Дата
Msg-id 006f01cbe21f$35a217b0$a0e64710$@com
обсуждение исходный текст
Ответы Re: Temporary table failed to drop after power failure  ("Gnanakumar" <gnanam@zoniac.com>)
Список pgsql-admin
Hi,

We're using PostgreSQL v8.2.3.  Ours is a web-based application, language is
Java and we're using pgpool-II v 2.0.1 purely for connection pooling (we
don't use other features of pgpool like Replication, Load Balancing, etc.).

We're creating temporary table using "CREATE TEMP TABLE FOO(col1, col2,
...)" and it's being heavily used in one of our application report.  When
the report was still running, suddenly there was a power failure and
PostgreSQL was stopped abruptly without proper shutdown.  Now, if run the
following system catalog queries, I can see that those temporary tables were
not dropped really:

1) SELECT schemaname, tablename, pg_size_pretty(size) AS size_pretty,
pg_size_pretty(total_size) AS total_size_pretty FROM (SELECT *,
pg_relation_size(schemaname||'.'||tablename) AS size,
pg_total_relation_size(schemaname||'.'||tablename) AS total_size FROM
pg_tables where tablename = 'foo') AS TABLES ORDER BY total_size DESC;

2) select * from pg_stat_user_tables where relname = 'foo';

Now, how do I fix/handle in this situation?

Although this happened within our staging environment, I look forward to
experts advice/recommendation before I conclude anything.

Regards,
Gnanam



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

Предыдущее
От: "Gnanakumar"
Дата:
Сообщение: Re: PSQLException: ERROR: could not open relation with OID xxxx
Следующее
От: Lukasz Brodziak
Дата:
Сообщение: Dropping all constraints in database