Return-Path: postarch
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA01723; Tue, 11 Aug 92 14:59:36 -0700
Message-Id: <9208112159.AA01723@postgres.Berkeley.EDU>
From: postarch (Postgres Mailing Archive)
Subject: Re: HELP: mystery error message
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
Reply-To: mer@postgres.berkeley.edu
In-Reply-To: Your message of "Tue, 02 Jun 92 17:30:58 PDT."
             <9206030030.AA14670@postgres.Berkeley.EDU> 
Date: Tue, 11 Aug 92 14:58:16 PDT

you write:
> I am persistently getting the following message on a replace command (which i
 +mmediately
> follows another on a different table, but otherwise identical which always wo
 +rks):
> 
> WARN:Jun  2 17:28:53:heap_replace: (am)invalid otid
> 
> What does this mean??  Does it have something to do with transaction ids?  Wh
 +at can I
> do about it?

This has to do with non-functional updates.  What is happening is that your
replace query is causing postgres to try to update the same tuple twice.

It used to be the case that postgres would print a NOTICE saying that it
detected this condition, and it would only perform the first update.  Due to a
subtle change in the system non-functional updates suddenly started causing
an earlier check to fail, generating the above error message and aborting
the transaction.  In a nutshell once a tuple is updated in a transaction
it is thereafter seen as 'invalid' (even to the updating xact).

The validity test should not have precedence over the non-functional test,
and I have reversed the order of operations.  In 4.0.1 you will get the
NOTICE, and the xaction will be allowed to continue.


Jeff Meredith
mer@postgres.berkeley.edu
