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 1rseCK-008LbP-Q7 for pgsql-general@arkaria.postgresql.org; Fri, 05 Apr 2024 07:41:17 +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 1rseCJ-006Snq-F5 for pgsql-general@arkaria.postgresql.org; Fri, 05 Apr 2024 07:41:15 +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 1rseCJ-006Sn8-20 for pgsql-general@lists.postgresql.org; Fri, 05 Apr 2024 07:41:15 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rseCE-000hza-Hg for pgsql-general@postgresql.org; Fri, 05 Apr 2024 07:41:13 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id 262102FFBE59 for ; Fri, 5 Apr 2024 09:41:07 +0200 (CEST) Received: from s979.loopia.se (unknown [172.22.191.5]) by s807.loopia.se (Postfix) with ESMTP id 1732D2E2816F; Fri, 5 Apr 2024 09:41:07 +0200 (CEST) Received: from s471.loopia.se (unknown [172.22.191.6]) by s979.loopia.se (Postfix) with ESMTP id 12C6D10BC4A5; Fri, 5 Apr 2024 09:41:07 +0200 (CEST) X-Virus-Scanned: amavisd-new at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1.21 X-Spam-Level: X-Spam-Status: No, score=-1.21 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=disabled Authentication-Results: s471.loopia.se (amavisd-new); dkim=pass (2048-bit key) header.d=yesql.se Received: from s934.loopia.se ([172.22.191.5]) by s471.loopia.se (s471.loopia.se [172.22.190.35]) (amavisd-new, port 10024) with LMTP id Rl_GnZZylF8m; Fri, 5 Apr 2024 09:41:06 +0200 (CEST) X-Loopia-Auth: user X-Loopia-User: daniel@yesql.se X-Loopia-Originating-IP: 89.255.232.193 Received: from smtpclient.apple (customer-89-255-232-193.stosn.net [89.255.232.193]) (Authenticated sender: daniel@yesql.se) by s934.loopia.se (Postfix) with ESMTPSA id 77ED07CEA7A; Fri, 5 Apr 2024 09:41:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yesql.se; s=loopiadkim1707475645; t=1712302866; bh=ax+OOtjGHyRqnNqGWpQO5FCe8gTUo+a8KJ5eVKYdIJ0=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=JuuBB+7+yLvGJJPdUogq+1qy4a4lvqAtX4OKjiu0cqG+7w5hwPXDj/NRIaOYZqwiQ 39ZiobLX5AjLK1i5lZjSbREG2a4LgTUD0Zuz0TCrakRdInj7fSVwCVvDESN9e+PHhD 4VaM7VkUYGwELqZj5zgAC1bRkCL9vlXJod1NCVucmMhCZ6MkjO5oBlIITE2CKb2GFT 90KqZ/u6noztu2D5NWfQ8Q+xcDBW1laf5UYH4s3sPxLHBbCupAkxD+xZP8e8AssvoN 6YZnEAgnPVl1MLcqXYse/jqRd+Amk/9yW7t121jY0hZUO4+Xx70GVunb4qG5fB6PnH W6hI3OD7pZpdw== Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.4\)) Subject: Re: About postgres pg_upgrade From: Daniel Gustafsson In-Reply-To: Date: Fri, 5 Apr 2024 09:41:05 +0200 Cc: Postgres General Content-Transfer-Encoding: quoted-printable Message-Id: <113487F2-2373-4CE8-A642-69D5FEC74C67@yesql.se> References: To: Rama Krishnan X-Mailer: Apple Mail (2.3696.120.41.1.4) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 5 Apr 2024, at 06:47, Rama Krishnan wrote: > Could you please explain me how does pg_upgrade works one of my = friends it works based on pg_restore I am bit confused The documentation does a fairly good job explaining how it works, and = there are multiple blogposts and presentations on the subject to be found. https://www.postgresql.org/docs/devel/pgupgrade.html To summarize in a few words, pg_upgrade does a dump/restore of the = schema from the old cluster into the new, but copies the table data. Your friend is = thus isn't wrong, it does use pg_restore but only for the schema, not the = data. -- Daniel Gustafsson