Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1he3RV-0001qu-3S for pgsql-general@arkaria.postgresql.org; Thu, 20 Jun 2019 20:13:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1he3RS-00059S-Jw for pgsql-general@arkaria.postgresql.org; Thu, 20 Jun 2019 20:13:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1he3RQ-00059K-NP for pgsql-general@lists.postgresql.org; Thu, 20 Jun 2019 20:13:54 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1he3RN-0000c8-Kh for pgsql-general@lists.postgresql.org; Thu, 20 Jun 2019 20:13:51 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 6DE262203E; Thu, 20 Jun 2019 16:13:48 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 20 Jun 2019 16:13:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=g ZgUTQgD/VsGKMssm05og8rUCUnvg1uA8wDZ1Y7+Xew=; b=e81HFuPLE7CArlizk 8xHQ2yDi48r2L9rSMB60Jyzgw88Ge1y5uP9oPSLisLOOVl7aWgyNEfuFScgB59cw NOTDYEVwYpm+Nakk96j/vaSzaZNhI/z+pTltJvf2WB8EEZ2aDa/zeoZAa4MvEBss moS26kcxVQpn/xnUkjXAPZGdIo2V4mSiuHTCWlzEQDpToLC1tLFnTRphhZRiD1cx oBK3FyyhpZS/kTUwpyVSjADAEHjj9noMc0qSbrG7XdaeCxsTHCPrkC8j5P/tpMVq XGs5eymTF7XFr82nUBs0SaQpbuHDcKs3UaI5uEuAFLol+CyWMAW3T2cfOLmRJEHi RIgqA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding: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=fm3; bh=gZgUTQgD/VsGKMssm05og8rUCUnvg1uA8wDZ1Y7+X ew=; b=DX5fhEXNTNYdkiOTkAXuC1x4AFbOUpbPVnrhoaJOV6CbjiGzmW4V2Pvjo TeRnsnUmwJan+pWwrb2t28KpEWdnn4EJCNCvyP2OGWDdwOTiBwoZSkvGoB1g+NeO qfrFCRczQpJfjllPx2t/8qcBIsk44SD5Itf/KEcZIxiG2Q/DxGt4zUs9+eeurJ29 WPG3AE18FORWaNqmfVxEeBgHQ7PAtCZOjKwjwtqosrP6buhUCrE/rXyftPP+FVGQ WROxxs4wJxGkbBjbOWChlYN74wEw6a5b9s7KLLkaDEbnEZc+wNSjQphyqOfGucQq 6RJ4xncSsZ9ihh/NWoSx2U7RGDOPQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrtdeggdduhedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgnecukfhppeejuddrvddu vddrudehtddrvddtvdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklh grvhgvrhesrghklhgrvhgvrhdrtghomhenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from [192.168.1.4] (unknown [71.212.150.202]) by mail.messagingengine.com (Postfix) with ESMTPA id 87DD980059; Thu, 20 Jun 2019 16:13:47 -0400 (EDT) Subject: Re: Why does the pg_dumpall command have a database option? To: Espresso Beanies , pgsql-general@lists.postgresql.org References: From: Adrian Klaver Message-ID: Date: Thu, 20 Jun 2019 13:13:46 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 6/20/19 1:03 PM, Espresso Beanies wrote: > I'm trying to see if someone could answer to me why the pg_dumpall > command has a database option when it's designed to dump all the > databases in a PostgreSQL server instance. I'm only asking because when > I create a .pgpass file and try to use the pg_dumpall command, I'm still > required to specify a specific database even though the command itself > should be targeting all databases. Can anyone explain this to me a bit > better? > > Thanks, Because pg_dumpall is a client and needs to connect to a database to kick start the process/fetch global information: https://www.postgresql.org/docs/11/app-pg-dumpall.html -l dbname --database=dbname Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used. -- Adrian Klaver adrian.klaver@aklaver.com