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.94.2) (envelope-from ) id 1tlC8u-00A11V-L7 for pgsql-admin@arkaria.postgresql.org; Thu, 20 Feb 2025 19:23:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tlC8s-00C13c-1F for pgsql-admin@arkaria.postgresql.org; Thu, 20 Feb 2025 19:23:26 +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.94.2) (envelope-from ) id 1tlC8r-00C10f-Ls for pgsql-admin@lists.postgresql.org; Thu, 20 Feb 2025 19:23:25 +0000 Received: from forward401a.mail.yandex.net ([2a02:6b8:c0e:500:1:45:d181:db02]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tlC8o-001x2N-1H for pgsql-admin@lists.postgresql.org; Thu, 20 Feb 2025 19:23:24 +0000 Received: from mail-nwsmtp-smtp-production-main-92.iva.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-92.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:319b:0:640:39b6:0]) by forward401a.mail.yandex.net (Yandex) with ESMTPS id 3E04B63F4D for ; Thu, 20 Feb 2025 22:23:18 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-92.iva.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id HNdbL22LoGk0-CVRQtaUU; Thu, 20 Feb 2025 22:23:17 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ya.ru; s=mail; t=1740079397; bh=pI2rSai6jHJRm/sun2ZIcNrJFg1KVNHRjXkfG904+rQ=; h=Subject:From:To:Date:Message-ID; b=tMD9a/Myfm5pjn7BnaPu0GZmbi7Q2v6xgmREZXNr29w6TNR3zZeM3inCXMYSawm2x e5bU0xzJ+i1R7sEXDGNbgdNYuC3/LwrF2rM7ygKSzrFgUaqavjTlHIMRpgkO+aWk50 DiZNbd9yByMch3MQtWCtXhGD1Ii14zGexHdMNp18= Authentication-Results: mail-nwsmtp-smtp-production-main-92.iva.yp-c.yandex.net; dkim=pass header.i=@ya.ru Message-ID: <40129c90-138c-4331-a3d6-c04158cb91e0@ya.ru> Date: Thu, 20 Feb 2025 22:23:18 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: pgsql-admin@lists.postgresql.org Content-Language: ru, en-US From: Olleg Samoylov Subject: A trigger in an extension Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi all. Server version is 16.6. I have the extension pgpro_scheduler. In the exception there are two tables and the trigger on one of them that write to the other. I was surprised but when I load dump created by pg_dump this trigger is created in the pre-data stage (automatically by create extension) early and thus has wrong behavior when uploaded data in the data stage (lead to duplication of primary key). I do workaround by creating superuser with session_replication_role=replica. But what was wrong? Is this bug inside pg_dump or pg_restore or extension pgpro_scheduler? Or something other? -- Olleg