From: Jim Nasby <jim.nasby@openscg.com>
To: Andreas Karlsson <andreas@proxel.se>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Cc: Michael Paquier <michael.paquier@gmail.com>
Subject: Re: REINDEX CONCURRENTLY 2.0
Date: Fri, 10 Mar 2017 01:56:40 -0600
Message-ID: <03478522-ac46-d28b-7b7a-ef62c03a4542@openscg.com> (raw)
In-Reply-To: <025c1e3d-1586-c678-922c-c01e12bb013e@proxel.se>
References: <CAB7nPqSTFkuc7dZxCDX4HOTU63YXHRroNv2aoUzyD-Zz_8Z_Zg@mail.gmail.com>
<a8e56251-bd3c-521e-7a2c-35d66b5f7f29@proxel.se>
<af867d20-1406-38c0-0a58-2cf1fce7240f@BlueTreble.com>
<20170302061808.nfuptpli3lrlc5l7@alap3.anarazel.de>
<CA+TgmoYDZ7ihGf-_uxabp8Sjk8-QLp0jVbO4TmzxQ65vw6jCvw@mail.gmail.com>
<1F13C8DA-D31E-4821-BA6F-0FA772AD6069@anarazel.de>
<CA+TgmoZXmKOCe5FezHF3n-KLk56Ea-N0DW6zYGGWDCz2jDXzNw@mail.gmail.com>
<65552c19-32fb-7f4f-7b72-e92bbd6e1d61@proxel.se>
<CA+TgmoY9wOS85dN9MNbzBuRzTZCFrswRDjydY1wh+HL9FCeFwA@mail.gmail.com>
<025c1e3d-1586-c678-922c-c01e12bb013e@proxel.se>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 3/8/17 9:34 AM, Andreas Karlsson wrote:
>> Also, if by any chance you think (or use any
>> software that thinks) that OIDs for system objects are a stable
>> identifier, this will be the first case where that ceases to be true.
>> If the system is shut down or crashes or the session is killed, you'll
>> be left with stray objects with names that you've never typed into the
>> system. I'm sure you're going to say "don't worry, none of that is
>> any big deal" and maybe you're right.
>
> Hm, I cannot think of any real life scenario where this will be an issue
> based on my personal experience with PostgreSQL, but if you can think of
> one please provide it. I will try to ponder some more on this myself.
The case I currently have is to allow tracking database objects similar
to (but not the same) as how we track the objects that belong to an
extension[1]. That currently depends on event triggers to keep names
updated if they're changed, as well as making use of the reg* types. If
an event trigger fired as part of the index rename (essentially treating
it like an ALTER INDEX) then I should be able to work around that.
The ultimate reason for doing this is to provide something similar to
extensions (create a bunch of database objects that are all bound
together), but also similar to classes in OO languages (so you can have
multiple instances).[2]
Admittedly, this is pretty off the beaten path and I certainly wouldn't
hold up the patch because of it. I am hoping that it'd be fairly easy to
fire an event trigger as if someone had just renamed the index.
1: https://github.com/decibel/object_reference
2: https://github.com/decibel/pg_classy
--
Jim Nasby, Chief Data Architect, OpenSCG
http://OpenSCG.com
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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: jim.nasby@openscg.com, andreas@proxel.se, robertmhaas@gmail.com, andres@anarazel.de, michael.paquier@gmail.com
Subject: Re: REINDEX CONCURRENTLY 2.0
In-Reply-To: <03478522-ac46-d28b-7b7a-ef62c03a4542@openscg.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