Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iFz9o-0006o2-JA for pgsql-general@arkaria.postgresql.org; Thu, 03 Oct 2019 11:20:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iFz9n-0003PK-Da for pgsql-general@arkaria.postgresql.org; Thu, 03 Oct 2019 11:20:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iFz9m-0003P5-W6 for pgsql-general@lists.postgresql.org; Thu, 03 Oct 2019 11:20:27 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iFz9j-0004U2-EW for pgsql-general@lists.postgresql.org; Thu, 03 Oct 2019 11:20:26 +0000 Received: by mail-wr1-x442.google.com with SMTP id o18so2460307wrv.13 for ; Thu, 03 Oct 2019 04:20:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=WEnQYruWNzuasZOtpjx1Enz8bbsC3lncLn9A0TWNYJs=; b=gzOpHF7tnWtHGVexzY7zAgPZdCfiDVnFVS5H2WFUWgIWgbVSL78zQP1XQEKegDGfsf xdYrL0zROcBuHzR9iuq1cDDtrB665Os+kOcFOyxf0o8+xR1N6hpAFoVEINbZEwWYXx2O fL4qW6rZo8sOew5ZhTUY2StLu1dI1FeZzcSWduIiUKYZS90aqRNW0fHcBGlaYGvKT0KK 1Kj16tpKhEKmqu0XnGhDxI2VCjkTk0+lCNnWFJVolwZkkRuOwynM5FXS2339rNZYDc8K nDEQB0B02zjfjrCdLDS3nUu15FP4ummBhbKy8N8UM5PHgu4GBONd2mWfpvPoRcBmL85Y PsLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=WEnQYruWNzuasZOtpjx1Enz8bbsC3lncLn9A0TWNYJs=; b=jIvBnejBlfrx3ZxTzyhqV/6udx9qPoeC1ZBbCGTZN/6yE/5Ze4kA1niE6VYxPocmzV n/je9HVenRbdromIfo7cNyHisMKbGPurVbp/20dPMKFqWk4z5ACZn2e3HADYM7/U0oZp QBTwDKkVTC/1neTaK3C/+Tpp+lnvUQvIJ0c3XhV2el0CNAgHshQn5qJ5AieLeZCmLkui NZ+IVNc0KsfF9uYUThbGM8VbST221v1Z57AIwwcfXpT5JRnTCUHpXpSedDiiysI44TKB fgApCXjOUr9IyYPb51uw/Is4PVYrYnFwxjdCefpcWItuOYnRuXiRVu3JSMlhbnQrLRyl cUxQ== X-Gm-Message-State: APjAAAXR7tn8Ov0ZduFjfnx/O0H2tRIuo+zRBiZDZk1Jt1905bO4mlwZ ChAbobfOurH+im0XgUjbhDlNhpJ92qo= X-Google-Smtp-Source: APXvYqww2Maf6lrdVif9T45dK6XLG0s5kMUNXUNxLE+7M2ow/ipFT9K8GBEJwNNYhHTJoTSkMm24Ew== X-Received: by 2002:a5d:430e:: with SMTP id h14mr6529191wrq.18.1570101621525; Thu, 03 Oct 2019 04:20:21 -0700 (PDT) Received: from localhost.localdomain (217-149-172-64.nat.highway.telekom.at. [217.149.172.64]) by smtp.gmail.com with ESMTPSA id g185sm2153021wme.10.2019.10.03.04.20.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Oct 2019 04:20:20 -0700 (PDT) Message-ID: <76252c7d079e9d6a72b3bf1cc09098c98df070c4.camel@cybertec.at> Subject: Re: Advice for geographically dispersed multi master From: Laurenz Albe To: nikolai@lusan.id.au, pgsql-general@lists.postgresql.org Date: Thu, 03 Oct 2019 13:20:20 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.4 (3.32.4-1.fc30) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, 2019-10-03 at 19:05 +1000, Nikolai Lusan wrote: > So I am looking to move my current setup of 3 separate, individual, > postgres 11 servers into a multi master cluster. > > I have read the various replication and clustering documentation for > postgresql 11, and it looks like what I want is "Synchronous > Multimaster Replication". The organisation I am doing this for does > not have the money to throw at a commercial solution like BRD Don't do it then. As far as I know, there are only closed source solutions for this. 95% of all requests for multi-master replication come from people who know little about databases and just want "a couple of databases that all hold the same data and magically reconcile with each other". Any multi-master solution will require the application to be written with special awareness of a multi-master database. For example, there will have to be special considerations with auto-generated primary keys, and you will have to avoid certain operations altogether. Imagine this situation: DB 1 DB 2 DELETE FROM tab UPDATE tab WHERE id = 42 SET id = 1 WHERE id = 42 If these statements are executed at the same time on two databases and then replicated, DB 2 will end up with one row more in the table than DB 1. Try to find a solution with a single master database. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com