pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Using COPY via pg_background extension
3+ messages / 3 participants
[nested] [flat]

* Using COPY via pg_background extension
@ 2026-02-24 16:13 Oleg Dushin <oleg.dushin@pbs-software.com>
  2026-02-24 16:28 ` Re: Using COPY via pg_background extension Adrian Klaver <adrian.klaver@aklaver.com>
  2026-02-24 19:21 ` Re: Using COPY via pg_background extension Ron Johnson <ronljohnsonjr@gmail.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Oleg Dushin @ 2026-02-24 16:13 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

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

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Using COPY via pg_background extension
  2026-02-24 16:13 Using COPY via pg_background extension Oleg Dushin <oleg.dushin@pbs-software.com>
@ 2026-02-24 16:28 ` Adrian Klaver <adrian.klaver@aklaver.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Adrian Klaver @ 2026-02-24 16:28 UTC (permalink / raw)
  To: Oleg Dushin <oleg.dushin@pbs-software.com>; pgsql-general@lists.postgresql.org

On 2/24/26 8:13 AM, Oleg Dushin wrote:
> 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- 
> 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');

What happens when you try?

Though be aware that COPY needs server user access to the file.

If there is an error I would suggest reporting it here:

https://github.com/vibhorkum/pg_background/issues

> 
> https://www.postgresql.org/docs/current/sql-copy.html
> 
> Kind regards,
> 
> Oleg
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Using COPY via pg_background extension
  2026-02-24 16:13 Using COPY via pg_background extension Oleg Dushin <oleg.dushin@pbs-software.com>
@ 2026-02-24 19:21 ` Ron Johnson <ronljohnsonjr@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Ron Johnson @ 2026-02-24 19:21 UTC (permalink / raw)
  To: pgsql-general

On Tue, Feb 24, 2026 at 11:13 AM Oleg Dushin <oleg.dushin@pbs-software.com>
wrote:

> 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-limitations
>
>
>
> Perhaps I overlooked something.
>
>
>
> My question is: Is it possible to use the COPY protocol in combination
> with pg_background?
>

Would "psql run from crontab" serve your purpose just as well?

-- 
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2026-02-24 19:21 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-02-24 16:13 Using COPY via pg_background extension Oleg Dushin <oleg.dushin@pbs-software.com>
2026-02-24 16:28 ` Adrian Klaver <adrian.klaver@aklaver.com>
2026-02-24 19:21 ` Ron Johnson <ronljohnsonjr@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox