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 1oKR6l-0006jo-7m for pgsql-general@arkaria.postgresql.org; Sat, 06 Aug 2022 21:13:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oKR6k-0000sL-25 for pgsql-general@arkaria.postgresql.org; Sat, 06 Aug 2022 21:13:18 +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 1oKR6j-0000rf-M0 for pgsql-general@lists.postgresql.org; Sat, 06 Aug 2022 21:13:17 +0000 Received: from mail-oi1-x22d.google.com ([2607:f8b0:4864:20::22d]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oKR6d-0008VT-CL for pgsql-general@lists.postgresql.org; Sat, 06 Aug 2022 21:13:17 +0000 Received: by mail-oi1-x22d.google.com with SMTP id c185so6357818oia.7 for ; Sat, 06 Aug 2022 14:13: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=aoE1Syev5TvgfpshILIvm+drRaZ4RKHU9uoAEdRGgco=; b=LV73Fo1x2mppS0MHQMoXDmefcU282YxMeFFQEvDcAINNrmZ5yaZtnCOEJyn+/TLs/O 3kRdxDN2cWAQP7wX4dZMAKkjkReaTI7PrjKJVYD3OkRRZyI3huX2MdZq2UrVB01d+2un jgq6dIuBGCIwr1gjtYFytnVPzVT6lC4SbgKof+KoXaGx5odGvh57YJ3FhOdPQhZd+fG/ 4huclK/DVF8AVkp/NVFrGdd1S8KvOshFqWMbeXONM6+OAYoPCkyqtc7YiyzqfkyLOhBM s8MW90u8yxe3roPEWO5M+JxE6Z9YZUoi5Jhq9a8qcIatbShEEaDOFEL2SSotaK9afpaS Z6Zg== 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=aoE1Syev5TvgfpshILIvm+drRaZ4RKHU9uoAEdRGgco=; b=SDFFuRKQgJUHAgcjklbiUAX3LjBOQuGPpnbfdq9xLGD3aOVLCVFcZiGU8HLmBja3KX FJ4dpkuxp8xpHSCG9Bv6VXWaEmtg5w3pWJUdJwIujLbWzvhrFuPeJMe9ER0GKu1WaTJ4 YpW0icJJH5eZeEubjboYNjAQNKx9dN8c/JQ1Su/E9gOdGN3WpCXI68O/TujPSng7gpVm BSBQDQmtoDMOEClkseSgbGaTANR8uXlW5FYrzU8p5yfoCJirDmC7758bKAlTu4m0prbM 5ELP8NXdORLN/nsl0GpSvVHW3dTznDGO3HtMjEVthXREZLae5N6A86VD0WG2/T9alN9u UE4w== X-Gm-Message-State: ACgBeo2pBDmiCNn01tn5tzCBOGfR2457X7yfinT7oIk4A9XPDfRzFOpe CLsMRAc1ofygM2hDExU/Uuwg+7AOdfA= X-Google-Smtp-Source: AA6agR44fCUJELC/BKryPxHGSGhRhoETsHIM2KHryNKsjmByPObc5l5eGfWVSluB+iXY3iyBEoE9rQ== X-Received: by 2002:a05:6808:30a5:b0:33a:9602:db31 with SMTP id bl37-20020a05680830a500b0033a9602db31mr8504487oib.157.1659820389132; Sat, 06 Aug 2022 14:13:09 -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 u3-20020a056870d58300b0010e00d6a1c0sm1443833oao.51.2022.08.06.14.13.08 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 06 Aug 2022 14:13:08 -0700 (PDT) Message-ID: Date: Sat, 6 Aug 2022 16:13:08 -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> <8c166f4e-1e66-3016-205c-4b244c4d573b@gmail.com> <20220806204532.6zofkznvzgprckfa@hjp.at> From: Ron In-Reply-To: <20220806204532.6zofkznvzgprckfa@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 15:45, Peter J. Holzer wrote: > On 2022-08-06 15:06:06 -0500, Ron wrote: >> On 8/6/22 03:40, Peter J. Holzer wrote: >>> 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). > Doesn't synchronous mean that a commit only returns when the transaction > has been replicated? Correct.  I don't know what I was thinking when I wrote that. Probably that transaction log data gets queued up and not deleted if it can't send the data across. > (The database can work on other transactions in the meantime, but that > client is blocked.) Eventually any client doing writes blocks.  Readers might block if a writer took an exclusive lock, -- Angular momentum makes the world go 'round.