Subject: Concurrently run scipts

From: Shaozhong SHI <[email-masked]>
Date: Wed, 25 Oct 2023 20:57:03 +0100

In psql  we run scripts sequentially like the following:

\ir script1
\ir script2

Is there something similar for concurrent running script?

Regards,

David

---

From: Bruce Momjian <[email-masked]>
Date: Wed, 25 Oct 2023 16:15:45 -0400

> Is there something similar for concurrent running script?

Uh, yeah, see the use of \! and & starting on slide 59:

	https://momjian.us/main/writings/pgsql/locking.pdf

-- 
  Bruce Momjian  <[email-masked]>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Only you can decide what is important to you.

---

From: hector vass <[email-masked]>
Date: Wed, 25 Oct 2023 21:42:50 +0100

Concurrently but independently
psql -f script1 & psql -f script2 && fg
Similar in windows can be achieved using start iirc

---

From: Shaozhong SHI <[email-masked]>
Date: Thu, 26 Oct 2023 09:01:14 +0100

How many scripts can be run concurrently but independently?

Regards,

David

---

From: hector vass <[email-masked]>
Date: Thu, 26 Oct 2023 10:21:26 +0100

max_connections

..which is set in postgresql.conf
select * from pg_settings() where setting~'conn'

---

From: Shaozhong SHI <[email-masked]>
Date: Thu, 26 Oct 2023 10:49:21 +0100

Thanks.  I am aware of that concurrent running of scripts can be done in
Linux.

But, my users prefer to run these in PgAdmin.  Can such concurrent run be
automated in PgAmin?

Regards,  David

---

From: hector vass <[email-masked]>
Date: Thu, 26 Oct 2023 14:50:53 +0100

Sorry no idea, pgadmin is a web app front end to postgresql so there may be
a more appropriate mailing list to ask on than pgsql-sql