Re: Error: heap_mark4update: (am)invalid tid

From: "Steve Wolfe" <nw(at)codon(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Error: heap_mark4update: (am)invalid tid
Date: 2003-02-03 22:28:09
Message-ID: 002601c2cbd3$883afb60$88693fd1@WEASEL
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> > I'm receiving an error message that I'm not sure how to resolve:
> > heap_mark4update: (am)invalid tid . The offending query is:
>
> > "update a set active = 'f' where a.expires < 'now' and a.active = 't'
and
> > a.cart_id = b.cart_id"
>
> Hmm ... a plain UPDATE doesn't invoke heap_mark4update. Do you have any
> foreign keys involved here?

Yes, a.cart_id is a primary key, and b.cart_id references a.cart_id.

> > The error is a bit inconsistent. Doing a select with the saem
criteria
> > will work fine - but the select gives a few more rows in the result
than
> > the update will when it works. Often (but not always), vacuuming both
> > tables a and b will get the update to work - but again, not always.
>
> So once the error happens, it's persistent? That's pretty interesting.
> I'd have expected it to depend on concurrent activity ...

Once it's failed, it will kep failing until the vacuuming. Once, the
vacuum didn't fix the problem. On that occasion, doing the select (with
the same criteria) first, then the update *did* fix the problem. The
database is fully vacuumed nightly. It's only after rows have been
added.modified in a for a while that the problem crops up.

Again, if there's any more information I can offer, let me know.

steve

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jan Wieck 2003-02-03 22:29:26 Re: 335 times faster (!)
Previous Message Justin Clift 2003-02-03 22:06:25 Re: Printer setup