Tom Lane wrote:
Heikki Linnakangas <[EMAIL PROTECTED]> writes:
I was about to resubmit the phantom command ids patch for review, as I noticed a little problem.

In fmgr.c in record_C_func, we cache the xmin and cmin, and later in lookup_C_func we check that they match to determine if the cached information is still valid. With phantom command ids, the cmin is not valid outside the inserting transaction, which makes it unusable for that purpose.

I think that actually that's just belt-and-suspenders programming;
it should be sufficient to compare tuple TID and xmin.  AFAICS a single
transaction cannot fill the same TID twice, since VACUUM would never
dare remove a tuple entered by a still-in-progress transaction.  So the
cmin check doesn't seem necessary.

We don't currently use tid in the up-to-dateness check. Just Oid, xmin and cmin. Good point, tid would work. I'll change it do that in the patch.

  Heikki Linnakangas

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not

Reply via email to