Search Postgresql Archives

Re: Basic locking question

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

 



Right, I understand the badness of the situation, but unfortunately the keys are externally generated and I have no control over them.

So I'm looking for "lock <tablename> in exclusive mode"?

Tom Lane wrote:

Pretty much the only thing you can do about that is to take an exclusive
table-level lock.  This is simple but pretty awful for concurrency
(since the lock blocks everyone else from inserting ANY key, not only
the one you are inserting).

Consider using a sequence object to generate the keys, instead.

			regards, tom lane


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not
      match

[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