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 1fueRH-0001dj-2F for pgsql-general@arkaria.postgresql.org; Tue, 28 Aug 2018 13:53:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fueRF-0004UI-H7 for pgsql-general@arkaria.postgresql.org; Tue, 28 Aug 2018 13:53:45 +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_SHA384:256) (Exim 4.89) (envelope-from ) id 1fueRE-0004U3-Cz for pgsql-general@lists.postgresql.org; Tue, 28 Aug 2018 13:53:45 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fueR9-0003TA-Gz for pgsql-general@lists.postgresql.org; Tue, 28 Aug 2018 13:53:43 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 0432B215B2; Tue, 28 Aug 2018 09:53:38 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 28 Aug 2018 09:53:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=44G/7aLGXFbUtGfHaK02V78xbnlDD FCXHTLXFcWndqE=; b=YtBVw4uarfytcLna4kCHpkKZVHpk4z67nZgzHPUSquYFQ bAJbSCZyRGIRYNe2uH1E5cGJeVSlhqKs6SEKXg/KzLvZ7+kLLBkorey5NmYvOPdR YnUSZD8u7T/BmQQidMQc1t3JTYQ5/Zs8JT/zJod44dnKZoqK6AxRCPc6J3vAAEv7 RFgy9lTZNXEst3oFLx3JlYXz4TOyNo8ajBAkj1hXfUohKPU1J6ycSt1vcm05c7E4 M5FY5F32jMM34FqFSkzO0B9wQ3DyNGANgexjSk7Z+31l3d8j1oBZ6VLJW/yObdAm 78CQ23BW2oEgk944fgXXdzPjsm31GTeVCyUpN+t8Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=44G/7a LGXFbUtGfHaK02V78xbnlDDFCXHTLXFcWndqE=; b=gbX0wqPtyRoA8fVxIdNNYu 3VFYCPkf9da4u8q616+NjpEnelj/3q0sIV5xheK0XFYTbEDMk16FOcKboDO24MK1 8TfIAWJSzwcBMejxd4UnzgGR78UuovUHGbDLB3OqlBmzStp/orS7dx0bcOoRQPSM ynpjqd5k/g9oO9cVZFqn6mVaAk+NzWHDEToOf6AhkTfTkYNHZjxkrL1mOw3L6Trc ZUOuBbtOgbJpPMlv1MGHTafbrQINjcuXK8LlVCxJY7WTUFPwAzZiMvqDJgDcTIsm gwsVD4VYr7DHtRxyQO01tcosFLLPy5cPwM8SFOt4HdnnkkII8uRYxFR9ib0JcNXw == X-ME-Proxy: X-ME-Sender: Received: from [192.168.1.3] (unknown [71.212.134.3]) by mail.messagingengine.com (Postfix) with ESMTPA id 35E9410269; Tue, 28 Aug 2018 09:53:37 -0400 (EDT) Subject: Re: pg_basebackup + SSL error: bad length To: Csaba Ragasits , pgsql-general@lists.postgresql.org References: <20180828024924.GD29157@paquier.xyz> From: Adrian Klaver Message-ID: <41761a1a-ca9e-e712-96ae-eff259e39c7a@aklaver.com> Date: Tue, 28 Aug 2018 06:53:36 -0700 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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 08/28/2018 01:58 AM, Csaba Ragasits wrote: > Hello, > > Only one copy is from the pg_basebackup on the machines. > > I have only a tablespace only a different location: > /srv/pgdata/tbs_int303 > > I think I solved the problem: > > When I delete manually the /srv/pgdata/tbs_int303 folder, the > pg_basebackup is running fine. Was this tablespace active? Went back to your original post and realized I skipped over this: "pg_basebackup: directory "/srv/pgdata/tbs_int302" exists but is not empty pg_basebackup: removing data directory "./main": Is /srv/pgdata/tbs_int302 a tablespace also? Found this: https://www.postgresql.org/docs/10/static/app-pgbasebackup.html "Tablespaces will in plain format by default be backed up to the same path they have on the server, unless the option --tablespace-mapping is used. Without this option, running a plain format base backup on the same host as the server will not work if tablespaces are in use, because the backup would have to be written to the same directory locations as the original tablespaces." Looks like you need to use: -T olddir=newdir --tablespace-mapping=olddir=newdir > > Thank you for your help, > Csaba > > > 2018-08-28 4:49 GMT+02:00 Michael Paquier >: > > On Mon, Aug 27, 2018 at 04:40:34PM -0700, Adrian Klaver wrote: > > Is there more then one copy of pg_basebackup on the machines? > > Or this user has created a tablespace directly in the main data folder, > which can cause pg_basebackup to fail because of recursion issues.  It > is no wonder that a WARNING is created during a CREATE TABLESPACE if you > do that. > -- > Michael > > -- Adrian Klaver adrian.klaver@aklaver.com