pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Tom Lane <tgl@sss.pgh.pa.us>
To: Edmund Horner <ejrh00@gmail.com>
Cc: David Rowley <david.rowley@2ndquadrant.com>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Tid scan improvements
Date: Fri, 21 Dec 2018 11:57:48 -0500
Message-ID: <28822.1545411468@sss.pgh.pa.us> (raw )
In-Reply-To: <CAMyN-kAJBX8BNAx--UwruKaN6ctpOz6t+MRmiKRv2pRKy+FTFw@mail.gmail.com >
References: <CAMyN-kB-nFTkF=VA_JPwFNo08S0d-Yk0F741S2B7LDmYAi8eyA@mail.gmail.com >
<CAKJS1f9m8qoM2dA-72g9CvJOuBBF98G_deN0v=nY4q_aow0KmQ@mail.gmail.com >
<CAMyN-kCknpsgHt8eP=jeYMGMU=suRAoZ38CoRJB2fxKTKa52gw@mail.gmail.com >
<CAKJS1f8FyS51b6j++qShP_av5Kq1oq83t16ALPftPm4F0BbqkQ@mail.gmail.com >
<CAMyN-kCCjuLR=guOHBbD66BE4EuiDe8R5mDrmBJOySntdUS6Xg@mail.gmail.com >
<CAKJS1f-VsLvQa45yPSSSagFq7VoG-MREDaddJiLt=82gX2WQcg@mail.gmail.com >
<CAMyN-kBDks3CaALvhCd-KokpygQjO6-1pQ+vnv6Yq6EZUwccUg@mail.gmail.com >
<CAMyN-kAO-bc5pqgRp1vZ=gFmVjbEQfM7Anikkm6PPDDAekH2Nw@mail.gmail.com >
<CAKJS1f8Ap6cFKeBbTnHXpOcgq5iXV1UhwA7ZiP4fxxx1LArbwQ@mail.gmail.com >
<CAMyN-kBRYy=DV3oQ0TD6pJYvNg1oHSTXdCTe94XJGOpJK1GeAA@mail.gmail.com >
<CAMyN-kB6+KTyH3TQqoLLbNtj2t4AZr8RMHUU0yzxp429o5PyDw@mail.gmail.com >
<CAKJS1f9+etR1VGkqp=hkGWn3EofWJVFnjKaTpHZva2PKhALdng@mail.gmail.com >
<CAMyN-kCLxCo=rbysFRM=Ouarp+xd_b=oP26+tr1yXe3C9k89OQ@mail.gmail.com >
<CAMyN-kDNyqy2RUGn53GnoS1shdB5TYhif9OpGFFkOb7z=za2eQ@mail.gmail.com >
<8469.15453! 44467@sss.pgh.pa.us >
<CAMyN-kAc-rr5GVOL64TET95R3cLPjBzVtY=aH2DEOpymqiRanw@mail.gmail.com >
<CAKJS1f_Er1LoTK6OfJOU_tPP57-N+848AoYfZNwOk5nyUskrTA@mail.gmail.com >
<CAMyN-kCW+D4EpFz-0+LJVOi1Mp3faeJop1wkom+FM_04nRxyXA@mail.gmail.com >
<20220.1545363076@sss.pgh.pa.us >
<CAMyN-kAJBX8BNAx--UwruKaN6ctpOz6t+MRmiKRv2pRKy+FTFw@mail.gmail.com >
Edmund Horner <ejrh00@gmail.com> writes:
> Ok. I think that will simplify things. So if I follow you correctly,
> we should do:
> 1. If has_useful_pathkeys is true: generate pathkeys (for CTID ASC),
> and use truncate_useless_pathkeys on them.
> 2. If we have tid quals or pathkeys, emit a TID scan path.
Check.
> For the (optional) backwards scan support patch, should we separately
> emit another path, in the reverse direction?
What indxpath.c does is, if has_useful_pathkeys is true, to generate
pathkeys both ways and then build paths if the pathkeys get past
truncate_useless_pathkeys. That seems sufficient in this case too.
There are various heuristics about whether it's really useful to
consider both sort directions, but that intelligence is already
built into truncate_useless_pathkeys. tid quals with no pathkeys
would be reason to generate a forward path, but not reason to
generate a reverse path, because then that would be duplicative.
regards, tom lane
view thread (97+ messages) latest in thread
Message-ID: <28822.1545411468@sss.pgh.pa.us>
Permalink: ../28822.1545411468@sss.pgh.pa.us/
Also on: postgresql.org/message-id/28822.1545411468@sss.pgh.pa.us
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: tgl@sss.pgh.pa.us, ejrh00@gmail.com, david.rowley@2ndquadrant.com, tomas.vondra@2ndquadrant.com, pgsql-hackers@lists.postgresql.org
Subject: Re: Tid scan improvements
In-Reply-To: <28822.1545411468@sss.pgh.pa.us>
* 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