Re: BUG #2166: attempted to update invisible tuple - Mailing list pgsql-bugs

From Euler Taveira de Oliveira
Subject Re: BUG #2166: attempted to update invisible tuple
Date
Msg-id 20060112122124.98787.qmail@web32704.mail.mud.yahoo.com
Whole thread Raw
In response to Re: BUG #2166: attempted to update invisible tuple  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #2166: attempted to update invisible tuple
List pgsql-bugs
--- Tom Lane <tgl@sss.pgh.pa.us> escreveu:

> "Euler Taveira de Oliveira" <eulerto@yahoo.com.br> writes:
> > I just execute the same transaction in 2 different backends and I
> got the
> > message: 'attempted to update invisible tuple'.
>
> If you want this investigated then you'll need to provide a
> self-contained example.  We have other things to do than guess about
> the contents of your database...
>
Sorry for that. I didn't have the data yet. Some data to test it is in:
http://www.timbira.com/tst2.sql.gz

In 8.0 and previous I didn't reproduce it. Is it something related to
UPDATE ... FROM patch that I submitted?

I just execute the same transaction in 2 different backends and I got
the message: 'attempted to update invisible tuple'. In the first
transaction I execute: BEGIN - UPDATE and then open the other
transaction and execute: BEGIN - UPDATE so I commit the first one and
got that message.

========== first transaction =========================
tst=# begin;
BEGIN
tst=# update produtos set estoque = estoque - itensmov.qtde from
itensmov
where trim(itensmov.codigo) = 'C0001' and itensmov.fk_produto =
produtos.id_produto and produtos.controlarestoque = 'S';
UPDATE 21
tst=# commit;
COMMIT
tst=#
========== first transaction =========================

========== second transaction ========================
tst=# begin;
BEGIN
tst=# update produtos set estoque = estoque - itensmov.qtde from
itensmov
where trim(itensmov.codigo) = 'C0003' and itensmov.fk_produto =
produtos.id_produto and produtos.controlarestoque = 'S';
ERRO:  attempted to update invisible tuple
tst=#
========== second transaction ========================


Euler Taveira de Oliveira
euler[at]yahoo_com_br








_______________________________________________________
Yahoo! doce lar. Faça do Yahoo! sua homepage.
http://br.yahoo.com/homepageset.html

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol
Next
From: "F. Laupretre"
Date:
Subject: Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol