Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TxlBZ-0007U8-V3 for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Jan 2013 21:15:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TxlBY-00051s-En for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Jan 2013 21:15:12 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TxlBX-00051A-34 for pgsql-hackers@postgresql.org; Tue, 22 Jan 2013 21:15:11 +0000 Received: from moutng.kundenserver.de ([212.227.17.8]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TxlBV-0003r9-J3 for pgsql-hackers@postgresql.org; Tue, 22 Jan 2013 21:15:10 +0000 Received: from anarazel.de (p5DDC528F.dip.t-dialin.net [93.220.82.143]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0MHttJ-1TuCHQ0UyD-003VfB; Tue, 22 Jan 2013 22:15:01 +0100 Received: by anarazel.de (Postfix, from userid 1000) id 2AB841C0173; Tue, 22 Jan 2013 22:15:00 +0100 (CET) Date: Tue, 22 Jan 2013 22:15:00 +0100 From: Andres Freund To: Robert Haas Cc: Tom Lane , Alvaro Herrera , Dimitri Fontaine , Simon Riggs , PostgreSQL Hackers Subject: Re: Event Triggers: adding information Message-ID: <20130122211459.GA27577@awork2.anarazel.de> References: <20130118154732.GE29501@alap2.anarazel.de> <20130118170857.GK29501@alap2.anarazel.de> <10183.1358531053@sss.pgh.pa.us> <20130118180326.GM29501@alap2.anarazel.de> <20130118182255.GG4063@alvh.no-ip.org> <11782.1358535557@sss.pgh.pa.us> <4373.1358547169@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Provags-ID: V02:K0:mJW1ZgD0NU5S3T5Pjm0aivJ2tEvi9e9cVR+rSqpR7GM nEZf+tYWDnyVEp6WEkKRrN4kmC17cVaY7gJRbTcaUBqeGkV+xj jWIp2dkor0eJ4Eqf1g9IL4ecUZqM2eRPAxd1trDUN7n73CjyR7 t9QXY+vX0B7ovmt9xqV+acV0oWgcJV/qgNcmCCsuB9OJrzZ54U 95Bug/Sroc6VSg9Dt+PLpBXA88dtWyTabBkLjjTPXog3BFQ3MK Now36CTQxeskZdAZBqxcFypAp61q8RDeqtqVjxPoP2vwC5Q7cg j6FPXJ5Z7vT2Y4sxFmqDSCs2xAsyXYSBpXcezFmaycwynw2r7r DVNVo5Bgae9gnvtiW7H+3tFZ75wvw3kButp9y6Emi X-Pg-Spam-Score: -1.9 (-) 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 2013-01-18 17:20:51 -0500, Robert Haas wrote: > On Fri, Jan 18, 2013 at 5:12 PM, Tom Lane wrote: > > Robert Haas writes: > >> On Fri, Jan 18, 2013 at 1:59 PM, Tom Lane wrote: > >>> Well, that burden already exists for non-utility statements --- why > >>> should utility statements get a pass? Other than that we tend to invent > >>> new utility syntax freely, which might be a good thing to discourage > >>> anyhow. > > > >> My concerns are that (1) it will slow down the addition of new > >> features to PostgreSQL by adding yet another barrier to commit and (2) > >> it won't be get enough use or regression test coverage to be, or > >> remain, bug-free. > > > > Meh. The barriers to inventing new statements are already mighty tall. > > As for (2), I agree there's risk of bugs, but what alternative have you > > got that is likely to be less bug-prone? At least a reverse-list > > capability could be tested standalone without having to set up a logical > > replication configuration. > > > > This should not be interpreted as saying I'm gung-ho to do this, mind > > you. I'm just saying that if our intention is to support logical > > replication of all DDL operations, none of the alternatives look cheap. > > Well, we agree on that, anyway. :-) > > I honestly don't know what to do about this. I think you, Alvaro, and > I all have roughly the same opinion of this, which is that it doesn't > sound fun, but there's probably nothing better. Count me in. > So, what do we do > when a really cool potential feature (logical replication of DDL) > butts up against an expensive future maintenance requirement? I just tried to estimate the effort of that by looking at: git log REL9_1_0..REL9_2_0 src/backend/parser/gram.y src/include/nodes/ which seems like it would catch most such patches. First thing I have to say is there are more patches potentially affecting such a potential feature than I previously had thought. On the other hand, just about all of those patches are so big that the amount of changes to the ruleutils.c equivalent for DDL look like a minor pain in comparison to the rest. The patches that seemed relevant during 9.1=>9.2 seem to be to be the following when counting ones that directly would add new deparsing code: * NOT VALID * SECURITY LABEL * per column fdw options * range datatypes * security barrier * LEAKPROOF * privileges on types * ALTER FDW * rename domain constraints Then there were a bunch of patches adding new features that required restructuring of existing code that would have affected possible deparsing code: * plancache restructuring * parametrized indexscans * DROP ... consolidation In all of those but "ALTER FDW" and "rename domain constraints" possible deparsing code looks like it would be an absolutely minor part of the code. And in those its only a relevant part because they are really small. There were some bugfixes that would have required touching it as well, but those seemed to be cases that are basically s/a/b/. Not sure what the consequence of that is, but I wanted to share it anyway after spending the time ;). > I'm not > even sure what the criteria should be for making a decision on whether > it's "worth it". In my experience it is the weakest point in the non-WAL based postgres replication tools. So I personally think it is worth some overhead when adding new features. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers