Skip site navigation (1) Skip section navigation (2)

Re: Table rewrites vs. pending AFTER triggers

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Table rewrites vs. pending AFTER triggers
Date: 2008-01-03 15:57:51
Message-ID: 477D05FF.8080409@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
>   
>>> On Tue, 2008-01-01 at 16:09 -0500, Tom Lane wrote:
>>>       
>>>> Paranoia would
>>>> suggest forbidding *any* form of ALTER TABLE when there are pending
>>>> trigger events, but maybe that's unnecessarily strong.
>>>>         
>
>   
>> I disagree.  This is an implementation limitation, so it makes sense to
>> try to restrict the user as least as possible.
>>     
>
> There's a tradeoff here between security, flexibility, and the amount of
> work we want to put into it.  At the moment it's not clear to me that
> it's worth spending the amount of work that would be needed to determine
> which forms of ALTER TABLE are "safe" in this connection.  If you're
> feeling hot about it, feel free to do the legwork.
>
> (A precedent is that all forms of ALTER TABLE take exclusive lock,
> which is more or less the same thing for the cross-backend case.
> There's been occasional discussion of whether some forms could
> take lesser locks, but never enough interest to make it happen.)
>
> 	
>   

I'd still like to see a sane use case. The other thing being traded off 
is possibly simplicity.

cheers

andrew

In response to

pgsql-hackers by date

Next:From: Robert LorDate: 2008-01-03 16:08:12
Subject: Re: EXPLAIN ANALYZE printing logical and hardware I/O per-node
Previous:From: Doug KnightDate: 2008-01-03 15:57:41
Subject: Tuning Postgresql on Windows XP Pro 32 bit

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group