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 1we7ie-004Znp-1e for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Jun 2026 08:51:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1we7id-0024BA-1P for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Jun 2026 08:51:55 +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 1we7ic-0024B2-2n for pgsql-hackers@lists.postgresql.org; Mon, 29 Jun 2026 08:51:55 +0000 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1we7ia-00000000jRC-3ffR for pgsql-hackers@lists.postgresql.org; Mon, 29 Jun 2026 08:51:53 +0000 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-8423f236418so1377858b3a.1 for ; Mon, 29 Jun 2026 01:51:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1782723112; cv=none; d=google.com; s=arc-20260327; b=ccoFOmb5wo0bBjJZuT04h17mX81DAunKEso2U1KV4dSheAzG5NLnBRKgK9ah85N3g2 Ut6vHZuOKp4kSAkWAKcwUgapaOZmS16c7TBoX3gmbJWXvoWIfdxBxEK+D6n937h47tjH vNsYqrMst7oozYaqYdaaD2uNQw+co0YA9aQ+RoQeccUjGbaTEDq4kEUDGLs9Fci1oRFv VnT+VcGOfLiARJfjSjZOg4/HK+CDvIvUCQzEX43IdmmVlbkuRtc695mSFpAR5iOqN+OA MyEbLgwmi/cgCsQyHPADc6Er9Y0CsGm7zxN6Z/ec1rHIbvmVEHDM53XbR1IyG4/ZvthE ftXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=zi3OzlXJmh+Sq0gQbYCC6zEt0jPsp2sDMN/qiThSEnQ=; fh=ueMnKscZqdmIuwYXlJuzabEtCFlQNX8Mob/rLRNi5YU=; b=ORVQL9iraLR2wNubgFy7XtLBdzX972g6bXfKPYbnv4NQ+9ddNSewlEm1GKIJYlZddU AfPC6o4d6lwstPX+Z0i0LsFUBI6ZST1hWJfljDAY/LJ4nm8moTmmtLGJUgPkTGeKYjgc PN0Tx1gG7JAyHijtLERoriBz5PdcCwLE3jeMiSZVoGzQ8MsunXQg29CJimwb8bwbq35B NDwB1BCR/o8nAgfKeIFmmIudIaq0f4aHKVpe2mOAq4nuSzlVBD+whIl89t8A19bUpbi6 w8zulYGN2AjEn6YH4fos+cl6hGL+T23ym75tVq/kuodHuNE3nX9Z9v4WYT+w8n63j2f7 SSdQ==; 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=1782723112; x=1783327912; darn=lists.postgresql.org; h=content-type:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:from:to:cc:subject:date:message-id:reply-to :content-type; bh=zi3OzlXJmh+Sq0gQbYCC6zEt0jPsp2sDMN/qiThSEnQ=; b=d0wZ4P6bcQEXoIKzwEECjGDgYouDcQgsQdDOGdKGHF2SUemcEZo5OqO668oMxq9SzV o+3hM06MniKoiKsvPb04e/xFNyo/WPk94MzoOR817b1jgYXsbnHZC9veFfg3i3fDfdZC +YESHaKfcwL4XdMztMZyg2fwsRgtMtaYSYUQVUHd/4S6I8KovBUjTeAmyjHyBXIlHG/h CNVUwoVTTTBY/q7O4liWwFrc4LC5Nmy6/PCzDBAreeXXW5gE/2c7jd7bbmum+Wv2/pMe TzBWdDd3RlyttRZTwPmBj9IJAHFdJtbyC4a7p8xNhQMT4feIlgE/zIHHiXECWeWfABcU 1RlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782723112; x=1783327912; h=content-type: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:content-type; bh=zi3OzlXJmh+Sq0gQbYCC6zEt0jPsp2sDMN/qiThSEnQ=; b=aHNA2O0vXBr/JrxzBbxYmJNGRrP7i3cHBK1wj1CKw5wfCMUL2KAXUzuu/KqRQlb7CO i+SJxgJoSSsTuebg6wvl2GF/ObY3dDXC+gcOixtZg64s9PKOrMx8oyIYVnlO4+StSBNh RH3gZMQk9LnQGY1s67usEIlbZNoeRNKAnlNfWTsJvUFoJsbXCKCPTr4ecyY6xWjJvPTJ FZWxVKiBi3X3fYj/33q0ytpEzFq/+RZXBVowXqLJTh2n3FIehlg5bmToslxCT1+4IVQd UbOdIM8bgd/4lSxQW4MPTv5gRDNhP0A8eJY5/SAzEn0cfJbaQcEdZ5vZ/2Ef5LO0It7D HJWw== X-Forwarded-Encrypted: i=1; AHgh+RqmTRfmQQ5lVuI5eQ2K0oHMfZtEmJ5lPwGt7ACPSFMWi4870Xt3a4r5doezxpgJPlQrD6IvN6kuKFxzZRWd@lists.postgresql.org X-Gm-Message-State: AOJu0Yzmk1cWiYLPELgGGC0SVJK2s7N6hRhOfaxUdGcKe20sPYCKFWy6 1lLUfF+KqR/isfHyN8tKIaj41FcXzmRD9O1KSvB6h+Tk3bAh0FzYcDPVtN7+FIYa96O7nC98A4S Z5kLvNPkM8KIdfeQPbYspr0m+PPnvgDI= X-Gm-Gg: AfdE7cn/LwgcNFulUMp3ZK3+OYVj0vHp/ybfi+rZbxQSWE8w/d50K1FsK9KMnJOaTES ayuzYYqs/IrbYuCcfg6WRRk4sO180LgSVbtOVi2ySkSXfTDVBtJUcqu0ZfIkZj8S2laGR/slxzk awxyiMh7ExV0dI0xq9/tnrb6hgvvM2XDW4MokGKOf1BmWEzDQyzXqb3l7LN5E6yTwla1Z/ouVfn EYrc9cq+tcLaONAIXKuWB0RVYfnOFkwZXrmGJoQ+2C6E0L5wF3EyuJatQ+cvUfB81417uDXg196 iYPcpweHI2WMQoNF5UQDO0+CFIo1FQkSB7bQjhdIRA== X-Received: by 2002:a05:6a00:3913:b0:82d:62ed:b01d with SMTP id d2e1a72fcca58-845b3bf73bcmr15733263b3a.45.1782723111909; Mon, 29 Jun 2026 01:51:51 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: shveta malik Date: Mon, 29 Jun 2026 14:21:38 +0530 X-Gm-Features: AVVi8CcAS41GVmxN80f4njtP-uthTdgnvs5-jYC5_BYWYIe9cSVMjP19pWFB_yE Message-ID: Subject: Re: Proposal: Conflict log history table for Logical Replication To: Dilip Kumar Cc: vignesh C , Amit Kapila , Nisha Moond , 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 Thanks for the patches. I have given more thoughts on below query which we also discussed in [1] while discussing checks in ATSimplePermissions(): ALTER TABLE ALL IN TABLESPACE pg_default SET TABLESPACE backup_space; Earlier we decided to error out on this for CLT. Refer [1]. On re-analyzing, I feel 'bulk movement of objects into new tablespace' should be allowed and CLT should be skipped silently. The rationale is that if a storage is full and user is trying to move all user created tables etc to a new tablespace, then he should be allowed to do so. By giving error in above, we will block him to do an important maintenance task, leaving the user with no practical option other than dropping the subscription or moving each object individually. On checking the code for above point, I found that 'AlterTableMoveAll' silently skips system tables as well. See the comment there: 'Do not move objects in pg_catalog as part of this'. Current behaviour around it: postgres=# SELECT relname, COALESCE(spcname, 'pg_default') FROM pg_class LEFT JOIN pg_tablespace ON reltablespace = pg_tablespace.oid WHERE relname IN ('tabnew', 'pg_class'); relname | coalesce ----------+-------------- tabnew | pg_default pg_class | pg_default (2 rows) postgres=# ALTER TABLE ALL IN TABLESPACE pg_default SET TABLESPACE backup_space; ALTER TABLE --user table tabnew moved, pg_class skipped silently. postgres=# SELECT relname, COALESCE(spcname, 'pg_default') FROM pg_class LEFT JOIN pg_tablespace ON reltablespace = pg_tablespace.oid WHERE relname IN ('tabnew', 'pg_class'); relname | coalesce ----------+-------------- tabnew | backup_space pg_class | pg_default --Now sub creation blocks the entire operation. postgres=# create subscription sub1 connection '...' publication pub1 WITH ( conflict_log_destination='all'); NOTICE: created conflict log table "pg_conflict.pg_conflict_log_16425" for subscription "sub1" NOTICE: created replication slot "sub1" on publisher CREATE SUBSCRIPTION postgres=# ALTER TABLE ALL IN TABLESPACE pg_default SET TABLESPACE backup_space; ERROR: 42501: permission denied: "pg_conflict_log_16454" is a conflict log table DETAIL: Conflict log tables are system-managed tables for logical replication conflicts. LOCATION: ATSimplePermissions, tablecmds.c:6930 ~~ IMO, we should silently skip CLT by expanding the check in AlterTableMoveAll() similar to system-tables. [1]: https://www.postgresql.org/message-id/CAJpy0uC5x%2BZ%3Dfvurvz%3DK8EYQSCQ1SCouR2LqiHS27Hp_Tzi6qw%40mail.gmail.com thanks Shveta