From owner-freebsd-ports@freebsd.org Fri Jul 24 15:37:21 2015 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73D609AAD5C for ; Fri, 24 Jul 2015 15:37:21 +0000 (UTC) (envelope-from joris.dedieu@gmail.com) Received: from mail-la0-x236.google.com (mail-la0-x236.google.com [IPv6:2a00:1450:4010:c03::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F0E661D33 for ; Fri, 24 Jul 2015 15:37:20 +0000 (UTC) (envelope-from joris.dedieu@gmail.com) Received: by laah7 with SMTP id h7so16483084laa.0 for ; Fri, 24 Jul 2015 08:37:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=OW3HCBZpbAZOAJq6gWW+t/qMyI2rX9PCDI0hgmWO+wE=; b=NYkJrqdLPcueUFmtuJ9HsiqesaqiM80S45K46Hy1jBFI2lY/e1LBVbMFhwryAPZhGc 6F8LTVG8YpOJFB65D5lqVIjdTnpz2LXMX2wn5uBeMopLH02uQScb59UMFdYhmO/lXoAg NRV48+gsBtvwUHaWmWTF5Qyqc1owKEe5kgrGbuFlPl5x7frypFtg9jCX9T1puAeZ8BkP PSGSk94EoXmF4ToUHNzw0fwXUfr/Hwma8J8JOqHnxu8EGPd9KMmdAnmdHuZTLM+kBtrd wH4OEs/QsyGghPbjOATOuvw+AiQqJGnqoAiGN6SYpGUj9hphroT/ydlFPAu1vVJ8/Be/ EFTQ== MIME-Version: 1.0 X-Received: by 10.152.203.162 with SMTP id kr2mr14352848lac.57.1437752239000; Fri, 24 Jul 2015 08:37:19 -0700 (PDT) Received: by 10.114.176.169 with HTTP; Fri, 24 Jul 2015 08:37:18 -0700 (PDT) In-Reply-To: <20150721194725.GB1457@elch.exwg.net> References: <20150721094627.GD21594@ivaldir.etoilebsd.net> <20150721194725.GB1457@elch.exwg.net> Date: Fri, 24 Jul 2015 17:37:18 +0200 Message-ID: Subject: Re: Proposal to fix postgresql package maintainance nightmare From: joris dedieu To: Christoph Moench-Tegeder Cc: freebsd-ports Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jul 2015 15:37:21 -0000 2015-07-21 21:47 GMT+02:00 Christoph Moench-Tegeder : > ## Baptiste Daroussin (bapt@FreeBSD.org): > >> We do manage a bunch of postgresql servers on FreeBSD, and I really find the >> current model of packages postgresql is a nightmare on FreeBSD. > > Not that much worse than in some other environments :) > Comparing all the PostgreSQL packaging models, I like the debian model > best (PostgreSQL is my day job, so I can claim some experience here). > >> Having one single postgresql-client package always on the latest stable version >> (backward compability being very good) providing the client cli tools and the >> libraries (those libraries will be used for everything in the ports tree >> needing to talk to postgresql) > > As others already noted, using a psql (command line client) with a > version different from the respective server has it's limitations > (it works in general, but some of the meta commands may fail). > On the other hand, the ABI of libpq is stable enough for all the > supported versions of psql (and other clients). So you'd need one > package with libpq alone, and another one with psql and the other > client utils (http://www.postgresql.org/docs/9.4/static/reference-client.html > is the list). The server itself would be the another package. > The libpq package can always be built from the latest release > of PostgreSQL. > An additional "postgresql-{client,server}-meta" package would > provide symlinks from ${LOCALBASE}/bin/ to > ${PREFIX}/bin/ (PREFIX being the PREFIX for > the selected PostgreSQL package, postgresbinary all the binaries > PostgreSQL installs). > For applications using PostgreSQL, the USES=pgsql logic has to > point configure and it's equivalents to the right pg_config, and > all well behaved applications should find the right libraries etc. > >> That way everything talk to pgsql will only depend on one postgresql-client >> packages that will smoothly be upgraded to newer versions. > > Using the schema outlined above, the "normal" PostgreSQL-using > application will only have to depend on the libpq package, > which is version-agnostic. Only those applications which > really need psql will have to depend on the (versioned) > posggresql-client package, or even better, the client-meta > package (that way, changes of the default postgresql version > will not require dependency-wrangling throughout the tree). > >> Any opinion on that change? Any idea one how to make the upgrade path as >> transparent as possible for current setup? (beside of course adding an UPDATING >> entry) > > Using the meta-packages (which could just pick up the previously > set default version), the upgrade path should be completely > transparent for most cases. > > Another thing I've been thinking about is the ability to have > multiple PostgreSQL clusters on one machine. Currently there's > only the one "postgresql_data" variable in rc.conf. It shouldn't > be that hard to have something like > postgresql94_clusters="default stage dev" > postgresql94_default_data="..." > postgresql94_stage_data="..." > > Depending on the rc script handling (one script to rule them > all vs. each PostgreSQL has it's own script), we might even do > something line > postgresql_clusters="9.4:default 9.5:testing" > postgresql_default_data="..." > postgresql_testing_data="..." Is not that an other problem ? Maybe we need a generic mechanism to manage instances (think mysql, tomcat, apache ...) ? At least a common syntax, to avoid something like the [check|config][test|check] issue Regards Joris > > If you want to enlist me for testing/script wrangling/etc., > just drop me an email. > > Regards, > Christoph > > -- > Spare Space > _______________________________________________ > freebsd-ports@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org"