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 1u4uSp-009EKz-Ss for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Apr 2025 04:33:32 +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 1u4uSo-0060Bx-0N for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Apr 2025 04:33:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u4uSn-0060Ap-Ll for pgsql-hackers@lists.postgresql.org; Wed, 16 Apr 2025 04:33:30 +0000 Received: from mail-vk1-xa29.google.com ([2607:f8b0:4864:20::a29]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u4uSl-000Kh1-1l for pgsql-hackers@lists.postgresql.org; Wed, 16 Apr 2025 04:33:30 +0000 Received: by mail-vk1-xa29.google.com with SMTP id 71dfb90a1353d-52403e39a23so4620778e0c.2 for ; Tue, 15 Apr 2025 21:33:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744778007; x=1745382807; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=1Tw/KYyOshtWgJ65pfsiNY22WjlYM0evAzQ5grf/6ic=; b=CvP00KHvBDSJ2COwV4jNxSXSJQBFMudMFfeXhsYqhDHEmishe33WqbNGTgFQLuvNrY qDYbUankS0DzTDOezXCauhOCbxlXEs1nFuCQYjLnn27qPbfcMnaByYz5DtO2Eu/Fa92U K96wOQWDTQ5WOtYMCvqYsP19SdX2T2s96rNMx6PbnZYPi1YmtNk50Y4HGusp3sb9fHHW uiEMxYrOA1cws1ARlMIWl/8QAcKd96x7oVA0EA6mPswk1woEuSGqgW+HDcujHYqjetHK El7FO69/K6/rWCwFDXmjVFPJCTu/+m7LzlANguwrZnAFfHcxefkYUW4nL3QmGJCxYISw XMNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744778007; x=1745382807; h=content-transfer-encoding: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=1Tw/KYyOshtWgJ65pfsiNY22WjlYM0evAzQ5grf/6ic=; b=JoJZro5lDFGT0wtwR7wYDGyxnyu0soZORE5nIRzIILrNACHtcwwDGf5nsiaNY6MMVY 1QyCysG6hIVwsjbW7GeaplDS6FOuS4LVzrOyTsNdJIwX5Imx50fi/XriXhe0kUQrQWXD vLBbvKSoi+lrCSFDLKuG4Euv2zzD3AjrX3qP19wzdNuewAFG2W/EdFSnTyxm2Y7NNYeA 1dPByaLd+o5WrZQ03rXgm75sK3Hq/uf/hzi8vNwN/KdqYZzv39SPMifnd/ETfL7wBvoI uugqnkTx2l6yUMfSBG3Hlmd3i7eZjMcvmlfa/kCPgPFGv5npXsBwluKB5faJ5WYLqDRj lQdg== X-Forwarded-Encrypted: i=1; AJvYcCWlfeplZVhpSBzSWMeKKbgmfsgvy8rjqoMVdLTGC6LwmRApIJ5CwSRRB/l6nxN3o3mJfFq/AwGKr4REwnHC@lists.postgresql.org X-Gm-Message-State: AOJu0Yyb7IXnCtm/g5zrRn2O43lKc9+6eQIBii6Iw004N05/8EkXm7Wg ma+TSM+ezep/DE+tadZxdUmcX/yqTucn9gXeDDLGLof/anRSSmycRibq/XfDrNYsauk5y0bif3z TSRbnVTcya6iP3CcKhDmnusaaM2NhgChj X-Gm-Gg: ASbGncvtJUs52mjYW0HljIfnyOX/pXbG/An49yJ1q2JhBXGe4/pliWPIm6tVqq6GtuS CZbbWOD+Ky3GlZxjJqdK/TX+rHeUwtO6ng6e/oluEmp9O9PADi/q6mtrI2pjtpHM1yhoHDDjxbv k34i9onlQ3cDxdUgvPAl2QaGgX6k3ReZM5aA== X-Google-Smtp-Source: AGHT+IEiGv+19NWDcoOFXq5o2Terk7vmDueRyAI8XD+B5UoTceu2ggmpnKggED8OTjzB9FB9FPfK6fZcceM5pxAKJbE= X-Received: by 2002:a05:6122:8c24:b0:520:9688:d1bb with SMTP id 71dfb90a1353d-5290dd69520mr140153e0c.2.1744778006870; Tue, 15 Apr 2025 21:33:26 -0700 (PDT) MIME-Version: 1.0 References: <1798838.1744759182@sss.pgh.pa.us> <20FB597F-641F-48F8-8428-D8DDBA802D58@yandex-team.ru> In-Reply-To: <20FB597F-641F-48F8-8428-D8DDBA802D58@yandex-team.ru> From: Ashutosh Bapat Date: Wed, 16 Apr 2025 10:03:15 +0530 X-Gm-Features: ATxdqUFF9GQZdiJXlVzSx3bMpz5Vk0Mh6cFTge6aM5xk0B_fz6aKqxEUzxO79hA Message-ID: Subject: Re: Built-in Raft replication To: Andrey Borodin Cc: Tom Lane , Konstantin Osipov , Greg Sabino Mullane , Nikolay Samokhvalov , pgsql-hackers@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Apr 16, 2025 at 9:37=E2=80=AFAM Andrey Borodin wrote: > > My view is what Konstantin wants is automatic replication topology manage= ment. For some reason this technology is called HA, DCS, Raft, Paxos and ma= ny other scary words. But basically it manages primary_conn_info of some no= des to provide some fault-tolerance properties. I'd start to design from he= re, not from Raft paper. > In my experience, the load of managing hundreds of replicas which all participate in RAFT protocol becomes more than regular transaction load. So making every replica a RAFT participant will affect the ability to deploy hundreds of replica. We may build an extension which has a similar role in PostgreSQL world as zookeeper in Hadoop. It can be then used for other distributed systems as well - like shared nothing clusters based on FDW. There's already a proposal to bring CREATE SERVER to the world of logical replication - so I see these two worlds uniting in future. The way I imagine it is some PostgreSQL instances, which have this extension installed, will act as a RAFT cluster (similar to Zookeeper ensemble or etcd cluster). The distributed system based on logical replication or FDW or both will use this ensemble to manage its shared state. The same ensemble can be shared across multiple distributed clusters if it has scaling capabilities. --=20 Best Wishes, Ashutosh Bapat