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 1wbtg5-002vhS-2r for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Jun 2026 05:28:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wbtg4-009fF3-23 for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Jun 2026 05:28:04 +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 1wbtg4-009fEt-0E for pgsql-hackers@lists.postgresql.org; Tue, 23 Jun 2026 05:28:04 +0000 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wbtg2-00000001hCX-0ppf for pgsql-hackers@lists.postgresql.org; Tue, 23 Jun 2026 05:28:02 +0000 Received: by mail-pj1-x102a.google.com with SMTP id 98e67ed59e1d1-36d5fd50d20so3520454a91.1 for ; Mon, 22 Jun 2026 22:28:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1782192481; cv=none; d=google.com; s=arc-20240605; b=TVMx02inOywgBa9Le1LwScSkQI45mgpZ9zoJRvm+pTPVPlbWhVg3HTDLFH+nq6S4lf oGlXJeRbyk3GZfpbmuB17LOtwuhnS0A8ULnjjDqSS7i+/8bCmPmO/xYbMh4p2m1lOjxu tYM1R/QVuxgel9erSzw+KFkC+/kTvxj2KYMMKl7fbZwy5umGVDR4WnZhJsvWDxtRJcvA 7ijCfu9OJqKnB0TsaVd9LBgIv5bWzJG2BNdO465bwJbwAL54HbCoMHIXQxMjndKzbsoU GhOaEemCoVxetTSCXsuPO2owjo19+HTXNwHMj4SPePslS6tyhaMkAmxisyZTn0H7vG8i OEag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=CDvEZUuFijxE7JxBX12xuLZpTn82dwjmhXZPBya9BRA=; fh=7N70N+iizjmVLyJhKDfpP61vY0fQGDvgwGRoL/KoMSA=; b=J6ScouV0xbgJMba8POP199w/p69PKpv8HNNT6fdZ+junqENOcoXkCknmrQT0m1qMan 6DZuOX6raC/vBXf+zNtzN98xzUN+by45O6T09OvqZy/er6DcyIaxhAzxEE/r1UnjCS7c kkzVE0gBO8XDv08QDkOHpKRDBAuVLfnGCA4Qbm6I4hLD98JL9u362csNlXWDTmoM5HDK xYB7XmbBIifL+eDT/yu59eZln4JiSMbBcFca5yV4RWv6lrSdj7oPsTyacCB8DG6Ye01t 3kyn0G+PEKIV7XQqQCmcC8hmMrHUJwPkbs+hMVdvCVX4fTcRxZD160qSJ8zbLGC70amg drJg==; 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=1782192481; x=1782797281; 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=CDvEZUuFijxE7JxBX12xuLZpTn82dwjmhXZPBya9BRA=; b=Re6a69mKNrm2stFq0uHlsKxukJU2kUj94ypS4GrAsMlATUOyMbXI8dVEhivJcvMFxh UsGVg/85QfciJS1NtUTrEKpW+AQ/8qIhSSWySK0OIpgDYW7w7RTYAhnFl82EBfpoxd9l EAqEwBgoYsZL8WSlIU4bEpzpwocEh2csFHdQwmaj3sIRGM3M6nO58aJzTrw/+u8b4A9m 1l9PK59Qbp0pVlhnOJu408nIInZ86T4uYPjNK49XG2NFFbMnWZwcto2Qb/Z44TDzF613 V4KM1WYIxMGQc+3jgAivYe2WzAG1NCACeOnQ+JUs+Fj3grx1yxd5+d/GjnRzCKua192V 1epw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782192481; x=1782797281; 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=CDvEZUuFijxE7JxBX12xuLZpTn82dwjmhXZPBya9BRA=; b=eanFdngVg2F6doOoc9MoIAnm6OF4Q9ZQMx/2vPx0dahJBwUrjax/haZBCDXvkOrMEm 8xZdDyel0ZMvDMmhL2vj2L4YiCl2/+Dvm4lr4xks7NqVnv3LkdUuoqC6uSbdm49Nwl+M WuJQ6u/N2kLrGsTzQlrJzGRdVg7qi6GyLqd73p1YR/jvrWZGtDMg2uKXcqT/Z7Td8LUD FPrAMVbF00bdArMbvn3B7YCYYiTpGCt1akjZt3ycmMg+/07KJr9BpbQrmhyYxkD9Eb6p gdfo6u8KdTrIWzUQPxngyHeUg3PG6T/xUQWwdOSk+x8QjU2jn6Uix1k4B37PDU9cHd62 bErw== X-Forwarded-Encrypted: i=1; AHgh+Rpd9wcijnOVLgSbm12OUFaB51D+5ruYPZpsvM+s7tP4RPTb65Q1VlgirBAdqTtEQGyPUh19FcyWSbSlRXuW@lists.postgresql.org X-Gm-Message-State: AOJu0YyLV54QJj7zZQlBsak5ntGdIpW1CG2FGbm1TOWSFOw8kYc+GM8T Igpd2i4/47GXkoqyDZuwp8dDSxcPusoOaBqiZhoYTgLUPzYn1FvblGZWk1q/VkN26ywoQi2sJGX jdiHa6E8h5GkaK1unduKefE2PBUZpRQw= X-Gm-Gg: AfdE7ckRk2MoIxMsUkPQ1dkALP680VGL0/d6SmuJLzQBIYmRmcbRdzWtwfQ2HWrktuc y++IoZ+0rj8klUyToBv6HM88y5IVelq/Wz5QQLJfEj7eAMjclyWn3YQtLpxMgmNSfCK+y6sgLa2 ehOVHoD1ZoxJqJz+o1PEVNFls8d97d5Ss/D2c6DmVqfaqWmM/SAzyUE2lngLoFSHl3CN8WocXoQ fyHpYUW0kCutK+f6MPduU47qS7VrbPCG8/m8R05c9BziWAjZE6+3Wwj3cGBbcx3KKp58wv91pU9 CND1diznXCd0XYTL+ZV4BvGOk96RFG3LwJ7NUdKBeUU= X-Received: by 2002:a17:90b:2551:b0:36d:63cb:cf63 with SMTP id 98e67ed59e1d1-37dd0de7416mr1526108a91.20.1782192480717; Mon, 22 Jun 2026 22:28:00 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: shveta malik Date: Tue, 23 Jun 2026 10:57:48 +0530 X-Gm-Features: AVVi8CeiVWTiBWkDfekY02gcQ8yzI51DkpItO8F_H5keQrZd54HWB4haLiKRhl4 Message-ID: Subject: Re: Proposal: Conflict log history table for Logical Replication To: Dilip Kumar Cc: Nisha Moond , Amit Kapila , vignesh C , Peter Smith , Masahiko Sawada , Bharath Rupireddy , PostgreSQL Hackers , shveta malik 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 Mon, Jun 22, 2026 at 8:52=E2=80=AFPM Dilip Kumar = wrote: > > > > I have merged Amit's patch and Nisha's tap test patch and tested all > the cases discussed, and those are working fine. > Thanks Dilip, few initial comments on 001+002: 1) + if (IsConflictLogTableNamespace(relnamespace)) + ereport(ERROR, + (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), + errmsg("permission denied to create \"%s\"", + get_qualified_objname(relnamespace, relname)), + errdetail("Conflict schema modifications are currently disallowed."))); Unable to reproduce the error. Perhaps this change is not needed after the change made in pg_namespace_aclmask_ext() in 002? create table, create view inside pg_conflict errors out in RangeVarGetAndCheckCreationNamespace itself doing schema-permission check. 2) Same with this: + + /* similarly for conflict schema */ + if (nspOid =3D=3D PG_CONFLICT_NAMESPACE || oldNspOid =3D=3D PG_CONFLICT_N= AMESPACE) + ereport(ERROR, + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("cannot move objects into or out of the conflict schema"))); I get these errors: postgres=3D# alter table tab2 set schema conf; ERROR: 42501: permission denied for schema conf LOCATION: aclcheck_error, aclchk.c:2813 3) create_conflict_log_table() + + /* + * Check for an existing table with the same name in the pg_conflict namespace. + * A collision should not occur under normal operation, but we must handle cases + * where a table has been created manually when allow_system_tables_mo= ds is + * ON. + */ + if (OidIsValid(get_relname_relid(relname, PG_CONFLICT_NAMESPACE))) + ereport(ERROR, + (errcode(ERRCODE_DUPLICATE_TABLE), + errmsg("conflict log table pg_conflict.\"%s\" already exists", relname), + errhint("To proceed, drop the existing table and retry.")= )); Should we replace this with 'Assert' since we can no longer create tables inside the 'pg_conflict' schema, even with 'allow_system_table_mods=3DON'? thanks Shveta