Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cmFPu-0007as-Gi for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Mar 2017 07:56:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cmFPt-0006GB-EI for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Mar 2017 07:56:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cmFPs-0006Fi-OV for pgsql-hackers@postgresql.org; Fri, 10 Mar 2017 07:56:48 +0000 Received: from mail-pf0-x231.google.com ([2607:f8b0:400e:c00::231]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cmFPp-00080o-O5 for pgsql-hackers@postgresql.org; Fri, 10 Mar 2017 07:56:48 +0000 Received: by mail-pf0-x231.google.com with SMTP id o126so39039844pfb.3 for ; Thu, 09 Mar 2017 23:56:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openscg-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=Xjx0GEU4qAjv/bIgR3dsOIYsaN14ABujQUIO+de9Qd8=; b=QzwvK/4Bt4rnBsMJOLgPugkwUC4BfsXzbE30vcIBPOgx4ConJl6pGIKP3XUsYF0N9q 5EB5lt7DMpbXMRJ4twToDE6AHBLYAMdf3iTZ2XNppwUOGjlrsNmpKBmAUffvYG/pR+M+ Ihku9MS7BEXIZ7ItZXH0SBnCPaypKnBZ2mWVqQiFtLasg3YcRp2IOmJpBU5MST/AHFCa xpAaLETNzwldiNL417sSIXSIEVrGwmOhABbas4q/Ma4RJoPxD6VnTWMpMtaUBqwVfP3w Ke7sjj02rpED4SsKWox8EKbsf7buDHzdPxNhjwn3RMlcT9DP/ON4ZGn2BssJ5kZIXvyl JY4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=Xjx0GEU4qAjv/bIgR3dsOIYsaN14ABujQUIO+de9Qd8=; b=DAnydJKOaaZLhb44DHIOgzpqqT1x4VEASnTS/83C2qsntquldrHESmNJ2pum7MsEzp CU+wIZwX/4kec6YicPs7nrk7Y98IMifd0XEN54fgMk28seZ/l9ibOi4c6maMzleT7U1X mLpZ7OCsezBB5wFfgtTUT9/8tLdPTpDoudEQiy2I2rYOvo7r8zEGLCryx75pZaBLpsbl VtxnEyqLqp95a1A8vL2yieTj+XM4+Wa3J8bfTF6TslMQzdKpOGX6CaPUC9BcamDko+S1 27ZdndkInyWsaSYotkDJ9QltdCo6n37pHy+LSuFCQ+RPTLDCxY+CJFfN282u8WFTJdsG 3IyA== X-Gm-Message-State: AMke39lOXfKZFD83oVX05cMDAcmExkhw3nbZEF4BiNepSsWa/Zh/v75AMNRFcxnA7fnlau51 X-Received: by 10.98.159.149 with SMTP id v21mr19543000pfk.57.1489132603201; Thu, 09 Mar 2017 23:56:43 -0800 (PST) Received: from decina.attlocal.net ([2602:306:ce8b:3460:2d7f:4b8f:5b15:b6cd]) by smtp.gmail.com with ESMTPSA id s3sm16818245pgn.55.2017.03.09.23.56.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Mar 2017 23:56:42 -0800 (PST) Subject: Re: REINDEX CONCURRENTLY 2.0 To: Andreas Karlsson , Robert Haas References: <20170302061808.nfuptpli3lrlc5l7@alap3.anarazel.de> <1F13C8DA-D31E-4821-BA6F-0FA772AD6069@anarazel.de> <65552c19-32fb-7f4f-7b72-e92bbd6e1d61@proxel.se> <025c1e3d-1586-c678-922c-c01e12bb013e@proxel.se> Cc: Andres Freund , "pgsql-hackers@postgresql.org" , Michael Paquier From: Jim Nasby Message-ID: <03478522-ac46-d28b-7b7a-ef62c03a4542@openscg.com> Date: Fri, 10 Mar 2017 01:56:40 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <025c1e3d-1586-c678-922c-c01e12bb013e@proxel.se> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.1 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org 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