Re: BUG #11088: posgres blocks when i don't commit

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: "guido(at)sofer(dot)com(dot)ar" <guido(at)sofer(dot)com(dot)ar>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #11088: posgres blocks when i don't commit
Date: 2014-07-29 18:55:15
Message-ID: 1406660115.91306.YahooMailNeo@web122303.mail.ne1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"guido(at)sofer(dot)com(dot)ar" <guido(at)sofer(dot)com(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2014-07-29 18:58:59 Re: BUG #11090: Unclear error message in pg_upgrade
Previous Message brorfred 2014-07-29 17:40:23 BUG #11090: Unclear error message in pg_upgrade