Re: Transaction, Rollback and Database Corruption question,
| От | Tom Lane |
|---|---|
| Тема | Re: Transaction, Rollback and Database Corruption question, |
| Дата | |
| Msg-id | 5013.974851819@sss.pgh.pa.us обсуждение |
| Ответ на | Transaction, Rollback and Database Corruption question, (Joe Kislo <kislo@athenium.com>) |
| Список | pgsql-general |
Joe Kislo <kislo@athenium.com> writes:
> Well, I never issue a drop table. I issue a CREATE TABLE, I issue some
> inserts.. then I TERMINATE the database connection. Implicit rollback
> should uncreate the table and leave everything consistent.
Oh, wait, you're running 7.0.2 aren't you? Update to 7.0.3, it'll get
better. 7.0.2 forgets to run the transaction-abort cleanup routine if
the client disconnects mid-transaction. The database itself is fine,
but the action of deleting the no-longer-referenced table files doesn't
get done.
> If I terminate a large set of create
> tables and inserts in the middle.. and I try again, I get this error
> spewing from the server:
> FATAL 1: my bits moved right off the end of the world!
> Recreate index pg_attribute_relid_attnam_index.
We've heard sporadic reports of this, but I've never been able to
reproduce it myself. If you can submit a reproducible test script,
it'd be a big help.
> Oh, one more thing. How do I, using SQL, determine if a table exists?
> EG, in Mysql it's something like:
> show tables like 'MyTable';
> In Interbase you select it out of the RDBS$RELATIONS table...
In PG you look for its entry in pg_class. What, you wanted a standard ;-) ?
regards, tom lane
В списке pgsql-general по дате отправления: