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 1oprSK-0001zt-Or for pgsql-admin@arkaria.postgresql.org; Tue, 01 Nov 2022 13:37:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oprSI-00054u-OZ for pgsql-admin@arkaria.postgresql.org; Tue, 01 Nov 2022 13:37:26 +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 1oprSI-00054k-EK for pgsql-admin@lists.postgresql.org; Tue, 01 Nov 2022 13:37:26 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oprSB-0004Wa-LL for pgsql-admin@lists.postgresql.org; Tue, 01 Nov 2022 13:37:26 +0000 Received: by mail-wr1-x431.google.com with SMTP id g12so20121424wrs.10 for ; Tue, 01 Nov 2022 06:37:19 -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=CcJGSH0YijCjGeTmO7P+TgUnR1UBGnkmpS8rRfZI6Gw=; b=DLFsQCrLfg86urZxgXKchA7kxw8tB1J6rpZlkvWUtCvV8gt2gRSeXRnbDbXuXXOpfz ZAtID4b2xuUFC2DRBNQvYWnSmRSw+JHQcJDxKERh6kdqkQA0thCW0cj6/JqIHAD5I1OZ +XHkOyAoorxo6NRrUQYbS5oJmgMO0R0Wn/mNyMZkmk7QamMKdhuB8y55vyukvp3KUDPq WtKlRZ6k4ing/4SdWuXdXl1gB16pE132woJQGZa8PaGvT+htS2+TUurrsntBr1sh/QF6 OSJohRa2Kqv8QwD3vE8ZaDD9aQ3KXTx/mNP98e7C936CDblZktiKv0atydWoTrzclc3I Zraw== 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=CcJGSH0YijCjGeTmO7P+TgUnR1UBGnkmpS8rRfZI6Gw=; b=4YQRsIGrMvun6KTE/ZvZUNCK1XTcqB3iXYy7uUJ8c8BXna7CHAqpvIuNDSv/iDK3pL QNpPfEH/pJpzWnZEokez+J+ne5/zC+JuKeC0UoB2qpRcFxSr+F4FlDdz5RumS3TiTDvz qZZtUPB4FACulw8fbXHEvuheYBLmKGKaacMqGqLklu1sXq8EW8b/o3NxZKpJ7NWPIaD3 9RvmAvi7kVt6TeKnbNUUyUozKwzt++VepJKkENpei/8jKi/92ioYnaCIFOsWTE+xo9J6 jNmx/c+xYYkMdsxLfs9WSaxzJSbJxYzmrVbzcArtX9ahrSx6pLWcDYrEG/3B5+7vEw1L Us8Q== X-Gm-Message-State: ACrzQf3/wwvWdXmi4GYNLQrx3W6wtN9on5oIYusfnJyXzVMehOBRJ72R RXr4giZ4orj5TBrkcwjclAjpS6kQgToeWA== X-Google-Smtp-Source: AMsMyM6NhKTGEW+NoGL7Q8jVHuqrOhqP6QGd/BhSGlH2eZI8Yr5fS0ZDsV5Yly26FmSiaSgsTG0M7A== X-Received: by 2002:a5d:598d:0:b0:236:8ef4:7324 with SMTP id n13-20020a5d598d000000b002368ef47324mr11828935wri.84.1667309838662; Tue, 01 Nov 2022 06:37:18 -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 p10-20020a1c544a000000b003c71358a42dsm11073637wmi.18.2022.11.01.06.37.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 06:37:18 -0700 (PDT) Message-ID: Subject: Re: finding best possible new master in case of failover? From: Laurenz Albe To: Sacheen Birhade , "pgsql-admin@lists.postgresql.org" Date: Tue, 01 Nov 2022 14:37:17 +0100 In-Reply-To: References: 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: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 2022-11-01 at 07:00 +0000, Sacheen Birhade wrote: > In a multitarget replication (a master with multiple slaves) withasynchronous replication mode, > How can We find best possible new master in case of failover? Pick the one with the latest pg_last_wal_receive_lsn(). Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com