Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpbhk-0005tC-Cs for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jul 2019 17:02:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hpbhj-0008NA-8l for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jul 2019 17:02:27 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpbhj-0008N2-01 for pgsql-hackers@lists.postgresql.org; Mon, 22 Jul 2019 17:02:27 +0000 Received: from mail-ot1-x342.google.com ([2607:f8b0:4864:20::342]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpbhg-0001l6-7z for pgsql-hackers@lists.postgresql.org; Mon, 22 Jul 2019 17:02:26 +0000 Received: by mail-ot1-x342.google.com with SMTP id l15so40968600otn.9 for ; Mon, 22 Jul 2019 10:02:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:references:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=AvegkRtOMgSbTtVFbKwlgh0z2wDcM1OW0/wiMnuJ7SQ=; b=TJt2VbSPcM6PdKc+5ZJHRNN/fLEJvOWXbjrFZG3+CkC1mpbsrKfhvjdMfUK7/401GJ C4SZtsKoj8rfpRzAv8rtrbFiScjmGqaK8Ur/voXP0DCkDFr9TP5cqFjIXAOXafKXpNbz ap4Pqu0cbDTcXun8WKh2XkTLMl4h5SRfO3ekBc7g8JDvl6PTpSgL1P9KoWfoCKjhF5we kqCWzwah4lMkz6tW9QuE11okUbF7ZNLhetesVNQa3R8ryCInvhF9loc1aqYY8ktKVXU7 8qV1gZSYQtC77KLIyLSObZ4lyddWNUqtTCECvzMKYTK5gIQCyWB7YHKX8WxZieqvdwxb DfAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:content-language; bh=AvegkRtOMgSbTtVFbKwlgh0z2wDcM1OW0/wiMnuJ7SQ=; b=guu80/UqDfMO0e4prHle4vyzcSlHp9MXYkb/AS6tMMzlSY+H6YrPDH3jWSXWbMJzek C8abTpIDqz1TEt9PAK8fsA53oKVY2O20fp6zOp54h+whP62X6jDFHu9HnfR6Q4CixoSp o99bOZKpbIxuoFAPyxZ0RBCQPzTJjKPEKi9nD8XuHcZgXfqyHRc8M6xWgduWvXOMnacH 7AaSlJEnw23U2RctyQmpB3YE6MG3Jr5u0x7eBFt3k788KY5XgWEiaazmt0cfmxHVfxFs VJh++n7vARodLTwi4Cn0xACx7LfnedbnDUrrm99LG3Au1A+1WEAbxG69VTLHQwDdA/Tf 0e/g== X-Gm-Message-State: APjAAAX15OSdfVI7Q0eOEwhit8o8vF2A/uG1EDqIzcPXn5QZHH4HM7yC tR/2fDlBSiYf1+lpuagsQH2NN9wzWe3s6fmagDUoAi+OVF4LguNgKt63cohsou6RD2/wYuy3+bj tyUlUyp43bSCX09i/3uefKlFi23X3YeWEgSZotAKjlDYMuQT/dxNrMmtJ2VhSpmz0rFSRaup7VA PeVykW7ZcLLeFZWcSk78o/GrM= X-Google-Smtp-Source: APXvYqy+ROY3L4BdzmsEW46zYVciZWRoOBSe0q5U7M56UcBl2kSxQX5Aw6yhOmnxoTKqg7ZfiNokyA== X-Received: by 2002:a9d:7f94:: with SMTP id t20mr53958641otp.370.1563814941791; Mon, 22 Jul 2019 10:02:21 -0700 (PDT) Received: from [192.168.10.146] (99-10-92-30.lightspeed.rlghnc.sbcglobal.net. [99.10.92.30]) by smtp.gmail.com with ESMTPSA id j5sm14025427oih.52.2019.07.22.10.02.20 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jul 2019 10:02:21 -0700 (PDT) From: Andrew Dunstan X-Google-Original-From: Andrew Dunstan Subject: Re: initdb recommendations To: Tom Lane , Peter Eisentraut Cc: pgsql-hackers@lists.postgresql.org References: <20190406180839.GA1921989@rfd.leadboat.com> <96389374-9454-d26d-6f79-7c7b15ec14bd@2ndquadrant.com> <91f8272f-117f-2a04-862b-871a7b86eeed@2ndquadrant.com> <7b6c4220-e5ef-2a13-18ad-af596c52b71a@2ndquadrant.com> <23654.1563804669@sss.pgh.pa.us> <7886.1563812705@sss.pgh.pa.us> Openpgp: preference=signencrypt Autocrypt: addr=andrew.dunstan@2ndQuadrant.com; prefer-encrypt=mutual; keydata= xsBNBE7KWFkBCAClridxur2AIc7eW2AR7izbfp3EnNefie2HbLF0izW5Ik5UjX2HBXBx4syI gY6b0ugohXrr274+baoAlvSbq6cAoQuEVrk5IZFzt20b1Xkx65FwGSEj526yiKLocqkJceSq Xr9xcA5SGY+FZv441chh5SU92v4q6z+6LPpoHOh97ptAVXZYNTtU0LevyvD5lja0TzbvJm6C eFXitJfnm1pLEr0DGJCR/iUOl/N62Kh4855zZC7NHIjQHPOvV5Stz/l5ilDhvGVk+xkXFPys SjZoUr1rXhYLpiyi5sR0X9FHXT0KnGuz1F5ERO7ZTLSSQ6fJwPj6gOk9K+vvoKvoeql5ABEB AAHNL0FuZHJldyBEdW5zdGFuIDxhbmRyZXcuZHVuc3RhbkAybmRRdWFkcmFudC5jb20+wsCY BBMBAgBCAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAUJDyV6hBYhBOQ+WEYd/Hy/RGkV pZn6f8tZ/DuBBQJcH/EVAhkBAAoJEJn6f8tZ/DuB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IHFakgWgOBMuxoWfjONiLjjLh/9+ZIqSSLX Message-ID: Date: Mon, 22 Jul 2019 13:02:13 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <7886.1563812705@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: en-MW List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 7/22/19 12:25 PM, Tom Lane wrote: > I wrote: >> Peter Eisentraut writes: >>> Pushed with that note. Thanks. >> This has completely broken the buildfarm. > On inspection, it seems the reason for that is that the buildfarm > script runs initdb with '-U buildfarm', so that peer-auth connections > will only work if the buildfarm is being run by an OS user named > exactly "buildfarm". That happens to be true on my macOS animals, > which is why they're not broken ... but apparently, nobody else > does it that way. > > I'm afraid we're going to have to revert this, at least till > such time as a fixed buildfarm client is in universal use. > > As for the nature of that fix, I don't quite understand why > the forced -U is there --- maybe we could just remove it? > But there are multiple places in the buildfarm client that > have hard-wired references to "buildfarm". This goes back quite a way: commit 7528701abb88ab84f6775448c59b392ca7f33a07 Author: Andrew Dunstan Date:=C2=A0=C2=A0 Tue Nov 27 13:47:38 2012 -0500 =C2=A0=C2=A0=C2=A0 Run everything as buildfarm rather than local user= name. =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 This will help if we ever want to do things like c= omparing dump diffs. =C2=A0=C2=A0=C2=A0 Done by setting PGUSER and using initdb's -U optio= n. The pg_upgrade test (not the cross-version one) doesn't use this - it explicitly unsets PGUSER. There are a few things we could do. We could force trust auth, or we could add an ident map that allowed $USER to login as buildfarm. Finding all the places we would need to fix that could be a fun project ... We could also maybe teach initdb to honor an environment setting INTDB_DEFAULT_AUTH or some such. I agree this should be reverted for now until we work out what we want to do. cheers andrew --=20 Andrew Dunstan https://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services