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 1u0Zt6-003evt-ME for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Apr 2025 05:46:45 +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 1u0Zs7-00E45l-9J for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Apr 2025 05:45:43 +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.94.2) (envelope-from ) id 1u0Zs6-00E45b-R0 for pgsql-hackers@lists.postgresql.org; Fri, 04 Apr 2025 05:45:42 +0000 Received: from mail.postgrespro.ru ([93.174.132.70]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u0Zs4-003IOr-2H for pgsql-hackers@lists.postgresql.org; Fri, 04 Apr 2025 05:45:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1743745539; bh=ToNcX67Y/hwq440xra7jn4yhaaze3Utj3YW4+YzTqaQ=; h=Message-ID:Date:User-Agent:Subject:To:Cc:References:From: In-Reply-To:From; b=uDnzYy+Y8hWg+j19uYIF5pyMocDbHYd4bjlxKS+bTCEtcToxPxdV/0O/LtIw645RG t1ife1J4DvfztZ2XkqKlqwDZ7/qBHSB+lyTIlKjK0MtaSdLkcvlwYOTm6Txx/E069+ qmgUw6fYbWdqAbyKMfSqed0jNBhHQ7ZUTsRJrzwmAxtMJtlgPN2oNc2yYKUI1mLU2a GaHp3Q0XzZlp/jZQ7ZCVNhVKoko6cc796akvH1LA8kC4nwN4iRha87lHx3gk6O6+7T D12Ed1fZ0rwuepsLJYH5xSY/pTQB2G2QaMRE5A/SXBxmvsK1yp5Rq3RekFgvyT0a8r QDYy6aGj1FlUw== Received: from [172.19.0.1] (unknown [109.202.2.11]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: d.bondar@postgrespro.ru) by mail.postgrespro.ru (Postfix/465) with ESMTPSA id AE517608D3; Fri, 4 Apr 2025 08:45:38 +0300 (MSK) Content-Type: multipart/alternative; boundary="------------KqBGQSBH8MKnvLeFPkAOJS0q" Message-ID: Date: Fri, 4 Apr 2025 12:45:37 +0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [fixed] Trigger test To: Tom Lane Cc: Paul Jungwirth , PostgreSQL Hackers , Lilian References: <79755a2b18ed4fe5e29da6a87a1e00d1@postgrespro.ru> <7879fede654a17b9fcc8548de2cb3f69@postgrespro.ru> <174293570374.60294.13024599409215069922.pgcf@coridan.postgresql.org> <17a8a24f7295201873d105c5118024f5@postgrespro.ru> <766da800-4884-41a9-8e8e-71d131dc599c@illuminatedcomputing.com> <81a79dfc-b6b1-4155-90b6-c06201d84afb@postgrespro.ru> <1441543.1743703890@sss.pgh.pa.us> Content-Language: en-US From: Dmitrii Bondar In-Reply-To: <1441543.1743703890@sss.pgh.pa.us> X-KSMG-AntiPhishing: NotDetected X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.1.0.7854, bases: 2025/04/04 04:51:00 #27854642 X-KSMG-AntiVirus-Status: NotDetected, skipped X-KSMG-LinksScanning: not scanned, disabled by settings X-KSMG-Message-Action: skipped X-KSMG-Rule-ID: 1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------KqBGQSBH8MKnvLeFPkAOJS0q Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 04/04/2025 01:11, Tom Lane wrote: > So that's a long laundry list and we haven't even dug hard. > Is it worth it? If you feel like doing the legwork then > I'm willing to support the project, but I really wonder if > we shouldn't cut our losses and just remove the module. > > (I hesitate now to look at the rest of contrib/spi/ :-() You wrote a note that I decided to omit. As I mentioned, the patch does not even fix the cascade update problem—there are still broken cases—because it seems impossible to address it in a gentle way (the code was patched 20 years ago; it's truly legacy). I considered removing it entirely, but that seemed too drastic a solution (and, at the very least, I don't have enough expertise to make that decision). If everything looks acceptable, I would prefer to cut the module. The |check_primary_key| and |check_foreign| functions are clearly unused, are buggy, and no one has reported any obvious problems—so refint.c can be safely removed. Autoinc.c also looks problematic. There are some question. When should we remove the module? Should we mark it as deprecated for now and remove it later? Should we handle it in another thread? Should we apply this patch in that case? Best regards, Dmitrii --------------KqBGQSBH8MKnvLeFPkAOJS0q Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


On 04/04/2025 01:11, Tom Lane wrote:
So that's a long laundry list and we haven't even dug hard.
Is it worth it?  If you feel like doing the legwork then
I'm willing to support the project, but I really wonder if
we shouldn't cut our losses and just remove the module.

(I hesitate now to look at the rest of contrib/spi/ :-()

You wrote a note that I decided to omit. As I mentioned, the patch does not even fix the cascade update problem—there are still broken cases—because it seems impossible to address it in a gentle way (the code was patched 20 years ago; it's truly legacy).

I considered removing it entirely, but that seemed too drastic a solution (and, at the very least, I don't have enough expertise to make that decision). If everything looks acceptable, I would prefer to cut the module. The check_primary_key and check_foreign functions are clearly unused, are buggy, and no one has reported any obvious problems—so refint.c can be safely removed. Autoinc.c also looks problematic.

There are some question. When should we remove the module? Should we mark it as deprecated for now and remove it later? Should we handle it in another thread? Should we apply this patch in that case?

Best regards,

Dmitrii

--------------KqBGQSBH8MKnvLeFPkAOJS0q--