Re: TABLESAMPLE patch is really in pretty sad shape

From: Petr Jelinek <petr(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: TABLESAMPLE patch is really in pretty sad shape
Date: 2015-07-23 23:26:45
Message-ID: 55B17835.5010006@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2015-07-24 00:39, Tom Lane wrote:
> I wrote:
>> OK, so "InitSampleScan" for a function called at ExecInitSampleScan time
>> (which we might as well make optional), and then we'll use BeginSampleScan
>> for the function that gets the parameters. The restart/ReScan function
>> goes away since BeginSampleScan will take its place.
>
> Here's a WIP patch implementing things this way. I've also taken the time
> to do a complete code review, and fixed quite a large number of things,
> some cosmetic and some not so much. I have not yet touched the tsm
> contrib modules (so they won't even compile...), but I'm reasonably happy
> with the state of the core code now.
>

Eh, I was just writing email with my rewrite :)

I'll do review of this instead then.

The only major difference that I see so far and I'd like you to
incorporate that into your patch is that I renamed the SampleScanCost to
SampleScanGetRelSize because that reflects much better the use of it, it
isn't really used for costing, but for getting the pages and tuples of
the baserel.

--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Petr Jelinek 2015-07-23 23:55:55 Re: TABLESAMPLE patch is really in pretty sad shape
Previous Message Tatsuo Ishii 2015-07-23 23:11:34 Re: Planner debug views