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 1l1jsO-0004BA-CT for pgsql-admin@arkaria.postgresql.org; Tue, 19 Jan 2021 05:48:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l1jsN-00060C-4V for pgsql-admin@arkaria.postgresql.org; Tue, 19 Jan 2021 05:48:23 +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 1l1jsM-000604-Qu for pgsql-admin@lists.postgresql.org; Tue, 19 Jan 2021 05:48:22 +0000 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1l1jsJ-0001px-KP for pgsql-admin@postgresql.org; Tue, 19 Jan 2021 05:48:21 +0000 Received: by mail-wm1-x32d.google.com with SMTP id i63so15385155wma.4 for ; Mon, 18 Jan 2021 21:48:19 -0800 (PST) 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=07NVyKOHU/tv3Pi19cijxkYx+j6Tdd7z+4oVlybHIVg=; b=daTkmjDOTTzceY3cCnCab3Z2hn61vj3iSOm0Blad4xlYDIbh1wjmNSh4jsokLC6bCR MAalGt97gkIPPhTZwQ7CYWRm9P7T95bjHgyqlyxLcmnFLV5WEEfpwI1iCtTSLZVt/0+N rWzOMGq49gGAYF7lAe13b7jdEFxqc33Sc8W//k8mYg1rEc9m9CA2AbzTPN9Fwba12fg0 NRNRRiOnqi3GUX64ESQorZegj6Qv5eVfl/C35A+ExWfTdkQ4rZX+mJMS5qgUVeRtcTN9 OZWpQMRXfTcUHLA1T3BPUfGfNxfk4j82bu+F1jy9j3dzme9U2s9JIz0fa8Gj6adj2Xtu 8pqQ== 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=07NVyKOHU/tv3Pi19cijxkYx+j6Tdd7z+4oVlybHIVg=; b=tt+fFCU6yYlnDLza0PbjQ8lUonO9v7nq22ngaK0DQF2ukbFY6DVb+xOx4BBLUMYHxr zsQuFVtNSsLfEq9uA7D/0XeJOngB1ERUcy8IKfQJlrvg6zCAiKjxloa0z48e7QgowBj4 mb+HwMpOv+pj177C6QO/dKuUBY9G3yVbz0de6VXWZuGZXBvno1P83QZjOJKYM/iP6Y6E A9oTjo3fIqa8ncivKeIvTlzOy0nUpr32+dhH70wBj7nYg6uA3HVCkK5krQ7w62XbQ0v4 GIE28QEPsFGpQPNo9xPqbXRng+rVEhtKOoOxY9jMMHStejHC7zoA/u4bhYBVDMUSNd2O fmLQ== X-Gm-Message-State: AOAM531c4l0EF8WLBfQs4WZv5rP6EDL3eSMm5p/xalwLr1mRAWkDfueN Yf5WGAilmgGXRZ+hNPEmraI= X-Google-Smtp-Source: ABdhPJwQIW7BdiiDOtBG/tK53Rmgd5Oa0lPvpT9NVpCOdEtZqN5QOZVELMoY65t2m6DGvPw1eWBxEQ== X-Received: by 2002:a7b:c779:: with SMTP id x25mr2337331wmk.138.1611035298500; Mon, 18 Jan 2021 21:48:18 -0800 (PST) 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 z3sm35997169wrn.59.2021.01.18.21.48.18 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Jan 2021 21:48:18 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.40.0.2.32\)) Subject: Re: hot standby in Postgresql 12 From: =?utf-8?Q?Paul_F=C3=B6rster?= In-Reply-To: Date: Tue, 19 Jan 2021 06:48:17 +0100 Cc: Ankush Chawla , pgsql-admin Content-Transfer-Encoding: quoted-printable Message-Id: <95BFBF96-8C8D-4691-BDE4-918F9F64A9CB@gmail.com> References: To: "David G. Johnston" X-Mailer: Apple Mail (2.3654.40.0.2.32) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi David, > On 19. Jan, 2021, at 04:48, David G. Johnston = wrote: >=20 > And now the standby is waiting for the next wal file to be archived by = the primary. You should probably set archive_timeout to a non-zero = value since the primary doesn=E2=80=99t seem very busy (though you also = still need to do at least one write, empty wal files don=E2=80=99t get = rotated out and archived.) you should be able to get around your problem by doing the following on = the primary database: checkpoint; select pg_switch_wal(); The pg_switch_wal() alone will not trigger WAL file generation if no = transaction has been going on. That's why I recommend forcing a = checkpoint before that (same with Oracle by the way). As soon as a WAL is generated, it should get shipped to the standby = database. Then it should open. Cheers, Paul=