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 1wcyyV-003neR-35 for pgsql-hackers@arkaria.postgresql.org; Fri, 26 Jun 2026 05:19:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wcyyU-008tvw-2U for pgsql-hackers@arkaria.postgresql.org; Fri, 26 Jun 2026 05:19:34 +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 1wcyyU-008tvo-0S for pgsql-hackers@lists.postgresql.org; Fri, 26 Jun 2026 05:19:34 +0000 Received: from mail-yx1-xb12e.google.com ([2607:f8b0:4864:20::b12e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wcyyS-00000000I4N-1SUv for pgsql-hackers@lists.postgresql.org; Fri, 26 Jun 2026 05:19:33 +0000 Received: by mail-yx1-xb12e.google.com with SMTP id 956f58d0204a3-662dc3879acso652896d50.0 for ; Thu, 25 Jun 2026 22:19:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1782451171; cv=none; d=google.com; s=arc-20260327; b=XiMbrb9zl2jh/e3BKWkOpqwpfc1qfL3hyVQYnG4ynhxuc3rCFjpctNVCikF5FfzZov jmCoteLXmhCOn83dEB39aaZrectGIL4VWVZwiXUW2OMKwv9h9w8lg6xUPfvWhKofD4M1 KG5z/+z2zqw7+5Ia1BI9Ql9aKxgYTJWoOQa5pebw2j5JGvR13ApXw56UVMxuB8h24V0K kuQFvd141pUk9XP1UbtVIkpSRF+918ftZ3G+/0NfFb1j8mA6SuAFAovsE1ebq0pU91mQ 9yJGGhZ2QtyolsDfnG+D7eGutx8Dt/3FEN1ZonhwaKd1G/BFR9f8/JD3g6KGYbh+QqKJ f9rA== 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=j8Q2t4XMSpxc7IE6Sj64WdquKP3Emempf/pR3XB68Vo=; fh=MmzhjeA4bGkXCmkyjK9Q8JpRV+5qbJajpEf/kD90zz4=; b=XdfjxPKaZMjLuJNElTtSn/t6Zn5Q+GqVdxV6XFxay1V2o1F/wAbKtFABqgJCD5laIJ 6RynFU+mLI3UDa9n0vNR/fhenkNsE2yYj3tXZMbswVbvACftfgy754fYsM8U7UCbi3Z/ n0+HdJGCMvmTLXltgHOMlaYF8Wa9WlB9CKOlZD601Q7A8/ooaTC9YxhVQkA5NjDxqo39 Iqa1DPJW8dK/gRKzbOsVWOm0j7yTkMGx3e1v63FD6p3ylsh5/F4kliezpcitvaYUTEF6 Fsoj0z/+O8QDU5GNzhm8lNM5av94m3Se7aFLqwG75lIA7BZIKN3X6SA+hFT1gAMzY+5u lh1Q==; 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=1782451171; x=1783055971; 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=j8Q2t4XMSpxc7IE6Sj64WdquKP3Emempf/pR3XB68Vo=; b=ijw3QY2NbRi3W69eJIv/kOSih0yBjWZVbYeD/064lGjc3FUsHtvf/Acj3Lw5QnVPWG j0xxlU7gjchXcVhJ7Jvhfv42WSWH8RZxjEdLQ+vt83h5weq8QGZITnpLPmilXD2xgpsp 2Q1humkXtx+ljZbR/pGWMo7E3ILBQHqk7QCL8V2oIciL5i989H4oWFti+TtpzvRe/xEx Jk3ZvVmSQyU24oxSc6Wg03+a+qMUDuzmWBAIvsZVOuXkvih/5Nez8nF2IAcwhOKxzwCy Qc79FcGYM0ajOQPXhx1lHC8z31ZgKAiteE3lalSmguzwwMV3C+S6l9NWPVbXzMaYU5x4 Ar+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782451171; x=1783055971; 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=j8Q2t4XMSpxc7IE6Sj64WdquKP3Emempf/pR3XB68Vo=; b=CRiF0trvm71BfBP/rQ/4/K5/VSW/qeR6MMxVokO3Kg1dhUlh2JoJlfdHd0fr58AFTA nu1I6xdHZgNhg5pUKGxefVQiecTirDVB3408aG6UenmkhDGY4nN0dgXiOS/7/o/41k9+ kMEM3Un67JGRs0DIXIcyrmtWuJ3izQvsoJN8/6+k44oFPgkvgD9C0xaLjdnJgalW5iv5 0U7u+NFEP3xBMamqq1CZkiVuozhNxoZKnnDSSCP5YTyHXWUsqFL6CREE3INW53KbdhUY B6uGDebEG/GPrGlUf4y73jpMx6hMcN6Npw44AFjNWJBXCLCPH0B1XsaW/cBKhRvriBLk PDcQ== X-Forwarded-Encrypted: i=1; AHgh+RqZpcty/djXlCNKr+yW5fR3di3wc5Lb8dsrRKE7h7BhCD94Erc1L6wn+4vDXyg6bHnoy7zdWedJQAFso36J@lists.postgresql.org X-Gm-Message-State: AOJu0YyQ7LklR2XcbTTLNzq59lJPHXO+AvOB6v1Sy7Hcc2J/kvXEL3oK zZhKWGVfXZzc5i8uSM17JUp0axVyxsSS7fC3kODK1febPUVtcH+KRaUNpDOsioUQXRq5lBt6og2 sIV7bVDSHehzuQk1p3M7rsUF3NXUkqo4= X-Gm-Gg: AfdE7clUe2gFxJVZcEcDfxPgP4f4fIohhn/EAwnvcNPx0KuX/h/36s8EOq1WhK8Ou2L LUnKp8CLFf9INC/Q11O6AwS7y6oUL8xsQadSQFxugV6/TJACvr3XoiPQiTttFHbSsLXoTsAtxmv MRoFqfRCUkDPbD7YFR2YQwPHgplHiGJR9CLtOIDWf5iXPg15vnA2y/sSc3xHJ9wPep+sEHzCbA2 cD8v2iJVD8XhfGs6eASb8BBfXIjlnAzd6SgCHWrHhfJaQUEBYXbP+QweIEDQPOXEt8sXX72xUNt 2lvjfjnOXg== X-Received: by 2002:a05:690e:1242:b0:664:99fa:a16e with SMTP id 956f58d0204a3-66499faac8dmr1423998d50.39.1782451171449; Thu, 25 Jun 2026 22:19:31 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: vignesh C Date: Fri, 26 Jun 2026 10:49:17 +0530 X-Gm-Features: AVVi8CeRyoyddZzq69olE-M7N6pxOTJsPpv4Ux1tE17gNzXFvHNWu_frdTA6uXY Message-ID: Subject: Re: Proposal: Conflict log history table for Logical Replication To: Dilip Kumar Cc: Amit Kapila , Nisha Moond , shveta malik , 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, 25 Jun 2026 at 19:15, Dilip Kumar wrote: > > On Thu, Jun 25, 2026 at 6:37=E2=80=AFPM Amit Kapila wrote: > > > > On Thu, Jun 25, 2026 at 6:30=E2=80=AFPM Dilip Kumar wrote: > > > > > > On Thu, Jun 25, 2026 at 4:57=E2=80=AFPM Amit Kapila wrote: > > > > > > > > > > > 2. > > > > @@ -2482,6 +2681,8 @@ DropSubscription(DropSubscriptionStmt *stmt, > > > > bool isTopLevel) > > > > deleteDependencyRecordsFor(SubscriptionRelationId, subid, false); > > > > deleteSharedDependencyRecordsFor(SubscriptionRelationId, subid, 0= ); > > > > > > > > + drop_sub_conflict_log_table(subid, subname, subconflictlogrelid); > > > > > > > > It would be better to drop the table before cleaning up the depende= ncy > > > > record. Right now, it is okay even in current order because depende= ncy > > > > removal is trying to remove where subid is depender. > > > > > > So whats your suggestion change it now or not? I feel either way is = fine. > > > > > > > Let's change now itself. > > PFA, updated version of the patch, fixes all the comments of V57 Thanks for the updated patches. Currently, we allow an empty string for conflict_log_destination: postgres=3D# CREATE SUBSCRIPTION sub1 CONNECTION 'dbname=3Dpostgres host=3Dlocalhost port=3D5432' PUBLICATION pub1 WITH (conflict_log_destination =3D ''); NOTICE: created replication slot "sub1" on publisher CREATE SUBSCRIPTION postgres=3D# SELECT subconflictlogdest FROM pg_subscription WHERE subname =3D 'sub1'; subconflictlogdest -------------------- log (1 row) However, this is inconsistent with the behavior of the other subscription options, which all reject an empty string. For example: postgres=3D# CREATE SUBSCRIPTION sub2 ... WITH (origin =3D ''); ERROR: unrecognized origin value: "" postgres=3D# CREATE SUBSCRIPTION sub2 ... WITH (streaming =3D ''); ERROR: streaming requires a Boolean value or "parallel" postgres=3D# CREATE SUBSCRIPTION sub2 ... WITH (copy_data =3D ''); ERROR: copy_data requires a Boolean value postgres=3D# CREATE SUBSCRIPTION sub2 ... WITH (wal_receiver_timeout =3D ''= ); ERROR: invalid value for parameter "wal_receiver_timeout": "" postgres=3D# CREATE SUBSCRIPTION sub2 ... WITH (max_retention_duration =3D = ''); ERROR: max_retention_duration requires an integer value postgres=3D# CREATE SUBSCRIPTION sub2 ... WITH (slot_name =3D ''); ERROR: replication slot name "" is too short I think conflict_log_destination should behave consistently with the other subscription options and reject an empty string rather than silently treating it as log. If there is a specific reason for accepting '', it would be good to document that behavior. Regards, Vignesh