Re: existing row not found by SELECT ... WHERE CTID = ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Matthias Apitz <guru(at)unixarea(dot)de>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: existing row not found by SELECT ... WHERE CTID = ?
Date: 2022-05-24 14:47:11
Message-ID: 1544722.1653403631@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Matthias Apitz <guru(at)unixarea(dot)de> writes:
> We have a C-written program, written in ESQL/C, of our LMS where the logic
> crawls with FETCH through a hit list and does UPDATE on some rows which
> match certain condition. This works fine for thousands of rows every night,
> but magically sometimes it fails.

Maybe something else already updated the row since the cursor was opened?
That would change its CTID.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2022-05-24 15:27:04 Re: Can I start Update row in After Insert trigger function?
Previous Message Matthias Apitz 2022-05-24 14:44:15 existing row not found by SELECT ... WHERE CTID = ?