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 1wZ5IP-000l7n-2G for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Jun 2026 11:16:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wZ5IN-00BYSh-1x for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Jun 2026 11:15:59 +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 1wZ5IN-00BYSZ-00 for pgsql-hackers@lists.postgresql.org; Mon, 15 Jun 2026 11:15:59 +0000 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wZ5IL-00000000Syv-2jgR for pgsql-hackers@lists.postgresql.org; Mon, 15 Jun 2026 11:15:58 +0000 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-5aa66893e9fso4209148e87.1 for ; Mon, 15 Jun 2026 04:15:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1781522156; cv=none; d=google.com; s=arc-20240605; b=NtpUS3Z3RHK2pOLk6WlTprLE9KCdDlz3c4X0q6WV9PfmWR8+Y5XbnVNxTYLfWcT+25 bqtVMJAqXNor97L4Cmf3JNWCt5gEEkk9u2ZJyQAcR4skVQdBEYPirGB8qBi4az3XBALy 3jEVFpdG4shfOG6+DWnZiGQONqcXhQsAbqNG56N1s3NGTpdNZMpYEU9KSfgjfbM7IEn4 559YUxOoF8zq3nC2Luwp3ym2cddE5o/FLy7tIor8TEsmvJAIO7fbq3npEl3WcN+QvIKh ERy3Z6ggMlqNEAqnuqaNY7pimW5gIYExMDUrGTR97baM4Ew0SGlVMlI6OuzOhDlNRu8m rDDA== 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=emxpa0nIFn0cOITk+bPoOKdpXxgHeydmzOPFH9IeKxo=; fh=AorEm7jKYn9GO7Q7xsBa0DIaefHQErqSSL1PqyUVaK0=; b=W5Kxskv8tdbLa+Vk+uRSZsui2XHhitEAKOVVWM/OOMYLaFoJ7Pl7GCpxaW3PdYJaku tPtkKXjVDRqjnwsF2ZH5A4pT5lawU00QcEp92ff7koWc+z/xKqTrxQ7DPzDx2kmNlLqO 5zzXT23v3m2WNYCcgNCK1dadnfy2RgyMej5Wf7KnptFWvIsBbLavwhBPZ8bwrKufaX4b ViY19pruCkJrt65b105OO4hK4bZhtmV3agExQOgJdgDHc06LY9hH+U+ToiD8aOFBFxPe qy2c5OclNysgA49a+FD0uGFpZ4XxsF1JNEjMShF3HkPJa3NQ3EFn3F4H1gJFMhq3evFM ardw==; 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=1781522156; x=1782126956; 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=emxpa0nIFn0cOITk+bPoOKdpXxgHeydmzOPFH9IeKxo=; b=llJVuShqiz+iINw4xRu75ZpyeIzmSqFC/PFOIlt5yicPJGu1rVU96A8opcXdPHV5c/ sZzJ33HyoerAELNJvWbRIeeeczR4nW0qB+KwH+0lkAmGTegukiyOf0wmGsrQWJ3f1EA3 i/8d6to2XufZEG1ASX/84Uge/u1vIXwr9irudZaq0JqyBYZtMVG3ukRULv30GMYu5eE8 uOEWiKuj686StgKSpH2SAFVQKahuqlzy3eJjzvu2/X5jB3JbAWRBaRaqJep4UhSV2naJ Z5KJt3qKXSbdLkOcmMw/R+AcU85nYG1IFPUii1KUqYlsZYcZ4cm+sn5Tyj3nODyJzVb6 sCZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781522156; x=1782126956; 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=emxpa0nIFn0cOITk+bPoOKdpXxgHeydmzOPFH9IeKxo=; b=sd7zL8PSToPIb4a+1OKT+/ESyMBbMDFryuN2XGjLLjyQHlZmdXDYAWZwDJhY85bl0P 4+odlO0r3xlmXYTwexoc+Ou01sTBbUzrK+MG4jzhOQxQpLxJ0R1FMXA0r2YEXVBVi931 eyv3g+gslp+FQuGhJ4+H8ubWuJZTAx7CuhZUqb6+QRqC/ztIMQDKcsdzgy/LOOolCO4O HGTyWebiCYcoTyoS1Gs9PLPF3NqQyVeNJ8yXcH820OM5OT8uJTlXZtLY9mukhlMUixHv O/exJvA4hT0UurFGJROPRcstEsFIMt5iaqTE2kpf7zykU6bqv/sdmMSX9vn7AtWJSQ/S COlw== X-Forwarded-Encrypted: i=1; AFNElJ+OQe40ybWxKoO8BZj57HobsEWghlCzp+KGJF7+wh6F3e044mhTRFg/LJbzBZmkXKP6uALziQnNL+93yLat@lists.postgresql.org X-Gm-Message-State: AOJu0YwBUqb7LPq8MvO0WgpAx8Av+Dpuv+k1auOTfcpsWe5l7UCq/qif FmAknKvyB3jKipVW6spwVL9z9hfJa25kqYYyFm1+VWrSoDp1+9CmURh+AViqsewFem2W2a/CjKD 7DKQyhrO655nTJDL8/FGuhBaDrHzba2g= X-Gm-Gg: Acq92OE1kzrFgZECUtzse9GH5300Q+6IDDYhpGmpDxaz9WhJlOD4cQVmb90Y0OGQJc+ IiEfoR/LfFR/UL0RKfpomWnYKMaVAKNWAhLEAaB8KSoILwqwbzTD7vfkE+NlyDiwKL6C/N74N+O Sy1sCk5Q1HIuB0sNkuXSJiUZUOOWeToozZDNNuO2Fyr3gO2U8QwVpE1GPhbLPVJWRdwWjIT6apN XQCTSYF3tqRGrBM/fb3RsxwtA2UXUuTYuEYCoSaes1m3stIxu5GdFYYFs1mxbgXUwMqCh68Gc88 BcPle7YZ X-Received: by 2002:ac2:59da:0:b0:5aa:6cd6:a7f2 with SMTP id 2adb3069b0e04-5ad2db7a831mr2432566e87.38.1781522155353; Mon, 15 Jun 2026 04:15:55 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dilip Kumar Date: Mon, 15 Jun 2026 16:45:38 +0530 X-Gm-Features: AVVi8CdA4uRTk4gafll6uDhzCOJPyyGOaGZjk4uzfidhGSfrQGEifznYTCmLxF0 Message-ID: Subject: Re: Proposal: Conflict log history table for Logical Replication To: shveta malik Cc: Shlok Kyal , 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 Mon, Jun 15, 2026 at 11:27=E2=80=AFAM shveta malik wrote: > > A few comments on v50: > > > 1) > + /* > + * Conflict log tables are used internally for logical replication > + * conflict logging and should not have extended statistics, as it > + * could disrupt conflict logging. > + */ > > Suggestion: > /* > * Conflict log tables are system-managed tables used internally for > * logical replication conflict logging. Similar to indexes, user-defined > * extended statistics are not supported on these tables at present. > */ I think the reason for index are different so here is my proposal for this /* * Conflict log tables are system-managed tables used internally fo= r * logical replication conflict logging. Unlike user tables, they a= re * not expected to have complex query usage, so to keep things simp= le, * user-defined extended statistics are not required or supported a= t * present. */ > 2) > Assertion hit in alter_sub_conflict_log_dest(): > > > set allow_system_table_mods=3Don > create subscription sub1 connection '...' publication pub1 > WITH(conflict_log_destination=3D'log'); > select oid from pg_subscription; > > --CREATE clt USING SAME oid > create table pg_conflict.pg_conflict_log_16501(i int); > > --change destination to table/all > alter subscription sub1 SET (CONFLICT_LOG_DESTINATION =3D 'ALL'); > > --this asserts here: > 2026-06-15 11:10:40.540 IST [10626] LOG: background worker "logical > replication tablesync worker" (PID 11397) exited with exit code 1 > TRAP: failed Assert("IsBinaryUpgrade"), File: "subscriptioncmds.c", > Line: 1554, PID: 10662 > > alter_sub_conflict_log_dest(): Assert(IsBinaryUpgrade); > > Should we fix Assert or restrict table creation in pg_conflict scehma? > We allow it for toast-schema though when allow_system_table_mods=3DON. > But I don't see a use case for allowing this. I think this is in 0004 patch, because during upgrade we would have an existing table created via schema dump, and hence we need to associate this table to the subscription. But I am surprise to see that changinng destination from 'log' to 'all' is going in that path where table already exists, Vignesh can you debug this change, I think it got introduced in 0004 > 3) > I'm not sure whether the comments (at [1]) regarding the TRY-CATCH > block were considered or perhaps overlooked. Please ignore this if you > are already taking them into account. Yeah all 0003 review commants are not yet fixed, there are few comments from you as well as from Nisha, will fix in next version > > Doc-patch: > rigth now though> > > 4) > + direct user manipulation. Unlike pg_catalog, the > + pg_catalog schema is not implicitly included in t= he > + search path, so objects within it must be referenced explicitly or b= y > + adjusting the search path. > > > Second pg_catalog should be replaced with pg_conflict > > 5) > + as the conflict schema) contains system managed > > + The pg_conflict schema that contains system-mana= ged > > system managed or system-managed, we can use same at both the places. > > ~~ > > [1]: https://www.postgresql.org/message-id/CAJpy0uBSY7zTH%3D4TvAOS%3Dkj9v= ivBUc9NO%2BVp6KNw-Na9RiAsMg%40mail.gmail.com I am making a note so that we can do all doc changes later. --=20 Regards, Dilip Kumar Google