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 1oprkq-0002ll-82 for pgsql-admin@arkaria.postgresql.org; Tue, 01 Nov 2022 13:56:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oprkp-0002o3-0h for pgsql-admin@arkaria.postgresql.org; Tue, 01 Nov 2022 13:56:35 +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 1oprko-0002nu-LP for pgsql-admin@lists.postgresql.org; Tue, 01 Nov 2022 13:56:34 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oprkm-0004nV-Es for pgsql-admin@lists.postgresql.org; Tue, 01 Nov 2022 13:56:34 +0000 Received: by mail-wr1-x42e.google.com with SMTP id h9so20269943wrt.0 for ; Tue, 01 Nov 2022 06:56:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=JD/vaSOolTZqCDnkTI3u2sbyL0UJrYhSWWYD/EaXcVo=; b=hCr79pk4oXJnP7v4HS6dvwX9HQXzgWX9UYIwNcPqlcsJQ2sI34Dv0+nPy7naqVoK8n b+226TCr+954cE+qsGQv1dLAygkBP7RJ8dlRRvrS0QbpgZTpjUGFziUCudlJjG+fGEBw Wvxs07vgjffSSELvQ1fdsrKrq0OGr1jxfF4J6P+041u78batpMWl8WxHezH3iLPLMuxA ps6s2HTwqIkZgQZ2Dmv1udGUHOquZEDnXkcfBf4xI7jDZFBJTyVdPG6GWxO+XBg2bdSy kzRLHsSBvo6EKk2ZTiy+2kpzqbrSmNIfzVZR2ewo+TboBuZj7EYB5vux4shWVMvr9MMb Mjhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=JD/vaSOolTZqCDnkTI3u2sbyL0UJrYhSWWYD/EaXcVo=; b=gVKw/ZrniURh4QLooO0TYfCUgpcybK62VCnyF+/tKqfkVpMRN3F7bEOql4GiuCq0uD En8yScllEv2sWA7xiyWv5dt7FYPLmYQyYDXeyjn4N0Tphqi0ZZhqJBdOqGLJwYQcyKHt 46gommtXYN+vNUJPV/6zvzah7YAJnvAXgAna0rHMp9Wmemr4Yq+ful4RX2M/Zs4LF1b2 1Is81DhG6871gPJcjzW1TBdfF4tXSdcywrbDb3oKrKzpgHMH0tJWOARyGNH+0Qm87hma 51nj0SFqFf1k0W8P3IWyZENrTuwxrgd+oGxQzrUbJRAC/KdYnHQynGvH5/ZxPNtQ53CQ 07CQ== X-Gm-Message-State: ACrzQf1UaUpVpqmoj5ga3HnUs7gaBv1/g2Ooo/BJrDetLFyc6L/NOAMy IgMAZrvImwqvgUdorGL9bBRd6VSrO2YAqg== X-Google-Smtp-Source: AMsMyM7PLEI6MxTn6zM3IMH+vu7OLbMM0jI7sm07pG46pFdeN4jGOHvA0ApKeW2xjH3eEWPhPZjBBw== X-Received: by 2002:a05:6000:1361:b0:236:9ab7:8e3b with SMTP id q1-20020a056000136100b002369ab78e3bmr11632607wrz.707.1667310991422; Tue, 01 Nov 2022 06:56:31 -0700 (PDT) Received: from localhost.localdomain (178-190-182-20.adsl.highway.telekom.at. [178.190.182.20]) by smtp.gmail.com with ESMTPSA id i39-20020a05600c4b2700b003a6a3595edasm11770408wmp.27.2022.11.01.06.56.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 06:56:31 -0700 (PDT) Message-ID: Subject: Re: [External] Re: WAL Replication query From: Laurenz Albe To: Ron , pgsql-admin@lists.postgresql.org Date: Tue, 01 Nov 2022 14:56:30 +0100 In-Reply-To: <42306ea2-74c2-a95e-551d-e1d16946c083@gmail.com> References: <88faef33e966796226022d6e7f3e32ad6c59fcfd.camel@cybertec.at> <8f9e6c92-4daa-a543-6825-05a3503f4296@gmail.com> <42306ea2-74c2-a95e-551d-e1d16946c083@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 2022-11-01 at 08:49 -0500, Ron wrote: > Primary has crashed, according to OP; it's not coming back any time soon.  And thus you promote > Secondary to be New Primary, and go about  your work.  When the Old Primary comes back up > (hours or days later), you do a pg_basebackup to make it the New Secondary. There was no word about failover or "not coming back any time soon" (that's why I asked for clarification in my answer). In fact, PostgreSQL will often undergo crash recovery and come back up automatically. See the parameter "restart_after_crash", which defaults to "on". Yours, Laurenz Albe