Re: [GENERAL] Table modifications with dependent views - best practices?

2005-04-24 Thread David Roussel
So I have a scenario in which account creation at the application layer generates a set of tables and indexes. The tables created have foreign keys to tables in use (and frequently read from and written to) by the rest of the application. Occasionally I was getting deadlocks, and this definitel

Re: [GENERAL] Table modifications with dependent views - best practices?

2005-04-23 Thread Thomas F.O'Connell
So I have a scenario in which account creation at the application layer generates a set of tables and indexes. The tables created have foreign keys to tables in use (and frequently read from and written to) by the rest of the application. Occasionally I was getting deadlocks, and this definitel

Re: [GENERAL] Table modifications with dependent views - best practices?

2005-04-23 Thread Michael Fuhr
On Sat, Apr 23, 2005 at 10:36:00AM -0500, Thomas F.O'Connell wrote: > > Why would DDL statements in a transaction cause deadlocks? I understand > the prevention of concurrent access, but I'm curious to know more about > how deadlocks arise in this situation, as this is something I've seen > in a

Re: [GENERAL] Table modifications with dependent views - best practices?

2005-04-23 Thread Thomas F . O'Connell
Why would DDL statements in a transaction cause deadlocks? I understand the prevention of concurrent access, but I'm curious to know more about how deadlocks arise in this situation, as this is something I've seen in a production environment during transactional DDL traffic. Why would DDL state

Re: [GENERAL] Table modifications with dependent views - best

2005-04-22 Thread Tom Lane
Bruno Wolff III <[EMAIL PROTECTED]> writes: > I wasn't able to find where this is spelled out in the documentation, > but I believe all DDL commands except DROP DATABASE can be rolled back now. I don't think there's any all-in-one-place statement about it, but anything that doesn't explicitly obje

Re: [GENERAL] Table modifications with dependent views - best

2005-04-22 Thread Bruno Wolff III
On Fri, Apr 22, 2005 at 11:34:29 +0100, David Roussel <[EMAIL PROTECTED]> wrote: > > > I usually put DDL statements in a transaction, for a couple of > > reasons: so that a mistake doesn't leave me with half-done work > > (any error will cause the entire transaction to roll back), and to > > mak

Re: [GENERAL] Table modifications with dependent views - best practices?

2005-04-22 Thread Michael Fuhr
On Fri, Apr 22, 2005 at 11:34:29AM +0100, David Roussel wrote: > > > I usually put DDL statements in a transaction, for a couple of > > reasons: so that a mistake doesn't leave me with half-done work > > (any error will cause the entire transaction to roll back), and to > > make the changes atomic

Re: [GENERAL] Table modifications with dependent views - best

2005-04-22 Thread David Roussel
> I usually put DDL statements in a transaction, for a couple of > reasons: so that a mistake doesn't leave me with half-done work > (any error will cause the entire transaction to roll back), and to > make the changes atomic for the benefit of other transactions. Can you do that in postgres? Wi

Re: [GENERAL] Table modifications with dependent views - best practices?

2005-04-21 Thread Michael Fuhr
On Thu, Apr 21, 2005 at 09:24:49PM -0500, John Browne wrote: > > Ok, I've been using postgres for a-while now, and am curious how you > guys handle this. What is the best way to make modifications to > tables that have lots of dependent objects, like views? Do you just > do the obvious drop...cas

[GENERAL] Table modifications with dependent views - best practices?

2005-04-21 Thread John Browne
Ok, I've been using postgres for a-while now, and am curious how you guys handle this. What is the best way to make modifications to tables that have lots of dependent objects, like views? Do you just do the obvious drop...cascade and manually re-create your views? Do you keep your "create view"