pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: David Rowley <david.rowley@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: Jeff Janes <jeff.janes@gmail.com>
Cc: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: why partition pruning doesn't work?
Date: Thu, 14 Jun 2018 21:49:58 +1200
Message-ID: <CAKJS1f-XFWJdnpywUqOrd0_OmbM9FJsOYz+=y_0R_7CCPFNFVw@mail.gmail.com> (raw )
In-Reply-To: <7160.1528906240@sss.pgh.pa.us >
References: <CAFj8pRBjrufA3ocDm8o4LPGNye9Y+pm1b9kCwode4X04CULG3g@mail.gmail.com >
<CA+q6zcV5=8JoDTBNO0EUDG7++Rj_GE89MQ1sYMHLHZs5pm3V8g@mail.gmail.com >
<CAFjFpResLp-PnVv7qBBagM-1ia6+h3pnCfDM+AJUAVWOTgHt8w@mail.gmail.com >
<7142.1527868419@sss.pgh.pa.us >
<CAMkU=1z3SR9jGSG7CHQaba-cq9wPTTbYcSbWPLXiLcmMtRVDYQ@mail.gmail.com >
<1111.1527977170@sss.pgh.pa.us >
<CA+q6zcVL=7as7ud5ZNgndH_ytUn-h1=q_v8Cqpfea4-LULweMw@mail.gmail.com >
<10432.1528045900@sss.pgh.pa.us >
<CA+q6zcVX9Gp0o06AXrozc0k4zkfera_wQiSyTkKXzgCsEqM6Yg@mail.gmail.com >
<569483c5-a273-6537-1b5d-7a271ce439fb@lab.ntt.co.jp >
<CAKJS1f9y_L-sXHwh74CGOoYcQRj8mDX9PnJqJLbpKujH1AS2ow@mail.gmail.com >
<CAKJS1f-D1Tbi=Ozug7wfiZRf7wJs3tJ1G0cX5MK0nwstrc++tA@mail.gmail.com >
<e6e751ea-0db4-0e7b-9513-97460edb60b3@lab.ntt.co.jp >
<CAKJS1f_jatg5+qbrha2fGog63t3VdbNnOkYZitJtx-uo5H5EsQ@mail.gmail.com >
<22805.1528386192@sss.pgh.pa.us >
<CAKJS1f9xHoMntARi1RhqwAVZ-E0qp5a5f+Tf_chH9Vr8xOWiAw@mail.gmail.com >
<21787.1528428171@sss.pgh.pa.us >
<17850.1528755844@sss.pgh.pa.us >
<CA+Tgmoa2Vvka6dBMb2w_u_N2o2HUPY6oYkS4FQ3nXMj=4Zd5ig@mail.gmail.com >
<19365.1528820758@sss.pgh.pa.us >
<CA+TgmoZi9hwHb4nZxCeh1TTT8rGq6AYN1Q8o5uXhiPZ3sr6o9g@mail.gmail.com >
<30981.1528822481@sss.pgh.pa.us >
<CA+TgmoZXtauTcAHiTdL9dRShkK+ieLgNtiuxWxYZWJpHB41iWQ@mail.gmail.com >
<637.1528863347@sss.pgh.pa.us >
<CAKJS1f_BFePMt1xn6Zijum2dCLmM3dadN9dm=fCcnfK-aPp-dQ@mail.gmail.com >
<7160.1528906240@sss.pgh.pa.us >
On 14 June 2018 at 04:10, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> There's still one thing I'm a bit confused about here. I noticed that
> we weren't actually using the partopfamily and partopcintype fields in
> PartitionPruneContext, so I removed them. But that still leaves both
> partsupfunc and partcollation as pointers into the relcache that were
> subject to this hazard. My testing agrees with lousyjack's results
> that both of those were, in fact, being improperly accessed. The OID
> comparison effect I mentioned upthread explains why the buildfarm's
> cache-clobbering members failed to notice any problem with garbage
> partsupfunc data ... but why did we not see any complaints about invalid
> collation OIDs? Tis strange.
FWIW It's not working for me before e23bae82cf3 with
CLOBBER_FREED_MEMORY, CLOBBER_CACHE_ALWAYS and RELCACHE_FORCE_RELEASE,
and:
create table listp (a text) partition by list(a);
create table listp1 partition of listp for values in ('1');
select * from listp where a = (select '1');
I get:
ERROR: cache lookup failed for collation 2139062143
--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
view thread (72+ messages) latest in thread
Message-ID: <CAKJS1f-XFWJdnpywUqOrd0_OmbM9FJsOYz+=y_0R_7CCPFNFVw@mail.gmail.com>
Permalink: ../CAKJS1f-XFWJdnpywUqOrd0_OmbM9FJsOYz+=y_0R_7CCPFNFVw@mail.gmail.com/
Also on: postgresql.org/message-id/CAKJS1f-XFWJdnpywUqOrd0_OmbM9FJsOYz+=y_0R_7CCPFNFVw@mail.gmail.com
copy link · copy postgr.es
reply 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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: david.rowley@2ndquadrant.com, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, Langote_Amit_f8@lab.ntt.co.jp, 9erthalion6@gmail.com, jeff.janes@gmail.com, ashutosh.bapat@enterprisedb.com, pavel.stehule@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: why partition pruning doesn't work?
In-Reply-To: <CAKJS1f-XFWJdnpywUqOrd0_OmbM9FJsOYz+=y_0R_7CCPFNFVw@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