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 1oJY0I-0001XO-Gh for pgsql-general@arkaria.postgresql.org; Thu, 04 Aug 2022 10:22:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oJY0H-0001C8-EJ for pgsql-general@arkaria.postgresql.org; Thu, 04 Aug 2022 10:22:57 +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 1oJY0H-0001Bz-3Z for pgsql-general@lists.postgresql.org; Thu, 04 Aug 2022 10:22:57 +0000 Received: from mail-oa1-x34.google.com ([2001:4860:4864:20::34]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oJY0E-0002ns-Pr for pgsql-general@lists.postgresql.org; Thu, 04 Aug 2022 10:22:56 +0000 Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-1013ecaf7e0so23753033fac.13 for ; Thu, 04 Aug 2022 03:22:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to; bh=KA5GGAsYffQ2KFyZpoO+eGydqOLgC3KClag3HF9llz8=; b=puTNKdMNZ0gijtUobxf497/SCKgccxge3AcKwdVStsZZ/rVmar4ZmpHuIxn8ZK1pb+ 6lm/2urTdputP2YRQLV3DDhSfnJUrqrvkn4WKdnVLhwZ58bfFv6Z3uWQQ49dzjPUjcKY J6LZQJ9RFFSs+hLx9xCtL3pZrZGXiMBn54IzTHf03mCJKzA7gy7F4QBfMQpuHBNkA81f WNyQory6jCNGhCBSrOIyVa33ELCJvCxNKbVdVK0g8WEiPzyDqSlPdMkPNdOdY1jBJUbC KO2jBzB4VM3eRt6TBGSrlKXCXB9Wv7cfW0cbuTnwmwC8qPLRZQEeKZ2Y/WWnvNBJRr0Y 2dVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to; bh=KA5GGAsYffQ2KFyZpoO+eGydqOLgC3KClag3HF9llz8=; b=6v8DAzgF8BK4Ra8yq2Yz2e6acKd9fDEYCp05SETd4Rd9J4D3vcVFkhkKadW6COjxVz Vj5Lb27JwneXcPjYsRjpLu95zX5ODY3QNPlsJgBKKUuT10aodTmocylPQ+9UBR3VDpj5 f7UFgb3SgLLvASX2A2xoNgCqok8KkYBcBPXyN/enJuxmF+/klHrQQ9+QohG5TpNVQWn8 Xqoc4gqJddPpg7qkkCdDH4T/n160DLpSbdola8qs36tUU4z2P+iPoWKyY6UFRqFJXRLv kKrV7myQYvvAdeUJ+veYEdr36Db0IvtxVyxMqAE5+lazFXDH+gx22jmBW9zgTCZ74tkH cOdA== X-Gm-Message-State: ACgBeo1n1gvWsu3lm4KXKvUVj20Bdn28qcTVWC59y+NZ+YwiTr7odtZm sivt+7AbVR2vqCllH+NmrK0z1pz06nk= X-Google-Smtp-Source: AA6agR5dNTeIA6GfsR3ERMW7DhELv0DxINoaAfHaaZ6BxV7tT4JdBshcfQJByj5q2YwGKSytpZ0KxQ== X-Received: by 2002:a05:6870:f6a4:b0:10e:2561:e6c8 with SMTP id el36-20020a056870f6a400b0010e2561e6c8mr517932oab.187.1659608573914; Thu, 04 Aug 2022 03:22:53 -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 y5-20020a056830070500b0061d41301666sm81087ots.30.2022.08.04.03.22.53 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 04 Aug 2022 03:22:53 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------HX4y0t0i4Fa2Ld0KLjkzRV80" Message-ID: <4f65670a-443a-7e35-3b44-88a874b402b0@gmail.com> Date: Thu, 4 Aug 2022 05:22:52 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: How to choose new master from slaves.? Content-Language: en-US To: pgsql-general@lists.postgresql.org References: 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. --------------HX4y0t0i4Fa2Ld0KLjkzRV80 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 8/4/22 02:43, Sacheen Birhade wrote: > > Hi All, > > I have a very basic question about streaming replication feature of Postgres. > > Let’s assume I have servers A, B, C, D, & E with postgres installed with > streaming replication as follow: > > A à B ( sync replication ) > > A à C ( async replication ) > > A à D ( async replication ) > > A à E ( async replication ) > > A is master & rest are slaves. > > Now my question is: > > Assume replication link between A & B may/may not stable.  If A goes down, > how will I choose my new master from slaves? What are criteria to choose > new master? > By "link between A & B may/may not stable", do you mean that B might not actually be synchronized? -- Angular momentum makes the world go 'round. --------------HX4y0t0i4Fa2Ld0KLjkzRV80 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit On 8/4/22 02:43, Sacheen Birhade wrote:

Hi All,

 

I have a very basic question about streaming replication feature of Postgres.

Let’s assume I have servers A, B, C, D, & E with postgres installed with streaming replication as follow:

A  à  B ( sync replication )

A  à  C ( async replication )

A  à  D ( async replication )

A  à  E ( async replication )

A is master & rest are slaves.

 

Now my question is:

Assume replication link between A & B may/may not stable.  If A goes down, how will I choose my new master from slaves? What are criteria to choose new master?


By "link between A & B may/may not stable", do you mean that B might not actually be synchronized?

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