Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u4dP2-0053uu-BE for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Apr 2025 10:20:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u4dP0-007Pl4-Ha for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Apr 2025 10:20:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u4dP0-007Pkw-65 for pgsql-hackers@lists.postgresql.org; Tue, 15 Apr 2025 10:20:27 +0000 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u4dOy-000Avx-1V for pgsql-hackers@lists.postgresql.org; Tue, 15 Apr 2025 10:20:25 +0000 Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-af28bc68846so4741951a12.1 for ; Tue, 15 Apr 2025 03:20:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=timescale.com; s=google; t=1744712423; x=1745317223; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=DXd6TUD7YVpgs/7wsuzmX4Lqi0WffW1DucBXJbjSVJ4=; b=STs7s+e1WNvmhICOZ7R4ww5clyEZ8aXZhEXgtAGcG41OfsoVhfzzgP9BNUv+rFGNqF HM3LqHz2/7QLBCj756WuSb3dfxzWAJa18NkwNDyb7MwVIqX7/qE7fMyr3YGh9JNes2I7 +shoc/RD8/v4dszqbDo+Rrh6uiIZfx12bgmrRtB2e/y03NdHZprbIR1zNpSsLFUMQ/9/ +0c3Da0tD0z7AASGpC8DNzMoiPI+nIYLQI6qVoNtJPy/gX9gxiRN2XcEh6TMlIzPkJ6P 8igAuVtdZXBG7m0sana9Yo+4l7qVlsXC+MLaqjnuDJg7eOu/4XAYFgD2ofoA5rEE2czp PZTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744712423; x=1745317223; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DXd6TUD7YVpgs/7wsuzmX4Lqi0WffW1DucBXJbjSVJ4=; b=qamkC6O0Nyv8nkiYkljTjUwMAYVl20dHfhcurNgXbBT3LQs788Ft+cxKrRTs0AzS4N fiuviSSWoSZJ9oqiUp/ADEITbB0J2FfNK7nNXZ9TgaRMwbqi/10pNQByVKICp7UX7pI5 +UbN/Oy+JXGkAoyfCxl8azK5G3XLB55R1pIMMv/y++0TuVz5X/HOL4hN39wxQFvpaD57 ZxsBDf509h4knHr+6r3s3Bx1L0xGyCvMAyn/aYXADrYSzIYZda/P3Ynq7SCI5J4zJX2G 0LifO6xm1ro5vzX2X/S1d0fSPaa9XdRca0aZGNCCWU0z+fNYlkiNf6TOCxLF6758U8PB HCcA== X-Gm-Message-State: AOJu0Yx36RgnQ//cP0xwz1yzlXnDjtzdupOoRfx7DuI4pZLDuQIU5XBm ZMyqYrCYqCQChMWeM+TLkGsUjm02+6ygXB08FAizPFvwBJPvWF3ysirVywnl0156dmH4iz0xm1Z kOX4+RxIVhlMXOKLVYcL3jtO0XXE6+X+iHf6btQ== X-Gm-Gg: ASbGncuh2ric4G6CPNVxxqG8tfybvqFWj4RRptQUspHUItDEj5Kl+VzVleHi7U/ShHS 16TnmOLyorCsV1stV+OGiEowfkhZhss7MHFBDCtjKYx+3fbJH8RsaHkumVDHvOPuuuD8Vnjg+KN 69F/Dw3B249udC4/mDlz57 X-Google-Smtp-Source: AGHT+IFoRfIb0no4Q7veLnfBENErZm56Y+9PAUFeyb9f5WMoJYmat1ULW2SovVeXHlBYo2HTbA1JdCYwQl2bW3acJGM= X-Received: by 2002:a17:90b:5206:b0:2ee:53b3:3f1c with SMTP id 98e67ed59e1d1-308236288f3mr22050353a91.5.1744712423274; Tue, 15 Apr 2025 03:20:23 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Aleksander Alekseev Date: Tue, 15 Apr 2025 13:20:11 +0300 X-Gm-Features: ATxdqUGiNVQl7o0n34RKaPeUMCaF70vHuhO6ECV5y_Ox8LavHZq8qQVKwkNx94I Message-ID: Subject: Re: Built-in Raft replication To: Konstantin Osipov Cc: pgsql-hackers@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Konstantin, > I am considering starting work on implementing a built-in Raft > replication for PostgreSQL. Generally speaking I like the idea. The more important question IMO is whether we want to maintain Raft within the PostgreSQL core project. Building distributed systems on commodity hardware was a popular idea back in the 2000s. These days you can rent a server with 2 Tb of RAM for something like 2000 USD/month (numbers from my memory that were valid ~5 years ago) which will fit many of the existing businesses (!) in memory. And you can rent another one for a replica, just in order not to recover from a backup if something happens to your primary server. The common wisdom is if you can avoid building distributed systems, don't build one. Which brings the question if we want to maintain something like this (which will include logic for cases when a node joins or leaves the cluster, proxy server / service discovery for clients, test cases / infrastructure for all this and also upgrading the cluster, docs, ...) for a presumably view users which business doesn't fit in a single server *and* they want an automatic failover (not the manual one) *and* they don't use Patroni/Stolon/CockroachDB/Neon/... already. Although the idea is tempting personally I'm inclined to think that it's better to invest community resources into something else. -- Best regards, Aleksander Alekseev