Locking vs. Exceptions - Mailing list pgsql-performance

From Robins
Subject Locking vs. Exceptions
Date
Msg-id 36af4bed0611020445s445e3fe8o344f529190a8dfea@mail.gmail.com
Whole thread Raw
Responses Re: Locking vs. Exceptions
List 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

pgsql-performance by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Query plan for "heavy" SELECT with "lite" sub-SELECTs
Next
From: "Dave Dutcher"
Date:
Subject: Re: Query plan for "heavy" SELECT with "lite" sub-SELECTs