X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@lists.alpinelinux.org Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by lists.alpinelinux.org (Postfix) with ESMTP id 90F973617A20 for ; Fri, 14 May 2010 06:40:22 +0000 (UTC) Received: by fxm17 with SMTP id 17so1225985fxm.13 for ; Thu, 13 May 2010 23:40:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=RDYyHfn6ooLARAwexdibblX5a70/qrLAV8ezlmbU70U=; b=X2+3+brUFi3KvXq686/FCma05yvNlVRt25LSM4z+gULZ9sOYd7xFuxO/HJjIfmiC4H lqyIS9r0QZkHtTs1y6nV3wRyT2K6wysX1KpCe+IBpS3JbA2fEk8bl+nLoCzE2EyEUa3g eWnXziYNFLPsAGaRbR2yNGm0XtaO3O7buO9Ws= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Bp/8zEGML6ox3QpffGdy4qhMlvn6gd9Sw69c5ovibjQ8SXz0GXzjwoohNZqpVLqpRJ OczPgCLy0FGPqBrcF3IQVortLncNzusMHYZ5VHx+066K7t4X+D/QEBXI3GaVDR906xJK EIWABmQOPNnRGSDff2AC4bo56t6W07CrKn3m0= X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Received: by 10.204.134.211 with SMTP id k19mr88944bkt.48.1273819220821; Thu, 13 May 2010 23:40:20 -0700 (PDT) Received: by 10.204.55.4 with HTTP; Thu, 13 May 2010 23:40:20 -0700 (PDT) In-Reply-To: <4BECA826.70805@nothome.org> References: <4BEB97F0.4060304@nothome.org> <4BECA826.70805@nothome.org> Date: Fri, 14 May 2010 08:40:20 +0200 Message-ID: Subject: Re: [alpine-devel] Patch to postgresql init script From: Natanael Copa To: Nathan Angelacos Cc: alpine-devel@lists.alpinelinux.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Fri, May 14, 2010 at 3:32 AM, Nathan Angelacos wrot= e: >> I'm not too happy about storing the password as cleartext though. >> > > Agreed. =A0If pg-restore has access to /etc/conf.d/postgresql, I see no problem with sourcing /etc/conf.d/postgresql manually from pg-restore sice they are both provided by same package. > I think we can > safely assume your pg_hba.conf must allow "trusted" authentication over > unix-sockets for the postmaster. =A0 =A0 Then pg-restore can use the same= su -l > $PGUSER .... trick that the main postgresql script does. yes. I think we want use the su -l $PGUSER trick. > > Before going of and coding a solution, I propose: > > =A01 Backup p*.conf files using standard Alpine Linux methods (lbu includ= e) > =A0This means $PGDATA/p*.conf files may exist before services are started= . > =A02 Keep the postgresql AUTO_SETUP code, but set AUTO_SETUP as the defau= lt > (that way, apk add postgresql && rc-service postgresql start "just works"= ) > =A03 Enhance postgresql setup to check for $PGDATA/base not $PGDATA; if > $PGDATA exists, but $PGDATA/base does not, handle any existing $PGDATA/* > files gracefully. > =A04 Use the pg-restore script as before; it can now depend on postgresql= even > with local changes to the $PGDATA/p*.conf > =A05 Have pg-restore source /etc/conf.d/postgresql for the PGUSER variabl= e, > and depend on a local unix-socket "trust" mechanism for restoring the > database. > =A06 use the pg-restore stop function to make a backup (if defined in > /etc/conf.d/pg-restore); start to restore a backup. I think this sounds good. > The Alternative proposal is to put the functions inside of postgresql ini= t > script itsef. =A0This eliminates point 5 above, but does not really simpl= ify > anything else. > > Comments? I think its nice to have the scripts separated, but no strog feelings there really. Do what you think is best. Thanks alot for following this up. --=20 Natanael Copa --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---