Search Postgresql Archives

Re: table insert/primary key question

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

 



Scot Kreienkamp wrote:
> I have a table like so:
> 
> Receiptlimitid: BIGINT (Primary Key)
> Profitcenterid: BIGINT
> Receiptnumber: INTEGER
> 
> All are set to Not Null also.
> 
> 
> My question is, if I have an insert that goes idle in transaction for a while before it commits, will
> it stop all other inserts from happening on the table?  If so, is that because of the possible
> violation of the primary key by the following pending inserts?  Just trying to confirm the behavior
> I'm seeing and make sure I understand what's going on.

Other INSERTs shouldn't be blocked unless you try to insert
a record with the same primary key as the one in the open transaction.

If you experience any such problems, check pg_locks for what's
going on.  Are there any foreign keys involved?

Yours,
Laurenz Albe

-- 
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