pg.ddx.io pgsql-hackers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Craig Ringer <craig@2ndquadrant.com>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Andreas Karlsson <andreas@proxel.se>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] REINDEX CONCURRENTLY 2.0
Date: Thu, 25 Jan 2018 21:28:13 -0500
Message-ID: <20180126022813.GD2416@tamriel.snowman.net> (raw)
In-Reply-To: <CAMsr+YGhS541Zx7kmda5SXLS3NLeY71HksZrbRsRbbS3VaXfkQ@mail.gmail.com>
References: <CAB7nPqRty06RXyphfcmWgVoiHVjjB2WCDj4UcU_nRQvo-Cx52w@mail.gmail.com>
<20171221024626.ycidqbnwcz25ekry@alvherre.pgsql>
<CAB7nPqSS7xVKGkQbroiJ_wFgxa9n3COnemGzeXv36-A3XLbAeg@mail.gmail.com>
<CAMsr+YGhS541Zx7kmda5SXLS3NLeY71HksZrbRsRbbS3VaXfkQ@mail.gmail.com>
Craig, Michael, all,
* Craig Ringer (craig@2ndquadrant.com) wrote:
> On 21 December 2017 at 11:31, Michael Paquier <michael.paquier@gmail.com>
> wrote:
>
> > On Thu, Dec 21, 2017 at 11:46 AM, Alvaro Herrera
> > <alvherre@alvh.no-ip.org> wrote:
> > > Michael Paquier wrote:
> > >> Well, the idea is really to get rid of that as there are already
> > >> facilities of this kind for CREATE TABLE LIKE in the parser and ALTER
> > >> TABLE when rewriting a relation. It is not really attractive to have a
> > >> 3rd method in the backend code to do the same kind of things, for a
> > >> method that is even harder to maintain than the other two.
> > >
> > > I dislike the backend code that uses SPI and manufacturing node to
> > > re-creates indexes. IMO we should get rid of it. Let's not call it
> > > "facilities", but rather "grotty hacks".
> >
> > Aha. You are making my day here ;)
> >
> > > I think before suggesting to add even more code to perpetuate that idea,
> > > we should think about going in the other direction. I have not tried to
> > > write the code, but it should be possible to have an intermediate
> > > function called by ProcessUtility* which transforms the IndexStmt into
> > > an internal representation, then calls DefineIndex. This way, all this
> > > code that wants to create indexes for backend-internal reasons can
> > > create the internal representation directly then call DefineIndex,
> > > instead of the horrible hacks they use today creating parse nodes by
> > > hand.
> >
> > Yeah, that would be likely possible. I am not volunteering for that in
> > the short term though..
>
> It sounds like that'd make some of ALTER TABLE a bit less ... upsetting ...
> too.
I'm a big fan of this patch but it doesn't appear to have made any
progress in quite a while. Is there any chance we can get an updated
patch and perhaps get another review before the end of this CF...?
Refactoring this to have an internal representation between
ProcessUtility() and DefineIndex doesn't sound too terrible and if it
means the ability to reuse that, seems like it'd be awful nice to do
so..
Thanks!
Stephen
Attachments:
[application/pgp-signature] signature.asc (818B, ../20180126022813.GD2416@tamriel.snowman.net/2-signature.asc)
download
view thread (170+ messages) latest in thread
Message-ID: <20180126022813.GD2416@tamriel.snowman.net> Permalink: ../20180126022813.GD2416@tamriel.snowman.net/ Also on: postgresql.org/message-id/20180126022813.GD2416@tamriel.snowman.net ·
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: sfrost@snowman.net, craig@2ndquadrant.com, michael.paquier@gmail.com, alvherre@alvh.no-ip.org, andreas@proxel.se Subject: Re: [HACKERS] REINDEX CONCURRENTLY 2.0 In-Reply-To: <20180126022813.GD2416@tamriel.snowman.net> * 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