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 1qw0lT-0092RW-A4 for pgsql-sql@arkaria.postgresql.org; Thu, 26 Oct 2023 13:51:11 +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 1qw0lR-000b3L-LN for pgsql-sql@arkaria.postgresql.org; Thu, 26 Oct 2023 13:51:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qw0lR-000azm-A8 for pgsql-sql@lists.postgresql.org; Thu, 26 Oct 2023 13:51:09 +0000 Received: from mail-oo1-xc2f.google.com ([2607:f8b0:4864:20::c2f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qw0lN-002vqA-UK for pgsql-sql@lists.postgresql.org; Thu, 26 Oct 2023 13:51:08 +0000 Received: by mail-oo1-xc2f.google.com with SMTP id 006d021491bc7-581e92f615fso513750eaf.2 for ; Thu, 26 Oct 2023 06:51:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698328264; x=1698933064; darn=lists.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=mRPX//n4xkwKJ+Qo7JWXEMVj0meG+33Wr8iojGW0i9g=; b=E5sehqcMB/S3pe+41msYNjnygaCoX/+HLS9BK4A1UWydTCdTFU97v31go3HBOaVm8+ uFmqCOVR67EgFZJgJk/JJfwE9ftjPiiAGtBLvkPD2OaCE8ML0957K9czYV7K7bda83Vs T2Y/XSKHjFXpNcbYEy0cgp8nqJpSRMsfZ9OYfXvBSzgeXO0Md1FHpEMXB2FoMUZuf6ip jqI52I1r6Bt2nN0gMn7rlnBiNCcv+eLrX49k3BJVhniO9oOB/AjrX+PRshG9hCQIyLti emusVO8rHwe081ensgwNvLtc1634WtKwlOT/ZhV0iRHqc1zCnfaSAPU36t0SBDlv1wL2 I85g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698328264; x=1698933064; 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=mRPX//n4xkwKJ+Qo7JWXEMVj0meG+33Wr8iojGW0i9g=; b=VcqLOjlmNvWbqCl32w7d08McDG3VLXlS+EvoVrcZL7OuP24PyAl023WW1VFRK6RhkD epBLaytFu1TY+BUEmhXxhDl9U55Hha+dmW+B49lY8PyN1JdZqre/PeRGGA8M2NYyhRu7 9Z+tWvkE0kGr3eSYYGqEDq8td/QjGtbmE96NdsR9XhWNEyHfDAvqYaeuXDORrXWeqa/Q lh3nAfpjvFM0cCKmpEL8YaL9Q1gp1tLpdzC/KyuCyU/9O52bqtaN5Cf0LIntWJpmprmS Uh6009dkiq30Ljp5G96CPyd641DaWud9z6UpaRekmHkpV8gnTh8Qjn8SwxjfkwZiq3J5 BelA== X-Gm-Message-State: AOJu0YwQVr6YacF5Sl0cpM8vw3qS90pwqMG/6AI0mIHA5D1SC9I8KJ9k gpt2gy2exDzEAjsmtXrkXWTudJYryIn2MtDIqt4= X-Google-Smtp-Source: AGHT+IE2Mfycc+TDwekr/vkDS4i0bBO9cIXQvo4ahRRMeHV+rD2ZbJWX1YgRhp6IQfKgwJfTxeJLLXpi4bukspfNX5Y= X-Received: by 2002:a4a:df11:0:b0:582:28e:93a8 with SMTP id i17-20020a4adf11000000b00582028e93a8mr18752083oou.3.1698328263931; Thu, 26 Oct 2023 06:51:03 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: hector vass Date: Thu, 26 Oct 2023 14:50:53 +0100 Message-ID: Subject: Re: Concurrently run scipts To: Shaozhong SHI Cc: Bruce Momjian , pgsql-sql Content-Type: multipart/alternative; boundary="000000000000e23d1806089edc9e" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000e23d1806089edc9e Content-Type: text/plain; charset="UTF-8" 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 On Thu, 26 Oct 2023, 10:49 Shaozhong SHI, wrote: > 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 > > On Thu, 26 Oct 2023 at 10:21, hector vass wrote: > >> max_connections >> >> ..which is set in postgresql.conf >> select * from pg_settings() where setting~'conn' >> >> >> >> >> On Thu, 26 Oct 2023, 09:01 Shaozhong SHI, wrote: >> >>> How many scripts can be run concurrently but independently? >>> >>> Regards, >>> >>> David >>> >>> On Wed, 25 Oct 2023 at 21:43, hector vass wrote: >>> >>>> Concurrently but independently >>>> psql -f script1 & psql -f script2 && fg >>>> Similar in windows can be achieved using start iirc >>>> >>>> On Wed, 25 Oct 2023, 21:15 Bruce Momjian, wrote: >>>> >>>>> On Wed, Oct 25, 2023 at 08:57:03PM +0100, Shaozhong SHI wrote: >>>>> > In psql we run scripts sequentially like the following: >>>>> > >>>>> > \ir script1 >>>>> > \ir script2 >>>>> > >>>>> > >>>>> > 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 https://momjian.us >>>>> EDB https://enterprisedb.com >>>>> >>>>> Only you can decide what is important to you. >>>>> >>>>> >>>>> --000000000000e23d1806089edc9e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Sorry no idea, pgadmin is a web app front end to postgres= ql so there may be a more appropriate mailing list to ask on than pgsql-sql=

= On Thu, 26 Oct 2023, 10:49 Shaozhong SHI, <shishaozhong@gmail.com> wrote:
Thanks.=C2=A0 I am aware of that concurren= t running of scripts can be done in Linux.

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

Regards,=C2=A0 David

On Thu, 26 O= ct 2023 at 10:21, hector vass <hector.vass@gmail.com> wrote:
max_connections

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




On Thu, 26 Oct 2023, 09:01 Shaozhong SHI, <shishaozh= ong@gmail.com> wrote:
How many scripts can be run concurrently= but independently?

Regards,

<= div>David

On Wed, 25 Oct 2023 at 21:43, hector vass <hector= .vass@gmail.com> wrote:
Concurrently but independently=C2=A0<= /div>
psql -f script1 & psql -f script2 && fg<= /div>
Similar in windows can be achieved using start iirc<= br>
On Wed, 25 Oct 2023, 21:15 Bruce Momjian, <bruce@momj= ian.us> wrote:
On Wed, Oct 25, 2023 at 08:57:03PM +0100, Shaozhong SHI wrote:
> In psql=C2=A0 we run scripts sequentially like the following:
>
> \ir script1
> \ir script2
>
>
> Is there something similar for concurrent running script?

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

=C2=A0 =C2=A0 =C2=A0 =C2=A0 https://momjian.us/main/writings/pgsql/locking.pdf

--
=C2=A0 Bruce Momjian=C2=A0 <bruce@momjian.us>= =C2=A0 =C2=A0 =C2=A0 =C2=A0 https://momjian.us
=C2=A0 EDB=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
https://enterprisedb.com

=C2=A0 Only you can decide what is important to you.


--000000000000e23d1806089edc9e--