Re: Row locking during UPDATE

Поиск
Список
Период
Сортировка
От David F. Skoll
Тема Re: Row locking during UPDATE
Дата
Msg-id Pine.LNX.4.58.0309120952220.2270@shishi.roaringpenguin.com
обсуждение исходный текст
Ответ на Re: Row locking during UPDATE  (Andrew Sullivan <andrew@libertyrms.info>)
Ответы Re: Row locking during UPDATE  (Andrew Sullivan <andrew@libertyrms.info>)
Список 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 по дате отправления:

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: Row locking during UPDATE
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg 7.3.4 and linux box crash