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 1wcjg3-003aAe-0o for pgsql-hackers@arkaria.postgresql.org; Thu, 25 Jun 2026 12:59:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wcjfz-005gL5-3B for pgsql-hackers@arkaria.postgresql.org; Thu, 25 Jun 2026 12:59:27 +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.96) (envelope-from ) id 1wcjfz-005gKx-1p for pgsql-hackers@lists.postgresql.org; Thu, 25 Jun 2026 12:59:27 +0000 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wcjfw-00000000CQv-3t82 for pgsql-hackers@lists.postgresql.org; Thu, 25 Jun 2026 12:59:26 +0000 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-5aa68d65d24so2674840e87.1 for ; Thu, 25 Jun 2026 05:59:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1782392362; cv=none; d=google.com; s=arc-20260327; b=ZClOYVLIIQVUYw/5ObaAmOmgLsV/RRvv+RqdBIMNkG8x4samR4+tMc4I0QaBl3vzku 0e6JADHBMXBLN/LDXca3LYCFuVZtagmJW1k5LRjlCKUgtoYNJRFeBwxMiQD1hWdxrqpg v9BIls5xvFB5JfE/B4Y0uxpatznvXMJqqZK+EIS8FHlbyiqDIYfbC1RQ7uhV6iHuRHyp XNjPIt2eCxZqXRMsDi8P0prEF2M0mpv4LZTcL6IclRw/vo8GxclYmc3QugI5/ZoqDbkC +hbTyO5Gg41qFlLyUkb2ByNEt9bnRAy3NdG/4pGhViJOSujyEDfA3PPntVUhknytqNp0 tTCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=y3z5bDPkmquetArDlt33Fsx3SmTx7xjbZLe9wVczPXU=; fh=OaM4uoGgcyhx0Dwlfpmdz2okOVtDLgdzlV2Af8bwj9E=; b=cm2OhQgOLmyNjHjFcGVSR/kEurhOXCBwBr/MyKmBPks++xnV6Vdx206DXYnpEl/J4n 9mxHGkjYwBl14hzeAo0NO59A7J/EmIneK0T9L3/y/2SEm6rFr/0affwTooim6Czx2To6 LnRWL7lTF3wIFjl/AAf5XAN7brkx5cNcbk3JmFr8BkJ4fMRLcL2hr0Gzhu3h87sn+LdI I6JZN7T1sLAJjDaU52wy8GTHhTPKrfebgCpN0oMOKZIUZ9Dkff+vY2aY6USdQf2ECOdj XBw//xS8vEhHw/q3vwUNePAbINDJAgM+jproIwyKVoAdBFmKOvn1TYak+BMfLWeNcuR0 Ce4g==; 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=1782392362; x=1782997162; 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=y3z5bDPkmquetArDlt33Fsx3SmTx7xjbZLe9wVczPXU=; b=B/G7XSlBYOjHBVFOh8E6JZeIp0FV5SULZEtiXUs4Hi+aX9Aa7VIrzrTfB3MqHKhSsb UtNxGeau9fsnOXUBeRif2aw079cUefqIN7JyptucUGThJifGrq55M4DM8LgJBCTZV/Iv cMYcSY+6QScWR3+kZaWaHMebrWs3O9o26pxf7hKjn1wSfISvwYmZh0irE/pWv22SZIZu zc1PGPPRaUwtWzOFLtb/DHCeuCiv9PfmQcFvEWVK4kSKGgKofWBtVGnCHfr55ze36le8 NzWgdFhhrhBJCSIVk7/vXYcZpxhUKuVU0Rzh++eS161PVLsnXXY+dk2yqjxeKSYYPLGO DEEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782392362; x=1782997162; h=content-transfer-encoding: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=y3z5bDPkmquetArDlt33Fsx3SmTx7xjbZLe9wVczPXU=; b=Wwg7KeEKOuw34UDiEI9yriLTMenqYPmuraUj2aGgLARGNaktM9TwOqW9FdmleGWl9e 8Y4b/s47AZWxSXGQ8d6D4+IZlkRwzR0rt2dd7vdoy6t4qV6HNJjrxKXbEv+e1tyFlxTi RpiR99ugLsQNFfiIB/i2zQRwysznMmUpEjsyi5nkr0ke35tqVUycgabVP89C7I1hiOe7 Z9xQs8wwEQ/doNjr79pbcHvdTeyrvHUyeSDnreVfkGb3sHEpqQtPs219zi8Ziq9fh23s hdfmK1jEl/btTYxvQD+n6P2dIbO1z5Lpk5p8RvAIo0qsajtw2ouK+Tj8+0PwFiYN358e PvZw== X-Forwarded-Encrypted: i=1; AHgh+RqZMyWYRKXTWeeCnRv5J+eijKUJJL5i8iLMW7pr+lNpAatiNJzo84RBMeAJHX8fwi6arTlRL1/Q9zCORqaG@lists.postgresql.org X-Gm-Message-State: AOJu0YxYBsUQ4jS3KlKlLw2ca6btJ4b8oBSF2aq3qQaleN/U4Rb15jeG XciW95/iSvcsAQOiVzs3KTSxIPAKwUGYYXeE6KPeUxZ3HhAhO+3l6uXn3Q7zul1/2UsETkgMZkC 0bP+p8yWZXky8xlsV1bkdaMA7EbE0oZ4= X-Gm-Gg: AfdE7ck6N1+sJCbKME8KK111abWp32U9qxujkENg8N3FhfcTNpGFhi7XL8oq19XPp2O +j1D9w4WqyneHSgNxTC35Gajj1oajvpHd4WBc1F8W9hSCjFPva7HRI1clDmer1jamO+2EMfqOJm OEnjRKuuTcIZxeSwSAAAcm0ihZd1ShFRgn7HPMIukSQ+EgSIjVfBChmQopNe6S+VJ5ZVIwo4T1s HLvviqgnbe5BlCi8r5tWp6RbaZFDXuuSju31y0N0tPeSgPv7ubwlcw/GGzfmkN75T/CLlqxoMwX d1SyhfEFgTphSqC5pEJEVciyECpF X-Received: by 2002:a05:6512:65c3:20b0:5ad:68ac:81a8 with SMTP id 2adb3069b0e04-5aea1f5edabmr715870e87.27.1782392361885; Thu, 25 Jun 2026 05:59:21 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dilip Kumar Date: Thu, 25 Jun 2026 18:29:04 +0530 X-Gm-Features: AVVi8Cfx_pOSK9VLzEUwU22nhCosWEl6PdyJVukifoq5zvBZ_oaSm6BuNiYISvA Message-ID: Subject: Re: Proposal: Conflict log history table for Logical Replication To: shveta malik Cc: vignesh C , Amit Kapila , Nisha Moond , Peter Smith , Masahiko Sawada , Bharath Rupireddy , PostgreSQL Hackers 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 Thu, Jun 25, 2026 at 11:38=E2=80=AFAM shveta malik wrote: > > Thanks for v56. A few comments: > > 0001: > 1) > + * We complain if either the old or new namespaces is a temporary schema= , > + * temporary toast schema, the TOAST schema, or the conflict schema. > */ > void > CheckSetNamespace(Oid oldNspOid, Oid nspOid) > > Shall we remove this comment change now as the check has been removed? Yes > 2) > + /* > + * Conflict log tables are managed by the system to record logical > + * replication conflicts. > + */ > + if (IsConflictLogTableNamespace(RelationGetNamespace(rel))) > + ereport(ERROR, > + (errcode(ERRCODE_WRONG_OBJECT_TYPE), > + errmsg("cannot lock rows in the conflict log table \"%s\"", > + RelationGetRelationName(rel)))); > > postgres=3D# SELECT * FROM pg_conflict.pg_conflict_log_16387 for UPDATE; > ERROR: cannot lock rows in the conflict log table "pg_conflict_log_16387= " > > Why don't we add detail-message here as well, similar to all other cases: > errdetail("Conflict log tables are system-managed tables for logical > replication conflicts."))); It is kept this way as it is more align with all nearby ereports > patch-0002 > 3) > + SELECT 'pg_conflict.' || relname INTO tab_name > + FROM pg_class c JOIN pg_subscription s ON c.relname =3D > 'pg_conflict_log_' || s.oid > + WHERE s.subname =3D 'regress_conflict_protection_test'; > > This query runs many times (10-15). Can we save the result into > clt_name and use it everywhere? This will reduce test-size. > > SELECT 'pg_conflict.' || relname AS clt_name > FROM pg_class c JOIN pg_subscription s ON c.relname =3D > 'pg_conflict_log_' || s.oid > WHERE s.subname =3D 'regress_conflict_protection_test' > \gset > > DO > BEGIN > EXECUTE 'CREATE TABLE public.conflict_child () INHERITS (' || > :'clt_name' || ')'; > .... > > DO > BEGIN > EXECUTE 'ALTER TABLE ' || :'clt_name' || ' RENAME COLUMN relname > TO new_relname'; > --- > > 4) > We can also add a test for paritioning along with inheritance: > CREATE TABLE clt_partition PARTITION OF > pg_conflict.pg_conflict_log_16387 FOR VALUES FROM ('2026-01-01') TO > ('2027-01-01'); I think we do not need that, because inheritance is possible from any table but partitions are only allowed from a partitioned table, so this test might not be necessary now. --=20 Regards, Dilip Kumar Google