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 1uexEx-00H5gH-SY for pgsql-general@arkaria.postgresql.org; Thu, 24 Jul 2025 14:48:12 +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 1uexEv-008XDP-Ef for pgsql-general@arkaria.postgresql.org; Thu, 24 Jul 2025 14:48:09 +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 1uexEu-008XDG-Hu for pgsql-general@lists.postgresql.org; Thu, 24 Jul 2025 14:48:09 +0000 Received: from fout-a3-smtp.messagingengine.com ([103.168.172.146]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1uexEs-000ZJL-2G for pgsql-general@postgresql.org; Thu, 24 Jul 2025 14:48:07 +0000 Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfout.phl.internal (Postfix) with ESMTP id 981B4EC023C; Thu, 24 Jul 2025 10:48:05 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Thu, 24 Jul 2025 10:48:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1753368485; x=1753454885; bh=t9rAZgrPGH6+JKhKFbIVWnH9WuBfWwx3Modtdo2fFKk=; b= dySSqN0GsfHKRoWdwUzFlU/YahJ/ZAthkCCogTMNt4895nca9VQ5NO3zrJnDymsD nTQAV79iLAq05/wBbDwKQRUpNFAnGR7705gAtnYqpnHmt/OgtyCGLtA2ZF1h6aIU CtgB7Q38GPvnQyF/D8m/Z/Y7JQ0qWzZzWgCJjgx5os18K0h8qIs8DRBvaLpT+a/4 g7rCCFwQ5Be1Xe0bqCn27fiSqRlWQXkui/jtAG0e9+0zT53Aps8b4glDSvQBS6rx 01OssqT0YXp2TNyd5zBpKRrRym7PMXuxtOGMbZNoAB7dVnW5Cdps5sPWLUEQ+M2q UPOa5Bn6n0Srw76x1fAjhw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1753368485; x= 1753454885; bh=t9rAZgrPGH6+JKhKFbIVWnH9WuBfWwx3Modtdo2fFKk=; b=Z m93szPPVo+b1AUkXU3d4byGTTlP8xONNaUdJyqRaMAr+PQjK7gNgxJ8465rfijo1 FINa3hlBpgNfBk+Hg57xVI70MyeV4a4tUsMe0HR9S7MtZBLtSqz2z6b/Orj1pruv 5KliHxYE7l2bbw52rK70nBy2KT/Y9O9ty1WzPwX8diQeiVRnsrH9G+fE/ljFRdOs 6aM0uEd7tByglxtduawnSOIftJ69Avhnaq2GOaa4d9umw5vn7QFbPxmvy2FjK2Va ye4HTLOc81HdEo5t0xdNL2T2w/+/bqzGtihPZr/faZt6eWPcE0WrMJfMwEFfHf9u frh3HI4a2J0Ba8INu4aMg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdektdelfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomheptegurhhirghn ucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmqe enucggtffrrghtthgvrhhnpeefgeefieeutdfggfetgefgheekjeehteeileeigfetieek jedvieeviefgheevtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmpdhnsggp rhgtphhtthhopeegpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehsihhvrghpoh hsthhgrhgvsheshigrhhhoohdrtghomhdprhgtphhtthhopehmmhhonhgtuhhrvgesghhm rghilhdrtghomhdprhgtphhtthhopehlrghurhgvnhiirdgrlhgsvgestgihsggvrhhtvg gtrdgrthdprhgtphhtthhopehpghhsqhhlqdhgvghnvghrrghlsehpohhsthhgrhgvshhq lhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 24 Jul 2025 10:48:04 -0400 (EDT) Message-ID: Date: Thu, 24 Jul 2025 07:48:04 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Is there any limit on the number of rows to import using copy command To: "sivapostgres@yahoo.com" , Merlin Moncure , Laurenz Albe Cc: Pgsql-general References: <1453510076.1900935.1753260637232.ref@mail.yahoo.com> <1453510076.1900935.1753260637232@mail.yahoo.com> <2129916799.2277829.1753359532611@mail.yahoo.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: <2129916799.2277829.1753359532611@mail.yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 7/24/25 05:18, sivapostgres@yahoo.com wrote: > Thanks Merlin, adrain, Laurenz > > As a testcase, I split the trigger function into three, one each for > insert, update, delete, each called from a separate trigger. > > IT WORKS!. It worked before, it just slowed down as your cases got bigger. You need to provide more information on what test case you used and how you define worked. > > Shouldn't we have one trigger function for all the three trigger > events?  Is it prohibited for bulk insert like this? No. Triggers are overhead and they add to the processing that need to be done for moving the data into the table. Whether that is an issue is a case by case determination. > > I tried this in PGAdmin only, will complete the testing from the program > which we are developing, after my return from holiday. From Merlin Moncure's post: "* reconfiguring your logic to a procedure can be a better idea; COPY your data into some staging tables (perhaps temp, and indexed), then write to various tables with joins, upserts, etc." I would suggest looking into implementing the above. > > Happiness Always > BKR Sivaprakash > -- Adrian Klaver adrian.klaver@aklaver.com