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 1opruS-0003BW-6B for pgsql-admin@arkaria.postgresql.org; Tue, 01 Nov 2022 14:06:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1opruQ-0000pK-6r for pgsql-admin@arkaria.postgresql.org; Tue, 01 Nov 2022 14:06:30 +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 1opruP-0000ns-QF for pgsql-admin@lists.postgresql.org; Tue, 01 Nov 2022 14:06:29 +0000 Received: from mail-oo1-xc35.google.com ([2607:f8b0:4864:20::c35]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1opruM-0007HF-H2 for pgsql-admin@lists.postgresql.org; Tue, 01 Nov 2022 14:06:28 +0000 Received: by mail-oo1-xc35.google.com with SMTP id c13-20020a4ac30d000000b0047663e3e16bso2064678ooq.6 for ; Tue, 01 Nov 2022 07:06:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=GPtQCNfNUzEtJiNx4eJoxKPwjOPi5WGW1vrX5rRP8iU=; b=flLZDd7/r89qg6JtmBcCVqophNX48LBSUQq2hiVTzZ8fj1ZI4UADTsE9YpUaA92Kaf 9HAHtl8FrGR6u/MGrnOqPAHdtiRlbhH3ZXmlnGO+aCKQLO+qErJDAYjeN29eIHbamY8x KMrKgZpGjphfC9KUlH//BkEw1kiNwOasY9vUB7cS01BrhwzG3VwK4phyi7A8rVDV28O+ Io1rjbj5ggiCsYKhPshmRMFO/utcxgKIYgHffFgtNZ0a4PQz3Q+Fy3ZmUz1xZ2IHKPWB 9ONaAmp2kieZDO+VtNqSVSqfUpUVr+v3JQZlIsEejIDOCY96nJmno5S1OvX2TGIfbXmF tg/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=GPtQCNfNUzEtJiNx4eJoxKPwjOPi5WGW1vrX5rRP8iU=; b=2OMgAyGofS19RPVQrxFAfD/AoAUFN2SFVoP251jIemzu8+7tzhZKmebNYaTo0RC+9J lo/tSyT4qfSQFWq5vPAjHXQMwDH4vtDeYtjdQLb8Wm+F70YNS66Ix6VE8w9AQWRUuyHt jfWnWc4/RTDkLUly+5sQnNZT6Oi2t7XCyoiQnC+0SHiu33g3XdU1Bved4UGijYRiu1Rs ExKX50L/9vgrl1ueps8SaUWFam7n0bOOfttXvBZuKFWwufPKWtpGL0U9bE0B+XMY47Tr WIsIqeVXHaEhYcoafYp7Ect07b1EnxcU42jXSpqB3HZOWQW9kqa8acFnWmHOpHYWc87+ MxEw== X-Gm-Message-State: ACrzQf0mXMXXovXCWye+PrAVR/72rJabMtU5/TX8vJzX6USsvyHqx4lK kV9hFWOHvMVCnk1Uq/d0z5jzMQxvSfw= X-Google-Smtp-Source: AMsMyM4a5NqU9eSMFTbGZ4luRXEIQmFubQQG9A/xvGp7rr1+se+zmQpvZLxFEwHss3/umsflOxPoLw== X-Received: by 2002:a4a:d797:0:b0:476:9152:3d9f with SMTP id c23-20020a4ad797000000b0047691523d9fmr8100233oou.87.1667311585718; Tue, 01 Nov 2022 07:06:25 -0700 (PDT) Received: from [192.168.88.10] (ip68-11-68-85.no.no.cox.net. [68.11.68.85]) by smtp.googlemail.com with ESMTPSA id a13-20020a4ad5cd000000b0049427725e62sm3411769oot.19.2022.11.01.07.06.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Nov 2022 07:06:25 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------P06xi67MmFUpqep0IpPthA0w" Message-ID: Date: Tue, 1 Nov 2022 09:06:24 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [External] Re: WAL Replication query Content-Language: en-US To: pgsql-admin@lists.postgresql.org References: <88faef33e966796226022d6e7f3e32ad6c59fcfd.camel@cybertec.at> <8f9e6c92-4daa-a543-6825-05a3503f4296@gmail.com> <42306ea2-74c2-a95e-551d-e1d16946c083@gmail.com> From: Ron In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------P06xi67MmFUpqep0IpPthA0w Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 11/1/22 08:56, Laurenz Albe wrote: > 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 On of the purposes of replication is so that you can fail over to it when Primary crashes, right? > or "not coming back any time soon" (that's why I asked for > clarification in my answer). It does of course depend on what crashes, and how long it takes to restart. Just the other day, Veeam somehow (for at least the second time) broke all connections *to a VM* running under ESX.  It took six hours to get fixed.  That VM was running Postgresql.  If the Pg cluster was replicated, I'd have promoted the Secondary to Primary for my customer. -- Angular momentum makes the world go 'round. --------------P06xi67MmFUpqep0IpPthA0w Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit On 11/1/22 08:56, Laurenz Albe wrote:
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 

On of the purposes of replication is so that you can fail over to it when Primary crashes, right?

or "not coming back any time soon" (that's why I asked for
clarification in my answer).

It does of course depend on what crashes, and how long it takes to restart.

Just the other day, Veeam somehow (for at least the second time) broke all connections to a VM running under ESX.  It took six hours to get fixed.  That VM was running Postgresql.  If the Pg cluster was replicated, I'd have promoted the Secondary to Primary for my customer.

--
Angular momentum makes the world go 'round.
--------------P06xi67MmFUpqep0IpPthA0w--