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.96) (envelope-from ) id 1vuv1y-00CrQP-2i for pgsql-general@arkaria.postgresql.org; Tue, 24 Feb 2026 16:13:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vuv1x-001whQ-2U for pgsql-general@arkaria.postgresql.org; Tue, 24 Feb 2026 16:13:01 +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.96) (envelope-from ) id 1vuv1x-001wgo-1Q for pgsql-general@lists.postgresql.org; Tue, 24 Feb 2026 16:13:01 +0000 Received: from arena.pbs-software.com ([87.193.216.233]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vuv1u-00000000yv4-0C4S for pgsql-general@lists.postgresql.org; Tue, 24 Feb 2026 16:13:00 +0000 Received: from hermes.int.pbs-software.com (hermes.int.pbs-software.com [172.25.2.48]) by arena.pbs-software.com (Postfix) with ESMTPS id 51AABA04EA for ; Tue, 24 Feb 2026 17:13:15 +0100 (CET) Received: from LAP78 (unknown [172.23.9.109]) by hermes.int.pbs-software.com (Postfix) with ESMTPS id 664D1E0666 for ; Tue, 24 Feb 2026 17:12:56 +0100 (CET) From: "Oleg Dushin" To: Subject: Using COPY via pg_background extension Message-ID: <001901dca5a8$6fdc2760$4f947620$@pbs-software.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_001A_01DCA5B0.D1A08F60" X-Mailer: Microsoft Outlook 16.0 Thread-Index: AdylqDSSvm++ZslMQdW8hubdK0C5Jw== Content-Language: de Date: Tue, 24 Feb 2026 17:13:15 +0100 X-Scanned-By: MIMEDefang 2.84 on 172.22.1.233 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multipart message in MIME format. ------=_NextPart_000_001A_01DCA5B0.D1A08F60 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello everyone, I couldn't find anything on this topic in the mailing lists or in the documentation for the 'pg_background' extension. https://github.com/vibhorkum/pg_background?tab=readme-ov-file#known-limitati ons Perhaps I overlooked something. My question is: Is it possible to use the COPY protocol in combination with pg_background? More specifically, is it possible to load data from a file into a table via background worker process? COPY country FROM '/usr1/proj/bray/sql/country_data'; Would the following call or something similar be possible and achieve the desired result?? pg_background_launch_v2('COPY country FROM '/usr1/proj/bray/sql/country_data'); https://www.postgresql.org/docs/current/sql-copy.html Kind regards, Oleg ------=_NextPart_000_001A_01DCA5B0.D1A08F60 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hello = everyone,

 

I couldn't find anything on this topic in the mailing lists = or in the documentation for the ‘pg_background’ = extension.

 

https://github.com/vibhorkum/pg_background?tab=3Dreadme-ov-f= ile#known-limitations

 

Perhaps I overlooked something.

 

My question is: Is it possible to = use the COPY protocol in combination with = pg_background?

 

More specifically, is it possible to load data from a file = into a table via background worker process?   =

COPY = country FROM = ‘/usr1/proj/bray/sql/country_data’;

 

Would the following call or = something similar be possible and achieve the desired = result??

 

pg_background_launch_v2(‘COPY country FROM = ’/usr1/proj/bray/sql/country_data');

 

https://www.postgresql.org/docs/current/sql-copy.html

 

Kind regards,

 

Oleg

------=_NextPart_000_001A_01DCA5B0.D1A08F60--