Re: [HACKERS] Transactional DDL, but not Serializable

2011-03-25 Thread Darren Duncan
Tom Lane wrote: Stephen Frost writes: * Tom Lane (t...@sss.pgh.pa.us) wrote: Well, basically, you can't have that. Example: you have an existing table with primary key, and while you're in the middle of doing some long transaction, somebody else creates a table with a foreign-key reference to

Re: [HACKERS] Transactional DDL, but not Serializable

2011-03-25 Thread Tom Lane
Stephen Frost writes: > * Tom Lane (t...@sss.pgh.pa.us) wrote: >> Well, basically, you can't have that. Example: you have an existing >> table with primary key, and while you're in the middle of doing some >> long transaction, somebody else creates a table with a foreign-key >> reference to the o

Re: [HACKERS] Transactional DDL, but not Serializable

2011-03-25 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > Well, basically, you can't have that. Example: you have an existing > table with primary key, and while you're in the middle of doing some > long transaction, somebody else creates a table with a foreign-key > reference to the one you're about to do a delet

Re: [HACKERS] Transactional DDL, but not Serializable

2011-03-25 Thread Tom Lane
Stephen Frost writes: > Sorry, that obviously didn't come across clearly (I think I've just been > talking to Kevin far too much). > I'm not interested in making them serializable. I'd like to not have > tables randomly appear during a serializable transaction. Well, basically, you can't have t

Re: [HACKERS] Transactional DDL, but not Serializable

2011-03-25 Thread Stephen Frost
* Joshua Berkus (j...@agliodbs.com) wrote: > That seemed unnecessary. Whether or not you approve of Stephen's solution, > he is dealing with a real issue. The solution felt, to me at least, to have a lot of parallel to an index's indcheckxmin. We've dealt with this issue there and have a preced

Re: [HACKERS] Transactional DDL, but not Serializable

2011-03-25 Thread Joshua Berkus
> Making DDL serializable is *not* simple, and half-baked hacks won't > make that situation better ... That seemed unnecessary. Whether or not you approve of Stephen's solution, he is dealing with a real issue. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com San Francisco -- Sen

Re: [HACKERS] Transactional DDL, but not Serializable

2011-03-25 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > Making DDL serializable is *not* simple, and half-baked hacks won't > make that situation better ... Sorry, that obviously didn't come across clearly (I think I've just been talking to Kevin far too much). I'm not interested in making them serializable. I

Re: [HACKERS] Transactional DDL, but not Serializable

2011-03-25 Thread Tom Lane
Stephen Frost writes: > I don't believe fixing this would be terribly difficult and, I > believe, would be similar to what we've done else where (eg: with > indexes)- basically, add a column to pg_class with the 'createdxmin' > and then compare that against our transaction whenever we're d

[HACKERS] Transactional DDL, but not Serializable

2011-03-25 Thread Stephen Frost
Greetings, We have a curious situation, consider this: Process 1: BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; CRETE TABLE table1 (i integer); INSERT INTO table1 VALUES (13); Process 2: BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; CREATE TABLE table2 (