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 1qvwzk-008lG4-7L for pgsql-sql@arkaria.postgresql.org; Thu, 26 Oct 2023 09:49:40 +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 1qvwzi-00FKdD-Qb for pgsql-sql@arkaria.postgresql.org; Thu, 26 Oct 2023 09:49:38 +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 1qvwzi-00FKd5-AT for pgsql-sql@lists.postgresql.org; Thu, 26 Oct 2023 09:49:38 +0000 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qvwzf-002O0J-C8 for pgsql-sql@lists.postgresql.org; Thu, 26 Oct 2023 09:49:37 +0000 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-9adb9fa7200so142427666b.0 for ; Thu, 26 Oct 2023 02:49:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698313773; x=1698918573; 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=xgC6RmV/KtWjBh97Ub3MCQWFIYwzTBx4A4qsAmnpU78=; b=U+mRgp+I5uEmISsnowguJ3bOaOeobUD/Je6SsNOMyCslMsRjnaJOBMzIrjUC0T9P5i 08U2KIr8iRpeYVdwZFDn02B5D/NSuORW+9BhFVb+7Rd1Z1MnA+HtGSbTmfPQTkGmxDJ3 Ol5/ah/jQUECKQvN904G+C2u6GAhxsiyyNtiKvtygaRUXacThs6MZlBca9barQPoErXI T2olp3XqctV+CTFRkaNUI75afRLVXEv0niYHoZxp+6ffUg4Zmy5I8K+DzVt+4QY4DDhe DDiYe2FgZNrI2jiZGXham3wZRoerRfXV6Y80fTEovFLYj1CZ8BdJaAwPi6JH3wL0WD3w aeNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698313773; x=1698918573; 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=xgC6RmV/KtWjBh97Ub3MCQWFIYwzTBx4A4qsAmnpU78=; b=Iz7USGYeGryAcuHhdM13ZE0Y530PnYPVI+DSQwGj184JkvKwcVHLnt6Xigx9msEDvl xXzSEYdmoBE2bVkI9eEtHYgmENo9bTCJoPmrMOG9DPD4Qmq0IGSEOQL/w8A32UVtY03I BLD1tPTiBpSW+7MeL5AYuNCGVTVRMxDley8SFOS2HyRMjZDtvuO485SScX1Jyz9rN/HW pkMMrX61qG6xOK+EktNgULfkOXD1xqti7e0foprQkYOXudx3eJz1mFsEKimkM6Z7iNn6 vdVSMnbaeKrZQddJhHoUJrd32y1PrQPGKKUQDk8w7F2R3+7+JGDNZ2meLHImrNbxqSEZ RTag== X-Gm-Message-State: AOJu0Yy7o/b4Y1NEzaRSmTDJ67+YkdjgWoBd5Aw4Q5sUI9Jbr+iQxZyz lHVXxivw6JMsW88JFABGRx1jk9K0dur9EDhFsSc= X-Google-Smtp-Source: AGHT+IH+2cDb86eW9haF4b3NuzxONXPKghRR6RuTgkIognUWuv0j1B+NmLu0GFxBKCkH0YsiGRnLLRX8HEGOSpMbvKc= X-Received: by 2002:a17:907:96a3:b0:9a5:dc2b:6a5 with SMTP id hd35-20020a17090796a300b009a5dc2b06a5mr1808774ejc.35.1698313772614; Thu, 26 Oct 2023 02:49:32 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Shaozhong SHI Date: Thu, 26 Oct 2023 10:49:21 +0100 Message-ID: Subject: Re: Concurrently run scipts To: hector vass Cc: Bruce Momjian , pgsql-sql Content-Type: multipart/alternative; boundary="00000000000022463b06089b7d56" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000022463b06089b7d56 Content-Type: text/plain; charset="UTF-8" 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. >>>> >>>> >>>> --00000000000022463b06089b7d56 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks.=C2=A0 I am aware of that concurrent running of scr= ipts can be done in Linux.

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

Regards,=C2=A0 David

On Thu, 26 Oct 2023 at 10:21= , hector vass <hector.vass@gmai= l.com> wrote:
max_connections

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




<= div dir=3D"ltr" class=3D"gmail_attr">On Thu, 26 Oct 2023, 09:01 Shaozhong S= HI, <shishao= zhong@gmail.com> wrote:
How many scripts can be run concurrent= ly but independently?

Regards,

David

On Wed, 25 Oct 2023 at 21:43, hector vass <hector.vass@gma= il.com> wrote:
Concurrently but independently=C2=A0
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, <bruce@momjian.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.


--00000000000022463b06089b7d56--