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 1wbHiF-002Qjl-0n for pgsql-hackers@arkaria.postgresql.org; Sun, 21 Jun 2026 12:55:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wbHiD-00310u-0Z for pgsql-hackers@arkaria.postgresql.org; Sun, 21 Jun 2026 12:55:45 +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 1wbHiC-00310l-22 for pgsql-hackers@lists.postgresql.org; Sun, 21 Jun 2026 12:55:44 +0000 Received: from mail-yw1-x112b.google.com ([2607:f8b0:4864:20::112b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wbHiA-00000001RHD-2KyA for pgsql-hackers@lists.postgresql.org; Sun, 21 Jun 2026 12:55:43 +0000 Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-8041a8fd711so3174767b3.1 for ; Sun, 21 Jun 2026 05:55:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1782046541; cv=none; d=google.com; s=arc-20240605; b=hSBaexYHfmoNGZYZaN1FQ9F5jESJVgc28RucQp/SQBLXfu8WldDkC5IE6NLc9A+jQI QClS1tvl181z1ahSjto95Q/osn24SiZ3dRMSAUofrP1S5iWGL8MrYqMO4xwpzJ/pL5xa j6X0Q+9phPFKepCCMmqD71zkEwfz/ZsFMM7GzZ/b5jQxb52aw6Q6b/sric6b/MrblD0j oyQUlIzLlKsjgYciyjZAIyfIL22qmb7BrNuHm+rHXBELpFgz4Ok590KVl883wUqN8XBs wN5Ei7fbhAOTb/2xGlH+/Z/peKjtIaXgkW7lU0X5f1vyS5odof9stFCrXGH31/Z4iA+C l1pg== 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=/KCuewLHwEkjJqPCzj42eKkwwwah7rRv7FRIckaPpxo=; fh=ABTlEl7Zy6zLpZTiVjxm+Hdai/UYo9qV+WTAMl4Yf2Q=; b=UcXYOQupHcg59xnlnSp6uMKD5KlFU2nf49rM/unVXRaHLbtGLXjA/O13OsIkaNlNso hk90a7rULFNCyzOvGZy19wmpzKN/h1Wb6/dJnQP5v0I6PdY7gfL4gtOPIknj4OFG4pi+ 5mUIIdezGgOpsvZi9lQHQlHsMJ3f5bOtu3ua4MoTHmua5c02REJHmgUX4Osotpf/tzNo YQH0SzeXIZpwmuECxCpVKZXZPnqhyq/rruOct9uh6LwoycwrmNuR2dlQpWnE6vMLWGkY ccPfXzmAAFjv0oWSqlNynVOibUfyAqf62nnkWiuD1ZEhH/cqCag2zjV4hSfKyzO39ggD Z4sA==; 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=1782046541; x=1782651341; 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=/KCuewLHwEkjJqPCzj42eKkwwwah7rRv7FRIckaPpxo=; b=P1RgW4mZQZIVr8IXOiNOc6/BqxDBdWPcHcLHfILiPxesp8AeE2FBc5ZLTIOAonCcWr GqwqsN3cgZYxiC5KqZ7gAanrZuiJg+dnf5fc8aoyJkhjO6rbiJfA4C0Y0HlIvMZFVHbK VPA6cD2Hy/e+33x315sLQ6ejJndGgCWa917cvsQcH31bg2lCZtd5SCNJz34q9Ho/YBMW RcMQL4chmSZul+XcZcDNGgq8BW6nwvS6dVQgtHgZ24Vn7JzjkVoNFTzYy2HKkAMaZ4ZB JfV71JijVmAXneH9KHzNkjKvqVp0wx5dPGZWRUu+B0ZLZkesEc1JbeqNIGO79eam9Gjf mMmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782046541; x=1782651341; 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=/KCuewLHwEkjJqPCzj42eKkwwwah7rRv7FRIckaPpxo=; b=PawFvF0iN5WBrBZhSAVdkB/uXYTM4BFGwLSa/wSOyGXnLdRKTVomPRK1VCjgmjRRMZ r0GetwZx6rth6lcF8PBsvqf/V1B9FWpqn355dQTfNLtbgiiedYpMilOKKdPwrBfIV3Lb IXDFFqzxLlPasYjw+o1BUOLFvySCH9oJaCrjItLNa6yLSQ69irxz2J05XunfqmmWlT7G Y63aKJwgCvNaFPXWWql6Bv6PVvk8knpK3WLYM9i8C5Q9BOxJClRJuhACPQfevyolU1eO pVHDhWzFSZXuOi/chypAcF4SCyeFfoAn0sLmy8ROL3kOvBYE1zo5xFoXp2Nv5YCyG3fQ CK+A== X-Forwarded-Encrypted: i=1; AHgh+Rr4l+jUOs70GRcb1fh/5j5BW0Johq5JbxQErFLCc3fUyGwdq8eq2LbXF4ySJVrXXQwosk62IRQNxUakhatE@lists.postgresql.org X-Gm-Message-State: AOJu0YyCVz5X5uzY7ujsmOC+ibXG8/ac4RbDGnLOyFeUYfetZiYUhpaw JMpoQlM1AacIApjO9y6taziKjozc78rok+NyzoXth67F4hrrjnJPxYer4NzodDNwMJCNIRCt1kV /2/nvpFi+cnQbbtV0XGQJxepdeEyy96o= X-Gm-Gg: AfdE7cm0f2PQSmOqwf9g+bJPEHZ5mT8ewllHS2babBJ6rDxS+05Qin26G6fm6vlffVF SolupKLxvT93Ceby6W5sQKozi5Oj4gh6hLdLuQ30QkNh8NsHhv4C4T2+1h3Km3i33WnO4l1aZgE BSvc+vlCbc+OVVfPODss6T1BoWT2stWVWXwCgxylOxvyWQMFGPI+6cYVg41icOnQyZgRSJwbE1T o3UGb1LVQ8TRg/xsI83fVZn4G/QD/XOSeMzQCRQ9k399d7IE3nXLDfoO6fsqDqJBiI/4nKT0ugB XUsHQ2875Dlyq6FL63VP+0K1Qi/+lA== X-Received: by 2002:a05:690e:1246:b0:662:d44e:a6cb with SMTP id 956f58d0204a3-662ff0c9735mr7698997d50.24.1782046541233; Sun, 21 Jun 2026 05:55:41 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: vignesh C Date: Sun, 21 Jun 2026 18:25:28 +0530 X-Gm-Features: AVVi8CcAN7LvFSB_TYjg5NxAGIH6ZO2OU_zXEdeixjnBVp4FKKKTmzVPYB-b2p4 Message-ID: Subject: Re: Proposal: Conflict log history table for Logical Replication To: Dilip Kumar Cc: Shlok Kyal , Peter Smith , Nisha Moond , Amit Kapila , shveta malik , 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 Thu, 18 Jun 2026 at 16:54, Dilip Kumar wrote: > > On Thu, Jun 18, 2026 at 11:29=E2=80=AFAM Shlok Kyal wrote: > > > > On Wed, 17 Jun 2026 at 18:31, vignesh C wrote: > > > > > > On Tue, 16 Jun 2026 at 05:19, Peter Smith wro= te: > > > > > > > > On Mon, Jun 8, 2026 at 9:39=E2=80=AFPM vignesh C wrote: > > > > > > > > > > On Fri, 5 Jun 2026 at 07:59, Peter Smith = wrote: > > > > > > > > > > > > Hi Vignesh. > > > > > > > > > > > > Some review comments for the patch v45-0004. > > > > > > > > > > > > 4c. > > > > > > IMO there should be a separate function for handling the subscr= iption > > > > > > footer/s, same as there is already a function > > > > > > addFooterToPublicationDesc. > > > > > > > > > > It is not required in this case as we don't have multiple footers= from > > > > > different places to be added here. > > > > > > > > > > > > > Sure, it's not "required", but I think: > > > > A) Separating the footer code from the non-footer code makes it eas= ier to read > > > > B) The 'describeSubscriptions' function is too long. This would mak= e > > > > it 20 lines shorter. > > > > C) Consistent footer handling for pub/sub describes. > > > > > > Ok, Let's keep it consistent > > > > > > > ////// > > > > > > > > More review comments for v50-0005 > > > > > > > > =3D=3D=3D=3D=3D=3D > > > > src/bin/psql/describe.c > > > > > > > > 1. > > > > + /* Conflict log destination is supported in v19 and higher */ > > > > + if (pset.sversion >=3D 190000) > > > > > > > > The CLT is targeting PG20, right? So, that comment ought to say "is > > > > supported in v20 and higher". > > > > > > > > Ideally, there should be some "TODO" reminder comments here to ensu= re > > > > the appropriate 190000's get replaced by 200000 as soon as the vers= ion > > > > number is bumped. Better to flag/comment all those places now, so t= hat > > > > nothing gets missed later. > > > > > > > > (A similar review comment probably applies also to the pg_dump chan= ges > > > > in the previous v50-0004 patch). > > > > > > I felt it is better to mention it in the commit message of the patch > > > instead of mentioning it in the code. > > > > > > The attached v51 version patch has the changes for the same. > > > The patch also addresses the comment from [1]. > > > [1] - https://www.postgresql.org/message-id/CANhcyEUjc9TCcW1YAQVMTs6-= huWBZoy%2BsVkz5C8b72os5p-f%2Bg%40mail.gmail.com > > > > > Hi Dilip/ Vignesh, > > > > I reviewed the patch and here are some comments: > > > > 1. I further tested for the object which can be created in 'pg_conflict= ' schemas > > and found that operations such CREATE EXTENSION, CREATE OPERATOR, > > CREATE COLLATION, CREATE TEXT SEARCH DICTIONARY on the schema > > pg_conflict. > > Is this expected? > > > > postgres=3D# CREATE EXTENSION hstore WITH SCHEMA pg_conflict; > > CREATE EXTENSION > > postgres=3D# CREATE EXTENSION pg_walinspect WITH SCHEMA pg_conflict; > > CREATE EXTENSION > > postgres=3D# CREATE COLLATION pg_conflict.mycollation (provider =3D > > libc,locale =3D 'C'); > > CREATE COLLATION > > postgres=3D# CREATE TEXT SEARCH DICTIONARY pg_conflict.simple_dict > > (TEMPLATE =3D pg_catalog.simple); > > CREATE TEXT SEARCH DICTIONARY > > postgres=3D# CREATE OPERATOR pg_conflict.=3D=3D=3D (LEFTARG =3D int, RI= GHTARG =3D > > int, PROCEDURE =3D int4eq); > > CREATE OPERATOR > > > > Also, when we create extension several objects are created in the schem= a: > > eg: > > extname | object > > ---------+-------------------------------------------------------------= ----------------------------------------------- > > hstore | type pg_conflict.hstore > > hstore | function pg_conflict.hstore_in(cstring) > > hstore | function pg_conflict.hstore_out(pg_conflict.hstore) > > hstore | function pg_conflict.hstore_recv(internal) > > hstore | function pg_conflict.hstore_send(pg_conflict.hstore) > > hstore | type pg_conflict.hstore[] > > hstore | function pg_conflict.hstore_version_diag(pg_conflict.hstore) > > . > > . > > > > So, should it be allowed? > > > > 2. When we try to DROP conflict log table we get an ERROR: > > postgres=3D# DROP TABLE pg_conflict.pg_conflict_log_16395; > > ERROR: permission denied: "pg_conflict_log_16395" is a system catalog > > > > But for other restricted operation such as UPDATE/INSERT we get the err= or as: > > postgres=3D# INSERT INTO pg_conflict.pg_conflict_log_16395 VALUES (1); > > ERROR: cannot modify or insert data into conflict log table > > "pg_conflict_log_16395" > > DETAIL: Conflict log tables are system-managed and only support > > cleanup via DELETE or TRUNCATE. > > > > I think for the DROP case we should throw a similar error. Thoughts? > > Please find the updated patch version (rebased on current HEAD), which > fixes all the open comments in 0001 and 0002. We are still working on > 0003 regarding handling conflict log table insertion errors. FYI, the patch needs a rebase because of the recent commits: Applying: Add configurable conflict log table for Logical Replication error: patch failed: src/backend/commands/subscriptioncmds.c:2260 error: src/backend/commands/subscriptioncmds.c: patch does not apply Regards, Vignesh