[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pgsql-bugs
Subject:    Re: [BUGS] BUG #11088: posgres blocks when i don't commit
From:       Kevin Grittner <kgrittn () ymail ! com>
Date:       2014-07-29 18:55:15
Message-ID: 1406660115.91306.YahooMailNeo () web122303 ! mail ! ne1 ! yahoo ! com
[Download RAW message or body]

"guido@sofer.com.ar" <guido@sofer.com.ar> wrote:

> I have one table 'TABLE' with a column 'COLUMN' and
> 'COLUMN' is a primary key
>
> I have two processes 'proc1' and 'proc2'
>
> proc1 inserts a row in 'TABLE' with 'A' in the column
> 'COLUMN'...
> AND IT DOESNT COMMIT
>
> proc2 tries to insert a row with 'A' in the column 'COLUMN'
>
> What happens is that posgres simply don't respond (not an error,
> nothing happens)
>
> Is that normal?

Yes, that is expected, because until proc1 commits or rolls back it
is unknown whether the attempt by proc2 is an error.  If proc1
rolls back or otherwise fails before commit, it is OK for proc2 to
insert that row; otherwise the attempt is an error.

Details here:

http://www.postgresql.org/docs/current/interactive/mvcc.html

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic