Re: Locking to restrict rowcounts.

From: "Shakil Shaikh" <sshaikh(at)hotmail(dot)com>
To: "Richard Huxton" <dev(at)archonet(dot)com>, "Glen Parker" <glenebob(at)nwlink(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Locking to restrict rowcounts.
Date: 2009-05-19 20:09:48
Message-ID: BAY117-DS2FA41FF1E6792B93F4E85AC5B0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

--------------------------------------------------
From: "Richard Huxton" <dev(at)archonet(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andy Colson 2009-05-19 20:10:14 Re: origins/destinations
Previous Message Glen Parker 2009-05-19 19:27:03 Re: Locking to restrict rowcounts.