Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fpcuO-0003Ea-Ks for pgsql-general@arkaria.postgresql.org; Tue, 14 Aug 2018 17:15:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fpcuM-0001aG-QC for pgsql-general@arkaria.postgresql.org; Tue, 14 Aug 2018 17:15:02 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fpcuM-0001Zw-CL for pgsql-general@lists.postgresql.org; Tue, 14 Aug 2018 17:15:02 +0000 Received: from mail-oi0-x243.google.com ([2607:f8b0:4003:c06::243]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fpcuI-0006rK-Tk for pgsql-general@lists.postgresql.org; Tue, 14 Aug 2018 17:15:00 +0000 Received: by mail-oi0-x243.google.com with SMTP id s198-v6so34959890oih.11 for ; Tue, 14 Aug 2018 10:14:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=7WPexqxa1SASm0E2KaQQclqSwmBKYIOqG9F5UA/gcwE=; b=bjIllYyDaChZhVmifEQJH4WUVxRcmLFAYBLSF3oszRzlxJlPGGnfn/xlHRBAyqIMML OAt3b5xyUhLW1nRn2zcRn0E1H2Zd8lE/RkYpe8K17hCvlGZ20AQvn7H9uZu6OkQ4ElWZ LvsTlVd9rmL3CzHzi+WIUEpGJh5UiPaPYANSUy/MFc3cA2McfKQe/HQ5sP0P4E3n243X M9pMKw46JcDxLWNhs7FuTaggaYdxzXj6S68kfD7ti2Q6vmA+/ibGciI7CdIcLBHgriIk +y/aMz9QsT91i3gyd35nFv0vlKSwMISIOAsXBcV9va5YS5Wf6ewN1PJmGjk9u118dMh2 6dTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=7WPexqxa1SASm0E2KaQQclqSwmBKYIOqG9F5UA/gcwE=; b=Rwa3UpnxOVphdQvgwKGPzt0txyPI09Coy5PFnKIkaspfiITd+EcoqCX1jKhAojgtar lYoFIDdvBIMNHX7tVWwaEd73g16qxolSyDSzEmLbWvtB3h4IU+dEKYuNVZQvMXRk9w35 STBaT3pt7FVBkTypIkcH1xFleMrteKbzoQNRB2BreLif4h2y5lQAcqI5IZ4kjbaoxRIE /lnOroLMT3OUbHQOAxWKIk2Tgo0WfcWtkxAn8u3ZWgMd4mvjedRs4mmLjJDx/2uYx+ea mHKrGAqrGimfH+nRBYza7ezwY8McFuY0dSnYsIclsLdS6cyclHWBbxgu1FibnHysNLdp Zr3Q== X-Gm-Message-State: AOUpUlFUDJtUT/B34E8hbdjmtck5FEB65DQPnwCENSkIr2c/8udhzcxo HcB4w3fOrBf0z8XlYADlX5hc34Gc X-Google-Smtp-Source: AA+uWPyGCQKIMtrqrYNmrxo15CU0fJe0tjDZrkGQIDyIOgkBKiBn5uvmvBS0L/ONz3FTSTCr+MrHuA== X-Received: by 2002:aca:338a:: with SMTP id z132-v6mr21830063oiz.184.1534266897865; Tue, 14 Aug 2018 10:14:57 -0700 (PDT) Received: from [192.168.1.10] (ip70-171-116-89.no.no.cox.net. [70.171.116.89]) by smtp.googlemail.com with ESMTPSA id m7-v6sm21082147oia.32.2018.08.14.10.14.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Aug 2018 10:14:57 -0700 (PDT) Subject: Re: pg_basebackup failed to read a file To: pgsql-general@lists.postgresql.org References: <1534256304.6834.4.camel@hardenize.com> <1887.1534263299@sss.pgh.pa.us> From: Ron Message-ID: <465f0460-608b-39a6-aa15-204c82de6335@gmail.com> Date: Tue, 14 Aug 2018 12:14:56 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1887.1534263299@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 08/14/2018 11:14 AM, Tom Lane wrote: > Mike Cardwell writes: >> pg_basebackup: could not get write-ahead log end position from server: >> ERROR:  could not open file "./postgresql.conf~": Permission denied >> Now, I know what this error means. There was a root owned file at >> "/var/lib/pgsql/10/data/postgresql.conf~" which contained an old >> version of our postgres config and was not readable by the postgres >> user. I'll delete this file and try again. However, in the mean time: I >> feel like it would be useful for pg_basebackup to check that it has >> read access to all of the existing files in the source directory at the >> start, before it begins it's copy. > That seems like a pretty expensive thing to do, if there are lots of > files ... and you'd still end up failing, so it's not moving the ball > very far. Why is checking a bunch of file permissions anywhere close to being as expensive as transferring 1.5TB over a WAN link? -- Angular momentum makes the world go 'round.