Re: TABLESAMPLE patch

From: Petr Jelinek <petr(at)2ndquadrant(dot)com>
To: Jaime Casanova <jaime(at)2ndquadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Tomas Vondra <tv(at)fuzzy(dot)cz>
Subject: Re: TABLESAMPLE patch
Date: 2014-12-22 20:21:58
Message-ID: 54987D66.9090107@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 22/12/14 20:14, Jaime Casanova wrote:
> On Thu, Dec 18, 2014 at 7:14 AM, Petr Jelinek <petr(at)2ndquadrant(dot)com> wrote:
>> Hi,
>>
>> v2 version of this patch is attached.
>>
>
> a few more tests revealed that passing null as the sample size
> argument works, and it shouldn't.

Fixed.

> in repeatable it gives an error if i use null as argument but it gives
> a syntax error, and it should be a data exception (data exception --
> invalid repeat argument in a sample clause) according to the standard

Also fixed.

>
> also you need to add CHECK_FOR_INTERRUPTS somewhere, i tried with a
> big table and had to wait a long time for it to finish

Ah yeah, I can't rely on CHECK_FOR_INTERRUPTS in ExecScan because it
might take a while to fetch a row if percentage is very small and table
is big... Fixed.

Attached is v3 which besides the fixes mentioned above also includes
changes discussed with Tomas (except the CREATE/DROP TABLESAMPLE
METHOD), fixes for crash with FETCH FIRST and is rebased against current
master.

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

Attachment Content-Type Size
tablesample-v3.patch text/x-diff 100.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christoph Berg 2014-12-22 20:26:39 Re: TAP test breakage on MacOS X
Previous Message Atri Sharma 2014-12-22 19:40:26 Re: Final Patch for GROUPING SETS