Re: [GENERAL] drop/rename table and transactions

From: Adriaan Joubert <a(dot)joubert(at)albourne(dot)com>
To: Jaco de Groot <jaco(at)gospelsjop(dot)com>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] drop/rename table and transactions
Date: 1999-11-24 06:47:06
Message-ID: 383B89EA.564DF1EE@albourne.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jaco de Groot wrote:
>
> Hi,
>
> Every now and then I get the following error:
>
> cannot write block 0 of tablename [username] blind
>
> If this happens, all my database connections get this error when trying
> to access the database and I need to restart postgresql. The problem
> causing this error needs to be something like this:
>
> create table table2 (col1 text);
> insert into table2 (col1) values ('some data');
> begin work;
> drop table table1;
> alter table table2 rename to table1;
> commit;
>

I've seen the same problem. I found that if I always do a vacuum first,
it does not seem to happen. It is the 'alter table .. rename..' that
causes the problem for me.

BTW, are there any plans to implement the rest of the SQL '92 ALTER
TABLE stuff (deleting columns, changing constraints). I'm conjuring up
SQL to do this for my tables, but it is quite painful -- especially if
you have several indices and a SERIAL type in the table.

Adriaan

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kane Tao 1999-11-24 06:55:39 Re: [GENERAL] Re: Is PostgreSQL ready for mission critical applications?
Previous Message The Hermit Hacker 1999-11-24 05:25:00 Re: [GENERAL] Re: Is PostgreSQL ready for mission criticalapplications?