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 1wV4D0-001ezS-1W for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Jun 2026 09:17:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wV4Cz-005jlk-1C for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Jun 2026 09:17:49 +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 1wV4Cy-005jku-31 for pgsql-hackers@lists.postgresql.org; Thu, 04 Jun 2026 09:17:49 +0000 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wV4Cw-0000000133y-44zT for pgsql-hackers@lists.postgresql.org; Thu, 04 Jun 2026 09:17:48 +0000 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-842358aaf36so194226b3a.2 for ; Thu, 04 Jun 2026 02:17:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1780564666; cv=none; d=google.com; s=arc-20240605; b=GrbBErdnZj3sngaBRQteOAcKnZjNcZLMW1IJ7ZD1eHVrzsJpNjymzxbnUiLO/3wwc4 uyiMCbuNoNaK6ZDDQzuHv+h6yOCgnnEV25PFknGwiiAZxAohCxl6aSUeVylyn+XYIw7j Ag2O7ZLP5npRwcpokWEOSGVecWzwTcMP9gVsVubFWUMw6RHB8FH5TOdBelcJwp72WTD6 EH6T/PzWZbrS4SozaKzOqjVRdj421wbphVwUZTf7tjbCxkr6pAKSUqDHbImK7Bgk5oOx D+ap51MD7jbAAO4nQeEgRiJgXKRIEWp5EIEGz6CtK3/b+vZAPr2PoBZYkdKI704QG+Iq mnFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=BU7YoxxKmnEfwMqNSgKO8AiFnInCwzxxjcJSJyQ68TY=; fh=Gy+K7Pr0b7Xqps9qALWEANvWU/CdjkxHcWRKpknwAFw=; b=c4IPsjDS9eZYVVBCqnNaT98LcaFT6VXQmjLifSvOQfqXD7pkRJREcucRddVHR6yaeR Jcb+pc3LgKL1Rkxgd/DCQfV8OiWN03CHyslVI/qkSyFx8CDOm8YIjHJy4j3p/w/Y4PbN ZV3z2oIs5L0xAYRR/vCi6wL9yxQwwwvyA+nH9fCdX8UU+9GjQ0f3EQqdLxqRTCGkm3QF 6pEVdni6BdHdfUsNarEtjI/C8iyW7pPwUVJ1KWnh/l3NNcOxK0RTOMyY3BUg06Fz6KGE hm7G/0aswRq5KjUTMVdsDrViAcmajL37vqhrinjGv66cGQwgTK5Gk7DkoGxNiCbsdr0i DWLw==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780564666; x=1781169466; 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=BU7YoxxKmnEfwMqNSgKO8AiFnInCwzxxjcJSJyQ68TY=; b=Wki+t9aovCe18Ibhnwps68L/K5+5Z9idH2wZzRHD8kKPmDlPiqWYCtRNvhyoCLKXlb OqFzaFC87EJYw4alwbRUw9OGDFqcC5UptUfGuopYYbl9YPlhkSMz7oIIVGiIT+ktdl0b PmJtEfaAUxN+KFeLYQ1TfOSILjHWFKScUAJGYUAZvUQyR+9OygYisBLw4xiio2noE1QX xVRXBp0kZTN3Md8bKualPCiHmbBOWEpew4k0BqB4DSphxrZtZx2E9nb2Mb9rLVhOz1h0 OwHW8OTiUammw3c9gVvLE2ju/Atg5VzGpF13kyp2wh9dytmAs5eDaS0PaLr1lbYaA/m0 MLxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780564666; x=1781169466; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=BU7YoxxKmnEfwMqNSgKO8AiFnInCwzxxjcJSJyQ68TY=; b=QQM3QWqHrB3Fcw6wKomSxNOujiTnjsSYKvUf7AAe37DXyJ06ll3UBQ5ZJr6tYYpL+J MKP9+Z4K1IPv5PwkCFNXNPfQO6y7JYe74ayVWBVKTGwAsupBINZYM2YK1tS07abiHrvF k1Ohdb2mQebT7HD/zN+qSf5lkdUNj/8jL99f9p1Jj7ymnLcyqgHriUFJppkFE4GMXo4D f0yl+FM7NsbglkBeNK6nzGJ4oQ2uaqiS/gJwp8pC0lPHMdI9J/smXZDIwQGJxUJLqcK1 lakBy3Q1IIkMvwAyxvkrA/Wnef2su1sXeUW5fLXi9iEGgj2AkKxMW+ZquVov0+nYHuCv zy+g== X-Forwarded-Encrypted: i=1; AFNElJ8Sr4y1i905JtWh+ixzIfS14NLwU/FxZtL0Xd/b0x8dMX0z3qWg8kl5194VhZsMRyjmJYm1Zj7NrNsMHIFI@lists.postgresql.org X-Gm-Message-State: AOJu0Yw50u4cp+ZE73twcpPMLKEz4lSR283iu18Ts/MyzyktjOKUO+dP zzqaP0tw+ChLMW55ScHPaWSu99kKVlxHi4EMdvH4CRMCW1tsxugC685Dt3m6JIPhYBTeus8ggaz 4nC7aDQMzSaS7uzrBy42af69oQZLFM90= X-Gm-Gg: Acq92OEoHSWaeyMrxlyXMFm3nkJipfSdzKTx69qkSJpOCiqy94q8+o/RGfeDl3Cnv6J wh1bYrsn/fLkHY1EI3HaSQdf0E+eqkhgvrxQu9HZvV/OywB/C/Bjj8Lb+yx/XXHJqAeifzxbpXZ /kGFZxq8WAqnGBSM4eO1yNo/CqgAxrr/7bRtNRPPNnywtHbX7Ng/NFrA8ziXUFH1Apy+l/k0emL jbJSrcZKTi8ZUkh8uzxmsQIsnWYGecfVl6IpfN5Sw46GWQJTw+UcbNKByEfFOcdrYcHUpKGbDG4 knO4kmsnQXlf/NOpL0TTFaquMOC1CQ/6CWxzS2GoG65Yj6fUB9QLa1Ba1lAVt8Sgbkl9v3fG5TW EY/O93t+rDZAdXwePYlGV X-Received: by 2002:a05:6a00:4510:b0:842:7324:e679 with SMTP id d2e1a72fcca58-84285015ca2mr6736851b3a.50.1780564666031; Thu, 04 Jun 2026 02:17:46 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: shveta malik Date: Thu, 4 Jun 2026 14:47:35 +0530 X-Gm-Features: AVHnY4K03Oj_JmDXSs1wIhsPqHzqub3kKWBwOne4gT2DVtzEaY2it4FMRBRpT8c Message-ID: Subject: Re: Proposal: Conflict log history table for Logical Replication To: Dilip Kumar Cc: vignesh C , Nisha Moond , Amit Kapila , Peter Smith , Masahiko Sawada , Bharath Rupireddy , PostgreSQL Hackers , shveta malik Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Currently we allow inheritance from CLT. I see 2 side-effects a) Queries on the CLT will always include rows from inherited tables. Whether this is desirable or not is subjective, but it can lead to unexpected results for DBAs querying the CLT directly. CREATE TABLE public.my_custom_extended_log() INHERITS (pg_conflict.pg_conflict_log_16392); INSERT INTO public.my_custom_extended_log (relid, schemaname, relname, conflict_type) VALUES (99999, 'public', 'fake_table', 'forged_conflict_type'); postgres=# SELECT count(*), conflict_type FROM pg_conflict.pg_conflict_log_16392 GROUP BY conflict_type; count | conflict_type -------+---------------------- 5 | insert_exists 2 | forged_conflict_type b) DROP SUBSCRIPTION may unintentionally drop inherited tables. When a subscription is dropped, the associated CLT is removed internally using DROP-CASCADE. As a result, any user table inheriting from the CLT would also be dropped, causing the user to lose any data stored in those inherited tables. postgres=# DROP SUBSCRIPTION sub1; NOTICE: drop cascades to table my_custom_extended_log NOTICE: dropped conflict log table "pg_conflict.pg_conflict_log_16392" for subscription "sub1" NOTICE: dropped replication slot "sub1" on publisher OTOH, regular tables provide an opportunity for the user to review dependencies and decide how to proceed: postgres=# create table tab1( i int); CREATE TABLE postgres=# create table tab_i() inherits (tab1); CREATE TABLE postgres=# drop table tab1; ERROR: cannot drop table tab1 because other objects depend on it DETAIL: table tab_i depends on table tab1 HINT: Use DROP ... CASCADE to drop the dependent objects too. ~~ I previously thought inheriting from CLT should be acceptable as that is purely the user's decision to create a child table for its own purpose, but upon rethinking, I believe it should be blocked. Thoughts? thanks Shveta