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 1szv23-008gmB-Sm for pgsql-admin@arkaria.postgresql.org; Sun, 13 Oct 2024 09:37:00 +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 1szv21-001AeM-Iv for pgsql-admin@arkaria.postgresql.org; Sun, 13 Oct 2024 09:36:57 +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 1szv21-001AeE-3K for pgsql-admin@lists.postgresql.org; Sun, 13 Oct 2024 09:36:57 +0000 Received: from mail-cy.bbox.fr ([194.158.98.48]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1szv1x-000eUP-Kv for pgsql-admin@lists.postgresql.org; Sun, 13 Oct 2024 09:36:54 +0000 Received: from mail.jpp.fr (unknown [176.187.84.182]) by mail-cy.bbox.fr (Postfix) with ESMTP id BF37537; Sun, 13 Oct 2024 11:36:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mail-cy.bbox.fr BF37537 Received: from localhost (localhost [127.0.0.1]) by mail.jpp.fr (Postfix) with ESMTP id 4D5A2C002D; Sun, 13 Oct 2024 11:36:49 +0200 (CEST) Received: from mail.jpp.fr ([127.0.0.1]) by localhost (mail.jpp.fr [127.0.0.1]) (amavis, port 10032) with ESMTP id FGAZLsokVd3x; Sun, 13 Oct 2024 11:36:49 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.jpp.fr (Postfix) with ESMTP id 10CE5C0033; Sun, 13 Oct 2024 11:36:49 +0200 (CEST) X-Virus-Scanned: amavis at jpp.fr Received: from mail.jpp.fr ([127.0.0.1]) by localhost (mail.jpp.fr [127.0.0.1]) (amavis, port 10026) with ESMTP id cLkTUri6P5RR; Sun, 13 Oct 2024 11:36:48 +0200 (CEST) Received: from mail.jpp.fr (localhost [127.0.0.1]) by mail.jpp.fr (Postfix) with ESMTP id B9874C002D; Sun, 13 Oct 2024 11:36:48 +0200 (CEST) Date: Sun, 13 Oct 2024 11:36:48 +0200 (CEST) From: Jean-Paul POZZI To: Sabyasachi Mukherjee Cc: pgsql-admin Message-ID: <2131834790.929.1728812208526.JavaMail.zextras@jpp.fr> In-Reply-To: References: Subject: RE: Loading data from one table to another MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_34e47ce4-c6e6-4c5b-90c3-4878a5d46cd8" X-Originating-IP: [192.168.2.8] X-Mailer: Carbonio 24.9.5_ZEXTRAS_202409 (CarbonioWebClient - Firefox 132.0 (Linux)/24.9.5_ZEXTRAS_202409 carbonio 20240918-0914 FOSS) Thread-Topic: Loading data from one table to another Thread-Index: AQHbHTd44EbVmBQV6kGso1S6rljeY0cf6LOY X-VADE-SPAMSTATE: clean X-VADE-SPAMSCORE: -100 X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeeftddrvdegfedgudekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuuefqfggjifgfgffupdcuqfgfvfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpeffhffvvefkjghfufggtghiofhtsegrtdgtreertdejnecuhfhrohhmpeflvggrnhdqrfgruhhlucfrqfgkkgfkuceojhhprdhpohiiiihisehiiiiiohhprdhnvghtqeenucggtffrrghtthgvrhhnpeetgeetteeuuefhjeffieevieeiffefuefhtefhtdehheekueejgfelvdefffelveenucfkphepudejiedrudekjedrkeegrddukedvpdduledvrdduieekrddvrdeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudejiedrudekjedrkeegrddukedvpdhhvghlohepmhgrihhlrdhjphhprdhfrhdpmhgrihhlfhhrohhmpehjphdrphhoiiiiihesihiiiihophdrnhgvthdpnhgspghrtghpthhtohepvddprhgtphhtthhopehpghhsqhhlqdgrughmihhnsehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrghdprhgtphhtthhopehmuhhkhhgvrhhjvggvrdhsrggshigrshgrtghhihesohhuthhlohhokhdrtghomh List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --=_34e47ce4-c6e6-4c5b-90c3-4878a5d46cd8 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, It seems that the command is too lonbg to execute from pgadmin, try to exec= ute the same Sql from a terminal ... or split your work with "from date1 to= date2", you can split the work in 2,3 or more tasks and it will succed. Regards JP P De: "Sabyasachi Mukherjee" =C3=80: "undefined" Envoy=C3=A9: dimanche 13 octobre 2024 08:26 Objet: Loading data from one table to another Dear All, We have a Postgres DB with 99 GB of data. The query performances are slow a= s expected. I am trying to introduce monthly partitions for this table. To copy the data - the command that I am trying to execute is (Insert into = ...(Select * from )) using PGAdmin The DB is hosted in Windows server having 8 GB of RAM. Note - we do not have any surrogate key in this table. And the event time r= ecorded is also duplicated. The command fails every time. Can you please advise some strategy to get this done? Once the pgadmin lost connection. Another error that I have got is,=C2=A0 ERROR: =C2=A0Failed on request of size 1048576 in memory context "AfterTrig= gerEvents".out of memory ERROR: =C2=A0out of memory SQL state: 53200 Detail: Failed on request of size 1048576 in memory context "AfterTriggerEv= ents". Thanks & regards Sabyasachi Mukherjee --=_34e47ce4-c6e6-4c5b-90c3-4878a5d46cd8 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

Hello,

 

It seems that the command is too lonbg to execute from pgadmin, try to e= xecute the same Sql from a terminal ... or split your work with "from date1= to date2", you can split the work in 2,3 or more tasks and it will succed.=

 

Regards

 

JP P

 




De: "Sabyasachi Mukherjee" <mukhe= rjee.sabyasachi@outlook.com>
=C3=80: "undefined" &l= t;pgsql-admin@lists.postgresql.org>
Envoy=C3=A9: di= manche 13 octobre 2024 08:26
Objet: Loading data from = one table to another

Dear All,
 
We have a Postgre= s DB with 99 GB of data. The query performances are slow as expected. I am = trying to introduce monthly partitions for this table.
To copy the data = - the command that I am trying to execute is (Insert into ...(Select * from= )) using PGAdmin
The DB is hosted = in Windows server having 8 GB of RAM.
 
Note - we do not = have any surrogate key in this table. And the event time recorded is also d= uplicated.
 
The command fails= every time.
Can you please ad= vise some strategy to get this done?
 
Once the pgadmin = lost connection.
Another error tha= t I have got is, 
 
ERROR:  Fail= ed on request of size 1048576 in memory context "AfterTriggerEvents".out of= memory
ERROR:  out of memory
SQL state: 53200
Detail: Failed on= request of size 1048576 in memory context "AfterTriggerEvents".
 
Thanks & rega= rds
 
Sabyasachi Mukher= jee
 
 
--=_34e47ce4-c6e6-4c5b-90c3-4878a5d46cd8--