> > 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