Re: [GENERAL] How to speed up Exclusive Locking

2006-12-05 Thread Tom Lane
David Goodenough <[EMAIL PROTECTED]> writes: > The statements issued to lock each table is:- > LOCK TABLE table IN EXCLUSIVE MODE; SELECT 1 FROM table; > (I am not quite sure why the SELECT 1 FROM table is there, it came with > HA-JDBC as the code for the Postgresql dialect). > I notice that this

Re: [GENERAL] How to speed up Exclusive Locking

2006-12-05 Thread David Goodenough
On Tuesday 05 December 2006 12:03, Richard Huxton wrote: > David Goodenough wrote: > > On Tuesday 05 December 2006 10:57, Bernd Helmle wrote: > >> On Tue, 5 Dec 2006 10:18:21 +, David Goodenough > >> > >> <[EMAIL PROTECTED]> wrote: > >>> The statements issued to lock each table is:- > >>> LOCK

Re: [GENERAL] How to speed up Exclusive Locking

2006-12-05 Thread Richard Huxton
David Goodenough wrote: On Tuesday 05 December 2006 10:57, Bernd Helmle wrote: On Tue, 5 Dec 2006 10:18:21 +, David Goodenough <[EMAIL PROTECTED]> wrote: The statements issued to lock each table is:- LOCK TABLE table IN EXCLUSIVE MODE; SELECT 1 FROM table; So why selecting '1' for each r

Re: [GENERAL] How to speed up Exclusive Locking

2006-12-05 Thread David Goodenough
On Tuesday 05 December 2006 10:57, Bernd Helmle wrote: > On Tue, 5 Dec 2006 10:18:21 +, David Goodenough > <[EMAIL PROTECTED]> wrote: > > [...] > > > The first bits of the sync are done without locking the source tables, > > and I do these until I find less than some suitable threshold of recor

Re: [GENERAL] How to speed up Exclusive Locking

2006-12-05 Thread Bernd Helmle
On Tue, 5 Dec 2006 10:18:21 +, David Goodenough <[EMAIL PROTECTED]> wrote: [...] > The first bits of the sync are done without locking the source tables, and > I do these until I find less than some suitable threshold of records > needing > to be updated. Then I lock the source tables and

[GENERAL] How to speed up Exclusive Locking

2006-12-05 Thread David Goodenough
I have an application running on a Tomcat cluster talking to a cluster of Postgresql DBs using HA-JDBC. If one of the members drop out of the cluster it is necessary to get that member back into sync with the rest of the cluster, and I have an application specific piece of code that does that. Al