Search Postgresql Archives

Re: Any justification for sequence table vs. native sequences?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bill Moran <wmoran@xxxxxxxxxxxxxxxxx> writes:
> And yes, it's pretty much guaranteed to be slower than built in sequences, with
> blocking when multiple threads want a sequence all at the same time.

It's also going to create a vacuum bottleneck unless the insert rate is
quite low, because each ID assignment will create another dead row in
the sequence management table.

> I'm rather concerned by the third column, as I'm not sure what his implementation
> approach is, and I'm concerned that he's using a home-brewed locking mechanism
> instead of using table locks.

Indeed, that looks a bit scary/pointless.  You could at least use
SELECT FOR UPDATE to lock the rows.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux