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 1t0Ruw-00BV4Z-H1 for pgsql-general@arkaria.postgresql.org; Mon, 14 Oct 2024 20:43:50 +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 1t0Ruu-00HF12-Mx for pgsql-general@arkaria.postgresql.org; Mon, 14 Oct 2024 20:43:49 +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 1t0Ruu-00HF0u-9R for pgsql-general@lists.postgresql.org; Mon, 14 Oct 2024 20:43:48 +0000 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1t0Rur-000tTw-QP for pgsql-general@postgresql.org; Mon, 14 Oct 2024 20:43:47 +0000 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a994cd82a3bso701699666b.2 for ; Mon, 14 Oct 2024 13:43:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728938623; x=1729543423; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=tz52RaeZEBYDCaQInB0Hj+f0/5LhxLzMh296dDSlvgM=; b=ZtSngfEPNROH6G4HTrc8bPYg9jpP4dFMJZu09mKlKHUa2AIh8/LNbt6xG9fa7/0LKy RPkTGa5UFNcVlNniZQKMc5z1iENaenULvJJ2pkf31qEL2CH9U1Vj2OcbS6uETw2TfOXd wdKB5crznjkkElmYI/IdMyQO5+Dv6vqN/Ujesu8MOtwriEQPFAo9xmXv6gHVq1TnxTOS vOQM/Abj0KpFWMR9PxpAoSDACjAW+6QBlmNLeEwMiGTiE+YEeXqB5FV1CuGI3BKbGIY1 OQyA3DN0DDLXJwJmkIrIROj+Z8QBTeCTeqoUzRB0rHhZovK5mcZTAYbpwat64ymOQQIf exGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728938623; x=1729543423; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tz52RaeZEBYDCaQInB0Hj+f0/5LhxLzMh296dDSlvgM=; b=NLpkLFbaBLiLcIi/cx4nlXwwJV3XSUBFNpIxJeZIxxGdaLAT/Vc2S1N0hW+s5Zx2GD MxQermAQ76HuirqLVWWaQZmtZNE1h9UbXy0AQ/EFW0/HlAlxvuE3c6HE9JGFI5Y3QxWh bpJg349whfX/N7ds5cfJl6TIbshaLxhF4d2Yq82g25ROLtmYP//AfhxXWZX5hE+lmyo0 Kc6gPPKZ4mDOEDewzxgblybgxMJzy5qyZYlaowGYBBncfKo9P3LY7/pPDoO1+PxSL5ID eQmDC7CKVmXyan6FGt2W+D6lXOTsVrGWSx+ugb+43EAFVIFx/OALwXFK9Cpk6zqNgA8D Wtng== X-Gm-Message-State: AOJu0YyttmKSlRxnS6nV1BKc0bKXnHJ8K5tbMlm/y2ztL5Zh5bjRiHRD u5AoHmqi4z1b6CG2DcAh2Bx1Th4MZlOJxOZ12WaAEUqSwQXRK1C7/vEwz1MzOaExIzx04PoT2wc 3tQ3BnZjsXju8fhB98mZ+WUNetqs= X-Google-Smtp-Source: AGHT+IE9hzM1TsK0ZX1zt+jNclj+vkVl0VRJ2BNu34/ziCG10dCZIwwdWbOlacEDLfJmM7XOFQKRMRwUMP288ooATOE= X-Received: by 2002:a17:906:6a0f:b0:a9a:196:fc29 with SMTP id a640c23a62f3a-a9a0196fee5mr638618266b.61.1728938622875; Mon, 14 Oct 2024 13:43:42 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Durgamahesh Manne Date: Tue, 15 Oct 2024 02:13:31 +0530 Message-ID: Subject: Re: How to Copy/Load 1 billions rows into a Partition Tables Fast To: "Wong, Kam Fook (TR Technology)" Cc: pgsql-general Content-Type: multipart/alternative; boundary="000000000000748395062475e48a" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000748395062475e48a Content-Type: text/plain; charset="UTF-8" On Mon, 14 Oct, 2024, 23:29 Wong, Kam Fook (TR Technology), < kamfook.wong@thomsonreuters.com> wrote: > I am trying to copy a table (Postgres) that is close to 1 billion rows > into a Partition table (Postgres) within the same DB. What is the fastest > way to copy the data? This table has 37 columns where some of which are > text data types. > > Thank you > Kam Fook Wong > > > This e-mail is for the sole use of the intended recipient and contains > information that may be privileged and/or confidential. If you are not an > intended recipient, please notify the sender by return e-mail and delete > this e-mail and any attachments. Certain required legal entity disclosures > can be accessed on our website: > https://www.thomsonreuters.com/en/resources/disclosures.html > Hi Kam Fook Wong, You can achieve it with pg_bulkload utility Regards, Durga Mahesh > --000000000000748395062475e48a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, 14 Oct, 2024, 23:29 Wong, Kam Fook (TR Technol= ogy), <kamfook.wong@t= homsonreuters.com> wrote:

I am trying to copy= a table (Postgres) that is close to 1 billion rows into a Partition table = (Postgres) within the same DB.=C2=A0 What is the fastest way to copy the da= ta?=C2=A0 =C2=A0This table has 37 columns where some of which are text data types.

Thank you
Kam Fook Wong


This e-mail is for the sole use of the intended recipient and contains info= rmation that may be privileged and/or confidential. If you are not an inten= ded recipient, please notify the sender by return e-mail and delete this e-= mail and any attachments. Certain required legal entity disclosures can be accessed on our website: https://www.thomsonreuters.com/en/resources/dis= closures.html

Hi Kam Fook Wong,

You can achieve it with pg_bulkload utility

Regards,
Durga Mahe= sh
--000000000000748395062475e48a--