Re: Corner case for add_path_precheck

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Antonin Houska <ah(at)cybertec(dot)at>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Corner case for add_path_precheck
Date: 2015-02-11 22:33:36
Message-ID: 14739.1423694016@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Antonin Houska <ah(at)cybertec(dot)at> writes:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Antonin Houska <ah(at)cybertec(dot)at> writes:
>>> The special case is that the path passed to add_path_precheck() has costs
>>> *equal to* those of the old_path. If pathkeys, outer rells and costs are the
>>> same, as summarized in the comment above, I expect add_path_precheck() to
>>> return false. Do I misread anything?

>> It does, so I don't see your point?

> Just that pre-check is - in this special (and very rare?) case - more
> stringent than the proper check would be.

It's assuming that a nonzero amount of cost will be added on before the
real check happens. Even if none was added, discarding the new path is
the way we'd break the tie that would result, so I still don't see your
point.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Anastasia Lubennikova 2015-02-11 22:50:57 Index-only scans for GiST.
Previous Message Antonin Houska 2015-02-11 22:20:35 Re: Corner case for add_path_precheck