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-20 11:02:36 |
Message-ID: | 55ACD54C.7030800@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2015-07-20 12:18, Petr Jelinek wrote:
> On 2015-07-19 22:56, Tom Lane wrote:
>>
>> * You might have expected me to move the tsmseqscan and tsmpagemode flags
>> into the TsmRoutine struct, but instead this API puts equivalent flags
>> into the SampleScanState struct. The reason for that is that it lets
>> the settings be determined at runtime after inspecting the TABLESAMPLE
>> parameters, which I think would be useful. For example, whether to use
>> the bulkread strategy should probably depend on what the sampling
>> percentage is.
>>
>
> I think this ignores one aspect of the old API. That is, we allowed the
> sampling method to specify which kind of input parameters it accepts.
> This is why for example the tsm_system_rows accepts integer while system
> and bernoulli both accept float8. This part of the API is certainly not
> needed for bernoulli and system sampling but if we ever want to do
> something more sophisticated like stratified sampling which Simon
> mentioned several times, specifying just percentages is not going to be
> enough.
>
Actually I see the tsmapi has support for this, so please ignore the noise.
--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Korotkov | 2015-07-20 12:18:12 | Use pg_rewind when target timeline was switched |
Previous Message | Alvaro Herrera | 2015-07-20 11:02:22 | Re: [COMMITTERS] pgsql: Improve BRIN documentation somewhat |