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 1qvkIA-00742X-J1 for pgsql-sql@arkaria.postgresql.org; Wed, 25 Oct 2023 20:15:50 +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 1qvkI9-0084Ff-3s for pgsql-sql@arkaria.postgresql.org; Wed, 25 Oct 2023 20:15:49 +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 1qvkI8-0084FX-R4 for pgsql-sql@lists.postgresql.org; Wed, 25 Oct 2023 20:15:48 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qvkI6-002IM4-5S for pgsql-sql@lists.postgresql.org; Wed, 25 Oct 2023 20:15:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2023062407; h=In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-ID:Content-Description; bh=aPTFF9YwolXIlFxtlO394yZnBN9AqfJfciWGjmUu0jU=; b=2bD6mrPDuHpxXWGQ61udmUkcTf MvYqPlxffAa6qMnf5HK2Felycu9vW3DdT6jlwqEtIGZVuVvOLl21cUvx8lovLXzE5IWIXNNidqGbl sogoHH5WuExJiic9yhZIaixvrv52ZmnY5PxvDJDDWl+wbfkmHMr/dHJKPWGlc4q6gdvWepmP/RGLY +hEUl3qwIBXU6JPDr8jQWrcrwdh2Jj0Cm1L5L2batbCX8+V4IshjvwXQ1IWLxmKL7eGcqXH2KCLDt RAFNYAA58OIbGvTk0VZnm7jGVka8RGQXjHqhUsSFooMvZlvZAgI6G/FeUVcHzvzRcptwg9OTNPSGW 2jAgSDGw==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1qvkI5-00EBcb-0M; Wed, 25 Oct 2023 16:15:45 -0400 Date: Wed, 25 Oct 2023 16:15:45 -0400 From: Bruce Momjian To: Shaozhong SHI Cc: pgsql-sql Subject: Re: Concurrently run scipts Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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.