Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gALhg-00010B-CV for pgsql-general@arkaria.postgresql.org; Wed, 10 Oct 2018 21:07:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gALhe-0006DO-Rz for pgsql-general@arkaria.postgresql.org; Wed, 10 Oct 2018 21:07:34 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gALhe-0006DH-Gt for pgsql-general@lists.postgresql.org; Wed, 10 Oct 2018 21:07:34 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gALhb-0008JR-QR for pgsql-general@postgresql.org; Wed, 10 Oct 2018 21:07:33 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 0F9A421B84; Wed, 10 Oct 2018 17:07:31 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 10 Oct 2018 17:07:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=MzK+7CzGxMbj8UBEP90Ecl4SArl KU0DBt+UN2IGio8M=; b=qqz8GEOtEuPow4V99kS1TaEWy3bFXF1F1fNXGSBMu/Q u6y/AgJner5fm6jvNRJdvQ0Gd3w1E9p8Ms45cpMs+19F4BLgYZf1sq8hZgCCH2Ct 5bOOGz7+cDB52RX2Yksn7RPIcTMlO4NCMTxE4GE8dMurlOg93DqSN4wd4WpjjOyT cKtu6qsVJPMCuC9OMo4CZyXKPXcCZhT8xe6KzcqusQllVqlh4Hi8bn0es0pxhWnp y5nf0qoQJl6Q7e3kutukVRnUdr9zKKak72xuAalyyehfzGSLpUA9VdYkKFc2iNsM hN5vkSBIeJJ863tTfrxAQfGEtJDROYp14JE2x2k8fIQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=MzK+7C zGxMbj8UBEP90Ecl4SArlKU0DBt+UN2IGio8M=; b=syH3QJJYfjPh6SNK38+qyC U+T8wyFhwENmi5JX8up4u0KihDNc1kiRbiPNcMcC6j6y3ZSX8lc8ic9qlo1w/LvU XissTH1eAlIb36CtWiwRMnTrUda4569b/4hOtKJbcvFqN8W/iUAW0cizN9w2HukG uIRx0JYcVaPyN2vUqKBJYV8SwUAXrNW1xxyXF5lg/dFIKbDS7BF9tWYvF7PILl6T QSS1yZ0odM0e7D1c7KuacdIzTtPnTgqknaPm1+PLhjQtDcEYUiXTLSz6OpPjlJes Aojuhb2SYiCQYZ4gRFIF7OesNJJSyaAsLeX85NPbop2kucDU2iZn1IKPWZXGDXAw == X-ME-Sender: X-ME-Proxy: Received: from intern.anarazel.de (104-2-144-147.lightspeed.sntcca.sbcglobal.net [104.2.144.147]) by mail.messagingengine.com (Postfix) with ESMTPA id 47F4B102E2; Wed, 10 Oct 2018 17:07:30 -0400 (EDT) Date: Wed, 10 Oct 2018 14:07:29 -0700 From: Andres Freund To: Ravi Krishna Cc: Christopher Browne , laurenz.albe@cybertec.at, Rob Sargent , PostgreSQL Mailing Lists Subject: Re: COPY threads Message-ID: <20181010210729.ewntjynvutnlgdn2@alap3.anarazel.de> References: <065f5e56-5b25-0ce2-e20b-4305f71b2301@gmail.com> <20181010192440.cdxues44gcvx2sbi@alap3.anarazel.de> <7FCA0163-130B-474D-BE00-3BB5D2E0EC89@aol.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7FCA0163-130B-474D-BE00-3BB5D2E0EC89@aol.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2018-10-10 17:02:59 -0400, Ravi Krishna wrote: > I am talking about pg_restore which is COPY FROM, which takes exclusive lock on the table > while the data is loaded into the table. pg_restore doesn't take locks on the table for the COPY, it does so because creating the table takes an exclusive lock. Greetings, Andres Freund