From: David Rowley <david.rowley@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Support partition pruning at execution time
Date: Sun, 8 Apr 2018 11:26:07 +1200
Message-ID: <CAKJS1f9QV-dNDtDUORW5hovhKSyK_7jfV22-LRNfCkW7JjA6-A@mail.gmail.com> (raw)
In-Reply-To: <CAKJS1f_c=DLtE6_1e3um_tS8=pHbRY6mw2YrOpSUU6Lqt2nKPw@mail.gmail.com>
References: <E1f4uyY-0005jE-MW@gemulon.postgresql.org>
<8384.1523138250@sss.pgh.pa.us>
<CAKJS1f_c=DLtE6_1e3um_tS8=pHbRY6mw2YrOpSUU6Lqt2nKPw@mail.gmail.com>
On 8 April 2018 at 10:59, David Rowley <david.rowley@2ndquadrant.com> wrote:
> Sometimes I see:
>
> relname | relallvisible
> ---------+---------------
> tprt_1 | 0
> tprt_2 | 1
>
> Other times I see:
>
> relname | relallvisible
> ---------+---------------
> tprt_1 | 0
> tprt_2 | 0
The minimum set of commands I can find to recreate this are:
drop table if exists tprt;
create table tprt (col1 int) partition by range (col1);
create table tprt_1 partition of tprt for values from (1) to (5001);
create index tprt1_idx on tprt_1 (col1);
insert into tprt values (10), (20), (501), (502), (505), (1001), (4500);
vacuum tprt; select relname,relallvisible from pg_Class where relname
like 'tprt%' and relkind = 'r';
I get relallvisible = 0 once in maybe 20 or so attempts.
I didn't manage to get the same without a partitioned table.
--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: david.rowley@2ndquadrant.com, tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org
Subject: Re: pgsql: Support partition pruning at execution time
In-Reply-To: <CAKJS1f9QV-dNDtDUORW5hovhKSyK_7jfV22-LRNfCkW7JjA6-A@mail.gmail.com>
References: <E1f4uyY-0005jE-MW@gemulon.postgresql.org> <8384.1523138250@sss.pgh.pa.us> <CAKJS1f_c=DLtE6_1e3um_tS8=pHbRY6mw2YrOpSUU6Lqt2nKPw@mail.gmail.com> <CAKJS1f9QV-dNDtDUORW5hovhKSyK_7jfV22-LRNfCkW7JjA6-A@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox