Re: [HACKERS] drop table inside transactions

From: ocie(at)paracel(dot)com
To: meskes(at)topsystem(dot)de (Meskes, Michael)
Cc: sferac(at)proxy(dot)bazzanese(dot)com, pgsql-hackers(at)postgreSQL(dot)org, pgsq-bugs(at)postgreSQL(dot)org, sferac(at)bo(dot)nettuno(dot)it
Subject: Re: [HACKERS] drop table inside transactions
Date: 1998-04-17 17:44:43
Message-ID: 9804171744.AA27696@dolomite.paracel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Meskes, Michael wrote:
>
> Is this really a bug? I haven't seen any (commercial) system supporting
> this kind of transaction recovery. Once you drop a table the data is
> lost, no matter if you rollback or not.
>
> Michael

I tend to agree. Sybase will not even honor a drop table request
inside a transaction:

1> begin tran
2> go
1> drop table foo
2> go
Msg 2762, Level 16, State 4:
Line 1:
The 'DROP TABLE' command is not allowed within a multi-statement transaction in
the 'ociedb' database.
1>

We _could_ do something like check a "deleted" flag in the relation
and postpone the actual delete until the transaction is committed, but
at least in my experience, changing table structure is usually best
left to human admins as opposed to applications. Rows change but the
basic table structure stays the same until the application and schema
are changed.

Ocie

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1998-04-17 18:00:18 Re: [HACKERS] Proposal for async support in libpq
Previous Message Tom Lane 1998-04-17 17:05:37 Proposal for async support in libpq