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 1wV5Q3-001fy5-0q for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Jun 2026 10:35:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wV5Q2-0069Zz-0d for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Jun 2026 10:35:22 +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 1wV5Q1-0069Zr-2q for pgsql-hackers@lists.postgresql.org; Thu, 04 Jun 2026 10:35:21 +0000 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wV5Pz-00000001Dn6-4AD7 for pgsql-hackers@lists.postgresql.org; Thu, 04 Jun 2026 10:35:21 +0000 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-2c0c35980fdso5496665ad.2 for ; Thu, 04 Jun 2026 03:35:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1780569317; cv=none; d=google.com; s=arc-20240605; b=h1omoE/VGDp7hkQf8Qg3oqQtkGD+dT1ySA/A+qKJ5zcI+ljbeTLfuLZo9iYd4AjMzX X/c1Apoh+QZLtfYkbtFMjAE/8YWb6wWpe72unIx2Ze4Og66yzViOtvyPLT38rBqxlDp8 9HtCaFzb313DyQNRL5GxTbjqhY1DKDkoxTnjKnOGe5UkJpQM3POvBCVyhuu8P8ejXQAi O6pB4fMjaa7vdoy9e2DHY4hHuRnvP05kFDyE1dvrwxKvFS1ncxUkA65y1u/tcRr4tXAE TLZNmmykHAtOkxo8ammOfps5QhkZJp8V1FPAPPFj3Zb51h1JBtxhd+qCJbkj4xRlBKnu peQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=tVKiOuMsGGNVGmBKX093JEH13HjDQHyvB7jke+v4g9o=; fh=t5dwuulGU0zONj4QhYjz3xcPLd6mpT8YcqZhhe+aML8=; b=Fb8iHoTD6ZgeaEui1nWot2DUr1sLJ+WX7XZfQmhT0zsGHR3yX5e5ocdHnBGxGGyErG rGiToyqx6nY1MAoOsBZaDO8eSVgT4lTa8ERoCQ2p22qzLsv3io0uFbBojbkn+IWJSTfd AAtmDvNu+7WCdUzLk8W4RwxWd1GPYnbN/c9Je55uLgu0Yl5fgVZsk3NStfFABIMnOYy8 vOCYrINn9BABl93kTNd8hHfUi4jCeNfk+NlEQ2PnY06CwAY5J9b9tfAUZ3+3dTdVkf4B M3Z24PmXp9ebgLl9y+u3YAXy5mG3Pj6VYjBipt92OWuFg2AUAI8tQIipbPmf29EWkSO7 jJkQ==; 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=1780569317; x=1781174117; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=tVKiOuMsGGNVGmBKX093JEH13HjDQHyvB7jke+v4g9o=; b=nMKUa0klLOx5xaLDinAqgLEVHcDPdgpdquYL0IFy/JnKgYiOBAX/wSl+hkrtiplEnH sijAGqskCpWFEZKjouxjn8E9U6P6SsrrEiV+3pSmPVFGkY7MECyacC5b9qQA8qe2dhRG 0ZvWbzFDD07pzveydsBoBVDdrrX8bjDCRjruCo64NJlU8IVe4KVTZyL4/pIIMgTrfg0/ Qm8wT6gKoIX3B8xirHmN5aDpzPO4AYoh9mXijdNEVOyILs5h3rcEVa4lBOGGLV7+gF4K enDf1FRH6/kqC+GEgi7AemCoNxoc2Paoji1p9shCq5DlR+PxRy5Z59PIsqLri/vJEWkW OKrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780569317; x=1781174117; h=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=tVKiOuMsGGNVGmBKX093JEH13HjDQHyvB7jke+v4g9o=; b=P4O8nshSwfTkiFKoPFh+GZ7uNwAsoKRhEf0NOXKQ57xCbpfarOwC8YT8uXbXDkfxBo LWakJb2whfbfslSS/12O0Yzg2ea99LFkmIpT27xC6a9fwy750Pm0Go1RkVuYjrHWPkXZ 8+GXGOSSo0aqJZT30o6EEpk86qM6TDE/4tczNGmlFXflfIZxrXY5x1aqYDkfrRoiSBsM U2pjmph4kVW14Rt8clV8K1Ewu5bVJ7VWGTpnr31qGQuulmOnJEqRY+/EhWyHPnnRSqvm cdzDY3SYG4tPTcXL1Z0tEDXBr8CsrgIYzEr8X56zacBV2i6RhO6hUJYc/SYE8rvCTpSA 2XMg== X-Forwarded-Encrypted: i=1; AFNElJ9zGVm7kRSFfeQNuzOALKUbrztzFJo2vTZ0xXCOjXlU6slisM15namw0WK/fO5W6R10Qm7MJHMTlExoloi5@lists.postgresql.org X-Gm-Message-State: AOJu0Yx197DBTxP/kyW/jyXLRS1m3oVo1xQQRni1sd3zDS1PSbDUSgoK pugE9r9p5i4YGAz9Zwjr8HVPN4IB1dIUKWgE2b1x6vPYn56ZqrIpFy9jevDZ3s7I61W9JvsIsQF PYurA2R+ug0kl6P+q9vfyL/kq35OezBA= X-Gm-Gg: Acq92OGq3igWFTgBFOt0rMbClBkYmjrY+AbZQdUCHWMASNbrna7iAgpr6lKqUk0ViSG CFT1wMckSm2npAeSpcD+OsbhfSEEsJ864IWEhOiBsQsCHKutO9MYZoU1A5tErX77pKAmh6qt2Y/ cwAl6FLXej1zqJQrrzaNp29oUktz9RW90BBFjEEWrwXDJDCE6kRE3qBkCefT6m0J6FlNmceKibB CGAoDio99jId0eVXPw76C2+GU9yIh9MFIfdXGYjQqKvGlNZlUmyLdxYvXAjbROAcy3DusJ1r1PN cJ0b+v0iCeQaQoZ+bdOij0x9RouRiejwE2fKEu5dErV4ryvaE3JOatKiO19JRjgp0bBBmzz/6vc d4FFlkiQTNaJzNoVROB8J X-Received: by 2002:a17:902:c40d:b0:2c1:1a22:7c43 with SMTP id d9443c01a7336-2c163d92becmr80172605ad.24.1780569317082; Thu, 04 Jun 2026 03:35:17 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: shveta malik Date: Thu, 4 Jun 2026 16:05:06 +0530 X-Gm-Features: AVHnY4KkOmA3ZIU8zARnJ5netBYmYBnrws1qn-cdTNm4CUGWV_hi6gEEiHxc_ho Message-ID: Subject: Re: Proposal: Conflict log history table for Logical Replication To: Dilip Kumar Cc: vignesh C , Nisha Moond , Amit Kapila , Peter Smith , Masahiko Sawada , Bharath Rupireddy , PostgreSQL Hackers , shveta malik Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I noticed that it is currently possible to acquire explicit locks on a CLT: --Session locks table and does not commit txn: postgres=# BEGIN; LOCK TABLE pg_conflict.pg_conflict_log_16481 IN SHARE MODE; BEGIN LOCK TABLE Doing so can cause the apply worker to block indefinitely when it attempts to modify the CLT: [247433] LOG: logical replication apply worker for subscription "sub1" has started [247433] LOG: process 247433 still waiting for RowExclusiveLock on relation 16482 of database 5 after 1001.030 ms [247433] DETAIL: Process holding the lock: 245584. Wait queue: 247433. [247433] CONTEXT: waiting for RowExclusiveLock on relation 16482 of database 5 Toast Table behaviour: postgres=*# LOCK TABLE pg_toast.pg_toast_16384 IN SHARE MODE; ERROR: cannot lock relation "pg_toast_16384" DETAIL: This operation is not supported for TOAST tables. Should we consider disallowing explicit LOCK TABLE operations on CLTs, similar to how PostgreSQL handles TOAST tables? Or does anyone see any legitimate use-case (I don't) where we would need to allow explicit LOCKs on CLT? thanks Shveta