Re: Row locking during UPDATE - Mailing list pgsql-admin

From David F. Skoll
Subject Re: Row locking during UPDATE
Date
Msg-id Pine.LNX.4.58.0309120952220.2270@shishi.roaringpenguin.com
Whole thread Raw
In response to Re: Row locking during UPDATE  (Andrew Sullivan <andrew@libertyrms.info>)
Responses Re: Row locking during UPDATE
List pgsql-admin
On Fri, 12 Sep 2003, Andrew Sullivan wrote:

> More or less, yes.  The significant part here is that the postmaster
> won't notice that the client is gone until it returns from the work
> it was trying to do.  It'll eventually come back, but it'll take some
> time.  How low does your contention need to be?

Low, low, low... near real-time response is required.

> If you're going to summarise anyway, why not just always insert into
> a "holding" table, and then periodically (infrequently, though)
> select out of there and summarise at that point.

This is the solution I picked (thanks to Tom Lane) and it seems to work
well.

> Note that if you do
> this very frequently, and you have also to select the summary data,
> it won't work (as I have learned from painful experience) because
> the holding table will gradually build up a lot of dead tuples.

That doesn't seem to be a problem; after the summary, I do a
VACUUM and the holding table seems to shrink down nicely.

Regards,

David.

pgsql-admin by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: Row locking during UPDATE
Next
From: Tom Lane
Date:
Subject: Re: pg 7.3.4 and linux box crash