Locking vs. Exceptions

From: Robins <tharakan(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Locking vs. Exceptions
Date: 2006-11-02 12:45:53
Message-ID: 36af4bed0611020445s445e3fe8o344f529190a8dfea@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi,

The documentation says that function blocks with exceptions are far costlier
than without one.

So if I need to implement an INSTEAD OF trigger (after checking for unique
constraint violations) which way should I go ?

1. Get a table lock
2. Use 'Select ... For Update' (which could be used to lock only the desired
recordsets)
3. Use Exceptions

Any advice / experiences or even pointers would be helpful.

Thanks
Robins Tharakan

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Dave Dutcher 2006-11-02 14:25:27 Re: Query plan for "heavy" SELECT with "lite" sub-SELECTs
Previous Message Richard Huxton 2006-11-02 12:40:09 Re: Query plan for "heavy" SELECT with "lite" sub-SELECTs