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.96) (envelope-from ) id 1wCX8T-0024mg-0h for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Apr 2026 06:20:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wCX8Q-00AAHt-10 for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Apr 2026 06:20:31 +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.96) (envelope-from ) id 1wCX8P-00AAHk-33 for pgsql-hackers@lists.postgresql.org; Tue, 14 Apr 2026 06:20:30 +0000 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wCX8N-00000000vXo-3Uny for pgsql-hackers@lists.postgresql.org; Tue, 14 Apr 2026 06:20:29 +0000 Received: by mail-pj1-x1031.google.com with SMTP id 98e67ed59e1d1-354a18c48b5so4743388a91.1 for ; Mon, 13 Apr 2026 23:20:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776147627; x=1776752427; darn=lists.postgresql.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=kDLs74EqpaEsuX8hL81WUQ+Du0WH7D2tnsWxA+WpbOM=; b=J4JzO9bpYgqzoWaA3YVau+sqUTR9cQbQeMaPcAU2OBSQmvAMy+1xC3uZky0TmA6d2P jzl1Z4re2BUDLpel/YRtpYQosgO/Qf0NPG9iQsmfEr8xJEILrQ1CzaQzM+BeTjns/sKr Ra2oHSkZZqVOf+6gBgR3qnkhSP4EXmEp9oKK5c37+101HaMjn6HqHn7CNDQmFhn+L7Mx 3YSzLxMPytACrMHoV6egxI+2kokqAfF0h9AIsrERxqJqmnzHYwz9vjom9R5+snGuWTIy S1Zmh8QMPcZ2pyzhdRdicYrBlpGSWje8cgaggCixgz0+2ig/3X1H7zP0ha6QaBD6GHM/ stWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776147627; x=1776752427; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=kDLs74EqpaEsuX8hL81WUQ+Du0WH7D2tnsWxA+WpbOM=; b=LLLNBpcNxd3OVfx6+qTed1HWhhgrypAQqlZYfCa4QVO59HlsPYz5gbuz3vkKegdaGA r9lgU8mIc7Otpb8jVOG4dBIOJ4tIg5zbj4pEoC+ulNEnkig8458QGUAhgA769DOKN6Uc moFzP4RPC0BTT1CGTGb+Zy9fW/aBQycKsTdwDEeMT/iDygOqNWyjR7b6nYg7TFlFb9y9 SZaGUtuxtazE/KlSRtUPXyv6PNitl5GOgtEaUqpU+47BTJr+BQB5tN2deXx/FR1dDbYb B1i6bZC8zoQapLeu3opH9/XXiQ+1fvnsgSgCQ73rvNXCYVAce6cBHrVXRiwNSTMtdl4g tGZQ== X-Forwarded-Encrypted: i=1; AFNElJ8a7j95Zi3mlVOsGpqIq8IXVU0RL/Ks5Gyl6/nVzFdSV5v5goQQr1qT9Wg6YNIA2IxwU296VwuC+2+A+zqb@lists.postgresql.org X-Gm-Message-State: AOJu0YySX2bMzAppGk5L3n5xMnnUMFCBE2cG6tBUCW7OgB2e0EoMC3Du iG6WvSZmT/flXBoFsuJEv0dRJYv4qKeV0zyqgiEoH69ZXPV/BDglHzH2 X-Gm-Gg: AeBDieuIrNnIVTnr4BDI3cypVbxzzkSyZm4UIPD5MY8NPt49PO/k3Yk3dt40R76CTJ7 T5YZA7x/YcTESOzHwZjZcI9LvfFzBinX76i0fNdHMOr3fW7Zux5RXYxOt6ZALgskGL/iRDpwSqE 6ndlwLRaWT4BNbS5akqiXHk1ZCqV/jF+WK1IChzyhZdEIXxLHl/OIFGhE9RF+0uh7Zt8csI7S6X 7VY5tShUXKFNBw0QW0hbZGZsdCu3euDF72VbCfKZku0gD2wuqvQEjOgQ879S/jxq2YI9V1UGqm1 NDrT3YC+N0kfl/qpRCKGnSmyCAfmQxHjyNshfR2e6syPGN0q7uPhtYydwK/RpeqNvIhy7wC2h7h 4YtqdIVCkZubrBplQF1PfMm7uAts6/+JZ6PLMMsw3btjupqpiHsPquR9hK6d6wHkIEbmAnBjZhf MYX9eWjC2/pZteujZ6kUuqweNlDmH367s= X-Received: by 2002:a17:90b:3b49:b0:35b:ea35:c3ce with SMTP id 98e67ed59e1d1-35e42867ce0mr16046172a91.27.1776147627194; Mon, 13 Apr 2026 23:20:27 -0700 (PDT) Received: from smtpclient.apple ([45.32.121.103]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-35fc6e78168sm925895a91.12.2026.04.13.23.20.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Apr 2026 23:20:26 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.400.21\)) Subject: Re: Improve logical replication usability when tables lack primary keys From: Chao Li In-Reply-To: Date: Tue, 14 Apr 2026 14:19:46 +0800 Cc: Euler Taveira , GRANT ZHOU , "houzj.fnst@fujitsu.com" , Dilip Kumar , Postgres hackers Content-Transfer-Encoding: quoted-printable Message-Id: <33A98829-A416-4919-B23A-FB661D337D59@gmail.com> References: <5ABD7727-CD22-4112-A186-0E788EE78109@gmail.com> <23A24BFF-18A7-4FE9-AAFA-13E1AA207DD0@gmail.com> <19dac243-1f46-4720-bdec-bf0f851d03b9@app.fastmail.com> <875BBCC0-CF08-4136-8E9E-F03DF75C3A11@gmail.com> <6BD39478-8F32-48BD-9595-678E5B4BEE8C@gmail.com> To: shveta malik , Amit Kapila X-Mailer: Apple Mail (2.3864.400.21) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Apr 14, 2026, at 13:49, shveta malik = wrote: >=20 > On thinking more about the initial design with a GUC-based approach, I > believe we already have a similar precedent where both a GUC and a > table/column-level property coexist. For example, the > default_toast_compression GUC allows setting a default compression > method globally, while users can still override it at the column level > during CREATE TABLE or ALTER TABLE. A similar approach could work in > our case as well. Thanks for pointing out this. Yes, one of solutions I initially considered was to introduce a GUC, say = default_replica_identity_fallback, with a default value of =E2=80=9CNONE=E2= =80=9D, which is the current behavior. We just need to support one more = value =E2=80=9CFULL=E2=80=9D, then when a table has no primary key, its = replica identity falls back to FULL. Users may freely set the table's = replica identity to any value. And the database administrator can set = the GUC at either cluster level or database level based on their = operation practices. >=20 > Regarding the publication-level property, apart from the potential > data-integrity issues discussed earlier, I also have another concern. > If we introduce a publication-level fallback, we would effectively be > deciding what gets logged in WAL for a particular table (i.e., whether > to log REPLICA IDENTITY FULL) based on a publication parameter. This > does not seem quite right to me. Shouldn't WAL logging typically be > independent of publication configuration? Or do we already have a case > where WAL logging behavior depends on publication-level properties? >=20 > Thanks, > Shveta For this, I really want to hear back from Amit. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/