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 1jfdLc-0007wN-Em for pgsql-general@arkaria.postgresql.org; Mon, 01 Jun 2020 05:50:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jfdLb-0002Be-9t for pgsql-general@arkaria.postgresql.org; Mon, 01 Jun 2020 05:50:55 +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 1jfdLb-00029g-1x for pgsql-general@lists.postgresql.org; Mon, 01 Jun 2020 05:50:55 +0000 Received: from portal-smtp-out.hot.ee ([194.126.101.125]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jfdLW-0000Wj-SO for pgsql-general@postgresql.org; Mon, 01 Jun 2020 05:50:54 +0000 Received: from localhost (localhost [127.0.0.1]) by vm-hot-relay10.estpak.ee (Postfix) with ESMTP id AD46D1BA4; Mon, 1 Jun 2020 08:50:48 +0300 (EEST) X-Virus-Scanned: Debian amavisd-new at vm-hot-relay10.estpak.ee Received: from portal-smtp-out.hot.ee ([127.0.0.1]) by localhost (vm-hot-relay10.estpak.ee [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xfn7VJfQTpJD; Mon, 1 Jun 2020 08:50:46 +0300 (EEST) Received: from mail.hot.ee (hot-relayhost3.estpak.ee [213.180.2.81]) by vm-hot-relay10.estpak.ee (Postfix) with ESMTP id 79C271A90; Mon, 1 Jun 2020 08:50:46 +0300 (EEST) Received: from dell2 (66-63-196-88.sta.estpak.ee [88.196.63.66]) (Authenticated sender: kobruleht2) by HOT-Relayhost3.estpak.ee (Postfix) with ESMTPSA id 49b45x0DyLz2G9; Mon, 1 Jun 2020 08:50:43 +0300 (EEST) Message-ID: <74A42D0ECD334244813128ADE21A2DD4@dell2> From: "Andrus" To: "pgsql-general" , "Adrian Klaver" References: <26EC9619620649D1B55C9C95811E4ADB@dell2> <16e57e3f-5c26-fd55-d42a-f030c8550952@aklaver.com> <102C5FA16F1549659B393B6A824B561F@dell2> <698dbad1-e3b2-f13a-8e97-8ce01efed516@aklaver.com> <246B62BD5BB44DCE8AEB15CA9723CDCE@dell2> <16629afe-a53c-76e4-ef1e-a0a5ceba2d71@aklaver.com> In-Reply-To: <16629afe-a53c-76e4-ef1e-a0a5ceba2d71@aklaver.com> Subject: Re: How to start slave after pg_basebackup. Why min_wal_size and wal_keep_segments are duplicated Date: Mon, 1 Jun 2020 08:50:38 +0300 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="windows-1257"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 16.4.3528.331 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3528.331 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi! >> I want to create hot standby async server using >> /etc/init.d/postgresql stop >> mv /var/lib/postgresql/12/main /var/lib/postgresql/12/mainold >> pg_basebackup --write-recovery-conf -D /var/lib/postgresql/12/main >I don't see where the base backup is being taken from just where it is going. It is taken from VPS server over 20 Mbit public internet connection. Both servers are running Debian Linux. >> I dont receive WALs. >If you are doing binary replication then you are receiving WALs. It just a matter of whether you are streaming them or shipping >them over complete. Using wal_keep_segments=360 also causes same wal file not found error after pg_basebackup. master server has 6GB wal files. wal log during pg_basebackup is much slower than 360. Maybe pg_basebackup skips wal segments . Maybe using wal_compression=on causes the issue. How to fix this ? How to create base backup so that cluster is tranferred over internet faster? Maybe it can transferred in compressed form over internet. Andrus.