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 1oKQ3r-00046z-33 for pgsql-general@arkaria.postgresql.org; Sat, 06 Aug 2022 20:06:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oKQ3p-0002KL-To for pgsql-general@arkaria.postgresql.org; Sat, 06 Aug 2022 20:06:13 +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 1oKQ3p-0002KC-HM for pgsql-general@lists.postgresql.org; Sat, 06 Aug 2022 20:06:13 +0000 Received: from mail-oi1-x236.google.com ([2607:f8b0:4864:20::236]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oKQ3n-00081U-C4 for pgsql-general@lists.postgresql.org; Sat, 06 Aug 2022 20:06:13 +0000 Received: by mail-oi1-x236.google.com with SMTP id q184so6235833oif.1 for ; Sat, 06 Aug 2022 13:06:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc; bh=OITrowNgQFLNVx360ni5tOfmFezdC9gd1TsrZd+EBmo=; b=bBSU9diJ8WCqgal0YNRjJHOj3XRGSVmxeHlZLElqZwwHuceLIrLGbfuimW+p+BM5ms SxTgElFhjkrthT8gniPQNWaPncF4orof1jhFuffJSA1rMxqJOkeotzJwgKCzGdvwGx76 9vB+YUh/YCrV24zLi4UIwvzwLHfmcsgfuGpgq2PumZSz6cixQ7VLX894D/Q667/54Oa+ e8ko6ndIGswix6yeOA6LHI/0wScngkf0KV/odll2C6exfQRzfriMbkXJlTTqBgIml6Tx lb+9kz7559JgKWVKalHw9t9hQTBnlANd5TUkGDHptQbrPugbopsz4yIq5Z3JJotr5NIV YSDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=OITrowNgQFLNVx360ni5tOfmFezdC9gd1TsrZd+EBmo=; b=48S8qHvUk1J3gAHC/8P+gBUubMEDZcVUSdxWsh/susmoiDjEGFZInQgAJ1bs7Kg9OB lMp3wf5iPmw1OHyNqDEaFddwsp7L2SNTRvjLl+qfk7Gm4LPnHo8+5JDOk5Og9CN2F4cc dCespEEGIhmEPCWYe/5TrYOe2IoXWkuFOXpWch5zMhRLm8tFf4fVUgP4UxKd75rURwOv Uzc/6HTGZxlWJ6bt6ZCQWd5tFw7Ra/BmFnPpyaQ9vRRCjSbV3QVrDLwcM8D0s7LufLA3 l8vJvjwIYfpW/XFW/s5A7Nw1+zDAGhAqVY/A+el4wZzIpgl+4mhFhZQVUeun6VqYauh2 Ls2Q== X-Gm-Message-State: ACgBeo1wT+5y/+4V0htciKO9uRJ4EI5yxP0S+vkS8cNK4orhtFl/zhS4 oyxXNob9YyOs3eq7oKPrwOjUP68bpys= X-Google-Smtp-Source: AA6agR7RIFMVO+tZVt12ovx/oCgj/GXblI+dBcwX1mHO1F/FhwF9q/xqWoYdEdGYNJmuv+0jcfg3vg== X-Received: by 2002:a54:4e86:0:b0:342:a9a8:730c with SMTP id c6-20020a544e86000000b00342a9a8730cmr5061174oiy.246.1659816368402; Sat, 06 Aug 2022 13:06:08 -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 j2-20020a056870168200b0010c0d04eb00sm1404368oae.2.2022.08.06.13.06.07 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 06 Aug 2022 13:06:07 -0700 (PDT) Message-ID: <8c166f4e-1e66-3016-205c-4b244c4d573b@gmail.com> Date: Sat, 6 Aug 2022 15:06:06 -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: <20220806084026.cnzhqs3ykuextoyu@hjp.at> From: Ron In-Reply-To: <20220806084026.cnzhqs3ykuextoyu@hjp.at> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 8/6/22 03:40, Peter J. Holzer wrote: > On 2022-08-04 07:43:28 +0000, Sacheen Birhade wrote: >> 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. > Using sync replication on an unstable link is probably not a good idea. > Every time the link goes down, A freezes. Is this what you want? I had to fight my end users about how to replicate a SQL Server database across a WAN.  They of course wanted it synchronously replicated, but I insisted that was a horrible idea, for the exact reason you mentioned (though it "only" freezes when the untransmitted transmitted transaction logs fill of the primary database's disk). -- Angular momentum makes the world go 'round.