Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jfhvR-0000WG-Hz for pgsql-general@arkaria.postgresql.org; Mon, 01 Jun 2020 10:44:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jfhvQ-0008CB-FG for pgsql-general@arkaria.postgresql.org; Mon, 01 Jun 2020 10:44:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jfhvQ-0008C3-4c for pgsql-general@lists.postgresql.org; Mon, 01 Jun 2020 10:44:12 +0000 Received: from mail-ej1-x644.google.com ([2a00:1450:4864:20::644]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jfhvN-0003r9-3z for pgsql-general@postgresql.org; Mon, 01 Jun 2020 10:44:11 +0000 Received: by mail-ej1-x644.google.com with SMTP id n24so8777198ejd.0 for ; Mon, 01 Jun 2020 03:44:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=7uzMSp98pnMQhKhChtlravl0pUO3GDnHEytz5Q0j6IA=; b=YBQvz3vUwPTqlQOOrb2ZJAKb2Yf+uasvWZkw/HylLGWZM23y3phOzkvteHa4SeUbKE mvLl/AOALib4UKvgjzysFrQAGcXx/OagbKLS6gmjE8Py3uaYoxawGlitLNnc7R9c28yL 2qCjm39rRhardARmZNH4VLCPc1YwO2+9bKBhfDJXiHWLGnB8fa3Lak2nWN+7EkKNjVYN 14QcQT5vJz0fHSdWrcNi8V5/6UVw2xzNheSjosArjvEaMhmW8nuBi0R05/e3GYzx5YNw OeLt2RWKXzDqNAe16efCDy7yCqwh37WY//UlPZaChtAG88JQ0nBx+9mXYIhX8Ls7QrOm caPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=7uzMSp98pnMQhKhChtlravl0pUO3GDnHEytz5Q0j6IA=; b=F+vDA8dtn4M1h/OPyT8v2MqNUdCkGqx+YytSUmtKujMbYPzQZpWtsWODpsD6dUoDyY loVpv758EDXEm+qBiEHlTRgJkZy6JLDvcGLy4R41z59qrgsE47dWnJvH4YFf9Sh6VeG9 Roscty4MjriFFqgD+5jBhRERjUaw5xUBo2e4t8TTFPWgzdocWceUq4AqiXtdoQMdaJdC oUk4mRaJ/C7go36T0JUDGeXOrrB+rKb1k7ukt64ZlJrz19ceD8pe038gioZn2Pqd9ENA 26+cU36kn+4IKcYd1aV1VzJHGVFCd1dwwbj+p+x1ldgZg2ckchXgEcq5iF8F+lABe+Q6 Rnlw== X-Gm-Message-State: AOAM530gOuO/sgF3wzPZQCpUfdA5GuEBtqgjkcIomeMM3QZnQDSDSq0r S6JxdLGE0xpLkU5RXmF1VUM= X-Google-Smtp-Source: ABdhPJxl/2F1mUk98oAn1iHU3VpO67213CMELSLo8R/aIm+yVfRrm+c5pihYFUdre9Etx94BeBE7LQ== X-Received: by 2002:a17:907:9484:: with SMTP id dm4mr20075111ejc.56.1591008248212; Mon, 01 Jun 2020 03:44:08 -0700 (PDT) Received: from [192.168.1.8] (241-57-239-77.dyn.cable.fcom.ch. [77.239.57.241]) by smtp.gmail.com with ESMTPSA id p13sm11392071edq.50.2020.06.01.03.44.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Jun 2020 03:44:07 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: How to start slave after pg_basebackup. Why min_wal_size and wal_keep_segments are duplicated From: =?utf-8?Q?Paul_F=C3=B6rster?= X-Priority: 3 In-Reply-To: Date: Mon, 1 Jun 2020 12:44:07 +0200 Cc: pgsql-general Content-Transfer-Encoding: quoted-printable Message-Id: <58EE62CB-0436-41DF-A97F-6A2F07FB48FF@gmail.com> References: <26EC9619620649D1B55C9C95811E4ADB@dell2> <69FF4F48E6FE4A63A2EBD820C5B2B3A3@dell2> <8BAE2216-8683-4DEE-8529-14457F2775BC@gmail.com> To: Andrus X-Mailer: Apple Mail (2.3608.80.23.2.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi Andrus, > On 01. Jun, 2020, at 12:26, Andrus wrote: > My script does the same thing as your comands. no, it does not. And as long as you refuse to understand that, I can't = help you. > I want to create replication server. no, you want to create a streaming replica. > Old cluster is empty, from initdb. Backup is not needed then why the mv stuff? > pg_basebackup uses environment varuables if not specified in command = line. So my script does the same thing. have you looked at the other options? > I tried > sudo --user=3Dpostgres pg_basebackup .... > but got error > could not change directory to "/root": Permission denied try sudo su - postgres pg_basebackup .... Note the "-"! It's essential to get the environment of postgres, which = is what you want. Cheers, Paul=