Re: [HACKERS] drop table inside transactions

From: "Jose' Soares Da Silva" <sferac(at)bo(dot)nettuno(dot)it>
To: Jan Wieck <jwieck(at)debis(dot)com>
Cc: "Jose' Soares Da Silva" <sferac(at)proxy(dot)bazzanese(dot)com>, meskes(at)topsystem(dot)de, pgsql-hackers(at)postgreSQL(dot)org, pgsq-bugs(at)postgreSQL(dot)org
Subject: Re: [HACKERS] drop table inside transactions
Date: 1998-04-30 15:25:37
Message-ID: Pine.LNX.3.96.980430152124.431B-100000@proxy.bazzanese.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 30 Apr 1998, Jan Wieck wrote:

> >
> > On Fri, 17 Apr 1998, 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
> > Maybe you are right Michael, but there's another point; the table wasn't
> > removed, it is still there, only data are cancelled.
> > It's more, like a DELETE FROM ... not a DROP TABLE...
> > and, if another user inserts data into this dropped table,
> > the table returns with all data.
> > (Refer to my first bug-report on this matter),
> > and more; some times ROLLBACK restores both data and table structure. ;-)
>
> Partially right. The tables data file was removed at DROP
> TABLE. On the ROLLBACK, the pg_class and pg_type entries got
> restored and the storage manager created a new (empty) data
> file on the SELECT command after the ROLLBACK.
>
> Maybe we could setup an internal list of files to be deleted
> on the next transaction commit, so the files remain intact
> after ROLLBACK.

Great!

Remember that we have the same problem with CREATE DATABASE
in case of ROLLBACK will be removed references from "pg_database"
but directory $PGDATA/databasename will not be removed.
Jose'

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jose' Soares Da Silva 1998-04-30 15:36:00 Re: [INTERFACES] Access'97 and ODBC
Previous Message Bruce Momjian 1998-04-30 15:16:58 Re: [HACKERS] removing the exec() from doexec()