Re: [HACKERS] Re: [GENERAL] drop/rename table and transactions

1999-11-29 Thread Tom Lane
Vadim Mikheev <[EMAIL PROTECTED]> writes: > So, no more nerves needed, Tom, yeh? -:) > It would be nice if someone else, not me, implement this... Um, I've got more than enough on my plate already... >> Can we make some sort of usually-correct-but-not-guaranteed-correct >> dump that shows which

Re: [HACKERS] Re: [GENERAL] drop/rename table and transactions

1999-11-29 Thread Vadim Mikheev
Tom Lane wrote: > > Bruce Momjian <[EMAIL PROTECTED]> writes: > >> I have to say that I'm going to change on-disk database/table/index > >> file names to _OID_! This is required by WAL because of inside of > >> log records there will be just database/table/index oids, not names, > >> and after cr

Re: [HACKERS] Re: [GENERAL] drop/rename table and transactions

1999-11-29 Thread Vadim Mikheev
Bruce Momjian wrote: > > > > > > > Wow, that is a major pain. Anyone else think so? > > > > Why it's so painful? > > We can write utility to construct database dir with table names > > symlinked to real table files -:) > > Actually, I don't understand > > for what would you need to know what is

Re: [HACKERS] Re: [GENERAL] drop/rename table and transactions

1999-11-28 Thread Bruce Momjian
> Bruce Momjian wrote: > > > > > I have to say that I'm going to change on-disk database/table/index > > > file names to _OID_! This is required by WAL because of inside of > > > log records there will be just database/table/index oids, not names, > > > and after crash recovery will not be able t

Re: [HACKERS] Re: [GENERAL] drop/rename table and transactions

1999-11-28 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: >> I have to say that I'm going to change on-disk database/table/index >> file names to _OID_! This is required by WAL because of inside of >> log records there will be just database/table/index oids, not names, >> and after crash recovery will not be a

Re: [HACKERS] Re: [GENERAL] drop/rename table and transactions

1999-11-28 Thread Vadim Mikheev
Bruce Momjian wrote: > > > I have to say that I'm going to change on-disk database/table/index > > file names to _OID_! This is required by WAL because of inside of > > log records there will be just database/table/index oids, not names, > > and after crash recovery will not be able to read pg_cl

Re: [HACKERS] Re: [GENERAL] drop/rename table and transactions

1999-11-28 Thread Vadim Mikheev
Mike Mascari wrote: > > Will that aid in fixing a problem such as this: > > session 1: > > CREATE TABLE example1(value int4); > BEGIN; > > session 2: > > BEGIN; > ALTER TABLE example1 RENAME TO example2; > > session 1: > > INSERT INTO example1 VALUES (1); > END; > NOTICE: Abort Transaction

Re: [HACKERS] Re: [GENERAL] drop/rename table and transactions

1999-11-28 Thread Bruce Momjian
> I have to say that I'm going to change on-disk database/table/index > file names to _OID_! This is required by WAL because of inside of > log records there will be just database/table/index oids, not names, > and after crash recovery will not be able to read pg_class to get > database/table/

Re: [HACKERS] Re: [GENERAL] drop/rename table and transactions

1999-11-28 Thread Mike Mascari
> Vadim Mikheev wrote: > Bruce Momjian wrote: > > > > > if PostgreSQL could successfully rollback DDL statements sanely (and thus > > > diverge from ORACLE). I guess I don't expect that to happen successfully > > > until > > > something the equivalent of TABLESPACES is implemented and there is a

Re: [HACKERS] Re: [GENERAL] drop/rename table and transactions

1999-11-28 Thread Vadim Mikheev
Bruce Momjian wrote: > > > if PostgreSQL could successfully rollback DDL statements sanely (and thus > > diverge from ORACLE). I guess I don't expect that to happen successfully > > until > > something the equivalent of TABLESPACES is implemented and there is a > > disassociation between table na

Re: [HACKERS] Re: [GENERAL] drop/rename table and transactions

1999-11-28 Thread Bruce Momjian
> if PostgreSQL could successfully rollback DDL statements sanely (and thus > diverge from ORACLE). I guess I don't expect that to happen successfully > until > something the equivalent of TABLESPACES is implemented and there is a > disassociation between table names, index names and their file

Re: [HACKERS] Re: [GENERAL] drop/rename table and transactions

1999-11-28 Thread Jaco de Groot
Mike Mascari wrote: > > >From an otherwise EXTREMELY happy user :-) (full smile...), I see 3 > scenarios: > > (1) Disallow DDL statements in transactions > (2) Send NOTICE's asking for the user to not trigger the bug until the bugs > can be fixed -or- > (3) Have all DDL statements implicity comm

Re: [GENERAL] drop/rename table and transactions

1999-11-28 Thread Jaco de Groot
> Is it possible to achieve your goals by using things like > "delete * from table1 where id!=stuffIwant" instead of dropping it? Yes, I think I better use delete statements instead of drop statements knowing PostgreSQL can't always handle drop/rename statements in transactions correctly. Jaco d

[GENERAL] drop/rename table and transactions

1999-11-22 Thread Jaco de Groot
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: