Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tw1gP-0003a3-LK for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Jan 2013 02:27:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Tw1gO-0003bY-IA for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Jan 2013 02:27:52 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tw1gN-0003bS-1x for pgsql-hackers@postgresql.org; Fri, 18 Jan 2013 02:27:51 +0000 Received: from outmail149113.authsmtp.com ([62.13.149.113]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tw1gK-0003Mp-R9 for pgsql-hackers@postgresql.org; Fri, 18 Jan 2013 02:27:50 +0000 Received: from mail-c226.authsmtp.com (mail-c226.authsmtp.com [62.13.128.226]) by punt5.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id r0I2RioI075372; Fri, 18 Jan 2013 02:27:44 GMT Received: from ayaki.localdomain (58-7-88-192.dyn.iinet.net.au [58.7.88.192]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/) with ESMTP id r0I2RbuF060959 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 18 Jan 2013 02:27:41 GMT Message-ID: <50F8B318.1060407@2ndQuadrant.com> Date: Fri, 18 Jan 2013 10:27:36 +0800 From: Craig Ringer Organization: 2nd Quadrant User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Tom Lane CC: Simon Riggs , Robert Haas , Dimitri Fontaine , Alvaro Herrera , PostgreSQL Hackers Subject: Re: Event Triggers: adding information References: <20130104205251.GB9191@alvh.no-ip.org> <20130109165829.GB4490@alvh.no-ip.org> <16675.1358454278@sss.pgh.pa.us> In-Reply-To: <16675.1358454278@sss.pgh.pa.us> X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Server-Quench: a3c9b2e9-6116-11e2-98a9-0025907ec6c5 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdxZQATClZeVg0b BQteCiN5VAwpPBRK HVkIKg5MJUcNSQVJ NksacBtFaQ1bZ1hf HGQLWldEUF97W2R/ bwkfaA1DZVRGVxtr WUpWQFdQERppT14B fxx8AFwEdwNGcXt5 K0VkXXBSEhV5Jk8v QBtdCGsHZGF9aWFK Ul1Rf1JdbQNKfBpM alcqB3VeZCtlM3Bw LC8aFBMcBw5qYAlL TwcRZW4IQEkEEyQn FVgLETkuG0JNRiM9 KAYjI0IdG0B5 X-Authentic-SMTP: 61633235383639.1020:706 X-AuthFastPath: 0 (Was 255) X-AuthSMTP-Origin: 58.7.88.192/2525 X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. X-Pg-Spam-Score: -2.6 (--) 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 01/18/2013 04:24 AM, Tom Lane wrote: > Simon Riggs writes: >> On 17 January 2013 16:15, Robert Haas wrote: >>> It pains me that I've evidently failed to communicate this concept >>> clearly despite a year or more of trying. Does that make sense? Is >>> there some way I can make this more clear? The difference seems very >>> clear-cut to me, but evidently I'm not conveying it well. >> "The point", i.e. the main use case, is to replicate the DDL in a useful form. >> Discussions and reasoning need to focus on the main use case, not on >> weird futures or qualitative points. > I have to completely disagree with that. If we don't want PostgreSQL > to soon subside into an unfixable morass, as I think Brooks puts it, > we must *not* simply patch things in a way that expediently provides > an approximation of some desired feature. We have to consider, and put > substantial weight on, having a clean and maintainable system design. > > This is particularly the case if we're talking about a feature that > is going to expose backend internals to users to any degree. We're > either going to be constrained to not change those internals any more, > or expect to break users' applications when we do change them, and > neither result is very appealing. I actually wonder if - for now - breaking applications that use certain limited well defined features is an acceptable outcome in exchange for getting a usable first version in place. I'm approaching this from more of an end user PoV: meeting user needs with the least possible pain to users and to the Pg team. A non-forward compatible feature wouldn't be OK to rely on in end user applications, but it'd potentially be usable (if not ideal) for things like replication tools, where practically anything is better than the current situation with DDL. They could special case their integration code by server version if they had to, adding version-specific triggers and handling code. The user application wouldn't care about the changes, they'd just need to make sure they upgraded Slony (or whatever) whenever they upgraded to a new Pg major version. I'm not suggesting that as a long term measure, but as a possible stop-gap that'd: - Allow replication to start using these features now, so they'd be ready and more mature when the final version is available; and - Permit prototyping of applications to use the new replication features What I'm thinking about is packaging the client interface in an extension that's explicitly documented as not cross-version compatible and that must be explicitly loaded by named version in order to get the feature. This would require a function-like interface for setup; if that's not possible, an alternative might be a GUC that must be explicitly set in postgresql.conf (only, not via SET) like "enable_non_forward_compatible_features" or "enable_experimental_features". I suspect that if this feature goes in, even in an ugly form, it'll help guide the development of a final version concurrently with the cleanups and refactoring that appears to be necessary. Note that non-forward-compatible changes have been made repeatedly in the system catalogs, despite the fact that end user applications are known to use them via JDBC drivers and libpq, as well as directly. I wonder if we can give this the same kind of compatibility requirements, where it must not break within a given major version but may break between them. -- Craig Ringer 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