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 1ucMWC-00C4R6-Gn for pgsql-hackers@arkaria.postgresql.org; Thu, 17 Jul 2025 11:11:16 +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 1ucMWA-001FZy-9q for pgsql-hackers@arkaria.postgresql.org; Thu, 17 Jul 2025 11:11:14 +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 1ucMW9-001FZp-KM for pgsql-hackers@lists.postgresql.org; Thu, 17 Jul 2025 11:11:14 +0000 Received: from fout-a6-smtp.messagingengine.com ([103.168.172.149]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1ucMW5-008Equ-1j for pgsql-hackers@lists.postgresql.org; Thu, 17 Jul 2025 11:11:13 +0000 Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfout.phl.internal (Postfix) with ESMTP id 669A4EC029C; Thu, 17 Jul 2025 07:11:07 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-08.internal (MEProxy); Thu, 17 Jul 2025 07:11:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1752750667; x=1752837067; bh=Y gzhNrXjia4yRwOjJaB3GuRaunIanytVKeP1wL0aOnM=; b=SVPo0m8sSJ04XCiJj LKHoD1WDJcTpPLVvyRkdFTkklm1hucOYo7Qx40Ey5EOJu3cy/hk4E2MTKtOPf8VR AtWKb52hrAg79Zrjo1GrJPmGRvYD4ehogld9aN2HDOFPGJPKhfXXTFdBtsH+swzk q9VH+lci+0vq5bqrvjQRDdMjChvqgZ7LMEJwM/lCItqD4KLBTgYiDHANEdFxn2w2 C3kZ8PZCaGUs1/hfBaaXrub045rwXKwj7pBMtwwJpZ+XvvfafZjVC/KeIcgYZK3k dB3GzTLH4lXxCxVQd3pbov1+PWkAHtTVupRKaDLdXSIVpVPBQ3dzJhSzpdKPG9Uc e2MXA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdeitdegfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpeffhffvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpemllhhvrghrohcu jfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqeenuc ggtffrrghtthgvrhhnpedvheeuffehgfeukeeufeehhefghfeugfefudekjeevudffgeff keegffffveegheenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghr rhgvsegrlhhvhhdrnhhoqdhiphdrohhrghdpnhgspghrtghpthhtohepiedpmhhouggvpe hsmhhtphhouhhtpdhrtghpthhtoheprghnughrvgifseguuhhnshhlrghnvgdrnhgvthdp rhgtphhtthhopehjihgrnhdruhhnihhvvghrshgrlhhithihsehgmhgrihhlrdgtohhmpd hrtghpthhtohepmhgrhhhiiehruhhnsehgmhgrihhlrdgtohhmpdhrtghpthhtohepshhr ihhnrghthhdvudeffeesghhmrghilhdrtghomhdprhgtphhtthhopehnohgrhheslhgvrg gusghorghtrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrsheslhhishht shdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 17 Jul 2025 07:11:06 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1752750665; bh=jvMuVBq2LhrQoVkpjqqAn90sYhi9oBn7MKUS0zhtb04=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=Ci8FSmVku/p1WAu/RTDd0DnQ/Og609FVnDqqnLuu6th+FHb+O/YtpcGfp0KfgMF5z J4tGXxmbXCTPctY8Q1qrzxqgBPt9iL2YN6yHz3lmZEg3Ie19LMigwA4Q2d586a2mNS VW3ciLBP6ETMeJr40rMokfeIPpD0h0+VeGLjmOukG+m2UE8SGCf+XRk0niya4FovyA t12UYTi/t11MYrlOkzq0grEQoKmuUoXHWrO3H22XetZAlF3xbLGd7G/kGFITGRW0Qj JgRLJcT1M6qxYAtru5ZIAm9rEbyQE8pNGuTHoWUAB++OzVUdOZFWH/TrtpcYpvBgve CZpnlRg/0CjWQ== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id 50AF090; Thu, 17 Jul 2025 13:11:05 +0200 (CEST) Date: Thu, 17 Jul 2025 13:11:05 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Mahendra Singh Thalor Cc: Noah Misch , Andrew Dunstan , jian he , Srinath Reddy , pgsql-hackers@lists.postgresql.org Subject: Re: Non-text mode for pg_dumpall Message-ID: <202507171111.uo3vvgt6jp6j@alvherre.pgsql> 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 2025-Jul-17, Mahendra Singh Thalor wrote: > To pg_restore, we are giving a dump of pg_dumpall which has a > global.dat file and we have drop commands in the global.dat file so > when we are using 'globals-only', we are dropping databases as we have > DROP commands. > As of now, we don't have any filter for global.dat file in restore. If > a user wants to restore only globals(without droping db), then they > should use 'globals-only' in pg_dumpall. > Or if we don't want to DROP databases by global.dat file, then we > should add a filter in pg_restore (hard to implement as we have SQL > commands in global.dat file). I think dropping database is dangerous and makes no practical sense; doing it renders pg_dumpall --clean completely unusable. You're arguing from the point of view of ease of implementation, but that doesn't help users. > I think, for this case, we can do some > more doc changes. > Example: pg_restore --globals-only : this will restore the global.dat > file(including all drop commands). It might drop databases if any drop > commands. I don't think doc changes are useful. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "I love the Postgres community. It's all about doing things _properly_. :-)" (David Garamond)