Re: How to speed up Exclusive Locking

From: David Goodenough <david(dot)goodenough(at)btconnect(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to speed up Exclusive Locking
Date: 2006-12-05 11:43:31
Message-ID: 200612051143.32089.david.goodenough@btconnect.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tuesday 05 December 2006 10:57, Bernd Helmle wrote:
> On Tue, 5 Dec 2006 10:18:21 +0000, David Goodenough
> <david(dot)goodenough(at)btconnect(dot)com> 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 do the final sync.
> >
> > The statements issued to lock each table is:-
> > LOCK TABLE table IN EXCLUSIVE MODE; SELECT 1 FROM table;
>
> So why selecting '1' for each row after locking the relation before? I
> don't know HA-JDBC but this looks really useless. Remove the SELECT and use
> the LOCK TABLE command within the transaction which does the sync for you.
I will give it a try.
>
> Bernd
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2006-12-05 11:57:20 Re: iplike.so access denied help!!
Previous Message Peter Bauer 2006-12-05 11:26:11 Timestamps