Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jIdzk-0007nN-7m for pgsql-general@arkaria.postgresql.org; Sun, 29 Mar 2020 19:53:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jIdzi-0000ON-TQ for pgsql-general@arkaria.postgresql.org; Sun, 29 Mar 2020 19:53:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jIdzi-0000O8-Lb for pgsql-general@lists.postgresql.org; Sun, 29 Mar 2020 19:53:18 +0000 Received: from portal-smtp-out.hot.ee ([194.126.101.125]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jIdzf-0005Q0-Df for pgsql-general@postgresql.org; Sun, 29 Mar 2020 19:53:17 +0000 Received: from localhost (localhost [127.0.0.1]) by vm-hot-relay10.estpak.ee (Postfix) with ESMTP id DF0B01838; Sun, 29 Mar 2020 22:53:12 +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 XWUrWxJbei9x; Sun, 29 Mar 2020 22:53:10 +0300 (EEST) Received: from mail.hot.ee (hot-relayhost1.estpak.ee [213.180.2.79]) by vm-hot-relay10.estpak.ee (Postfix) with ESMTP id 2EB9715D4; Sun, 29 Mar 2020 22:53:10 +0300 (EEST) Received: from dell2 (66-63-196-88.sta.estpak.ee [88.196.63.66]) (Authenticated sender: kobruleht2) by HOT-Relayhost1.estpak.ee (Postfix) with ESMTPSA id 48r5qS4p5Gz2Yk; Sun, 29 Mar 2020 22:53:07 +0300 (EEST) Message-ID: <1F58997A61424440ADD69D5BD610588F@dell2> From: "Andrus" To: "pgsql-general" , "Adrian Klaver" References: <97FA59FAD55C40FDB8D6882CC29222AC@dell2> In-Reply-To: Subject: Re: Hot standby from Debian to Windows Date: Sun, 29 Mar 2020 22:52:54 +0300 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="windows-1257"; reply-type=response 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! >Since you are moving between different OSes you will need to use some form >of logical replication as binary replication will not work. I can use Hyper-V or something other to run Debian with Windows. This hopefully will also allow to bypass Windows 20 connection limit so that more than 20 users can connect. >Given that you are Postgres 12 you could use the builtin logical >replication: >https://www.postgresql.org/docs/12/logical-replication.html I see possibilities: 1. Use Hyper-V to run Debian container and Postgres binary replication 2. Use Hyper-V to run Debian container and Postgres logical replication 3. Use Windows and Postgres logical replication. 4. Use Hyper-V to run Debian container and backup utility for whole disk block level backup >How that needs to managed is going to need more information. As a start: >1) Downtime allowed? Yes. If main server stops, I can tell users to enter backup server address instead of main server. >2) All databases to be replicated or just some? I can create separate cluster so that all databases and users will be replicated. There are 30 databases with total size 70 GB. Size will increase slowly every day when new data is entered. There are some test and demo databases whose replcation is not really required but those can also replicated if this >3) Permissible lag between servers? Currently backups are created every night and restored in new server. Backup of 67GB data takes 1 hour, transfer 1 hour, restore and analyze to new server 4 hours. Total 6 hours. So current lag in 6 .. 24 hours. Goal is to decrease this lag. >4) How are you going to deal with the down server and how do you plan on >bringing it up again? VPS hosting company will bring it up again. I will then manually synchronize two clusters when users continue to enter data, this is not time critical. Andrus.