Re: Locking to restrict rowcounts. - Mailing list pgsql-general

From Shakil Shaikh
Subject Re: Locking to restrict rowcounts.
Date
Msg-id BAY117-DS2FA41FF1E6792B93F4E85AC5B0@phx.gbl
Whole thread Raw
In response to Locking to restrict rowcounts.  ("Shakil Shaikh" <sshaikh@hotmail.com>)
List pgsql-general
--------------------------------------------------
From: "Richard Huxton" <dev@archonet.com>
>
> Of course, if you're going to have a separate table then you might as well
> store the count in there and actually update it on every
> insert/update/delete. Assuming you might find the count of some use
> somewhere. Set the fill-factor for the lock table and HOT should prevent
> the table bloating too.
>

I think

PERFORM * FROM items WHERE owner = name FOR UPDATE;

sounds like it should work the best. What are the downsides for this that
would require the further table of counts? FWIW items has a SERIAL primary
key so FOR UPDATE should work on it.

Shak


pgsql-general by date:

Previous
From: Greg Smith
Date:
Subject: Re: Direct I/O and postgresql version
Next
From: Craig Ringer
Date:
Subject: Re: Get block of N numbers from sequence