Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kiIEz-00059x-7L for pgsql-admin@arkaria.postgresql.org; Thu, 26 Nov 2020 14:27:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kiIEy-0006FR-71 for pgsql-admin@arkaria.postgresql.org; Thu, 26 Nov 2020 14:27:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kiIEx-0006FK-Um for pgsql-admin@lists.postgresql.org; Thu, 26 Nov 2020 14:27:19 +0000 Received: from jakobs.com ([85.214.83.89] helo=rs.plausibolo.de) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kiIEq-0005rB-V1 for pgsql-admin@lists.postgresql.org; Thu, 26 Nov 2020 14:27:19 +0000 Received: from localhost (localhost [127.0.0.1]) by rs.plausibolo.de (Postfix) with ESMTP id 9EE4838037E; Thu, 26 Nov 2020 15:27:11 +0100 (CET) Received: from rs.plausibolo.de ([127.0.0.1]) by localhost (h2367442.stratoserver.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TIJQ-OsTNLBX; Thu, 26 Nov 2020 15:27:11 +0100 (CET) Received: from [192.168.178.197] (ip-37-201-154-46.hsi13.unitymediagroup.de [37.201.154.46]) by rs.plausibolo.de (Postfix) with ESMTPSA id 34EA1380178; Thu, 26 Nov 2020 15:27:11 +0100 (CET) Subject: Re: Move base directory to different location To: Pepe TD Vo , "pgsql-admin@lists.postgresql.org" References: <31b748c7-d728-9d8d-fb49-b6b935b8295b@jakobs.com> <2046891776.1111378.1606399579861@mail.yahoo.com> From: Holger Jakobs Message-ID: Date: Thu, 26 Nov 2020 15:27:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <2046891776.1111378.1606399579861@mail.yahoo.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Po8LjF1pwYXS7qiZsTRmP1sw4adnG4BTM" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Po8LjF1pwYXS7qiZsTRmP1sw4adnG4BTM Content-Type: multipart/mixed; boundary="GNZhA44zzO8HwFeXm6vZTokyUPUS08XwS"; protected-headers="v1" From: Holger Jakobs To: Pepe TD Vo , "pgsql-admin@lists.postgresql.org" Message-ID: Subject: Re: Move base directory to different location References: <31b748c7-d728-9d8d-fb49-b6b935b8295b@jakobs.com> <2046891776.1111378.1606399579861@mail.yahoo.com> In-Reply-To: <2046891776.1111378.1606399579861@mail.yahoo.com> --GNZhA44zzO8HwFeXm6vZTokyUPUS08XwS Content-Type: multipart/alternative; boundary="------------A609EC5AAE8CFDC4F37D504C" Content-Language: de-DE This is a multi-part message in MIME format. --------------A609EC5AAE8CFDC4F37D504C Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Have a look here:=20 https://info.crunchydata.com/blog/how-to-perform-a-major-version-upgrade-= using-pg_upgrade-in-postgresql I couldn't write it any better. Am 26.11.20 um 15:06 schrieb Pepe TD Vo: > Morning Holdger, > > since you are mentioning "upgrade to a newer major version", would you = > please share step by step how to do it in replica?=C2=A0 I have tried t= o=20 > migrate=C2=A0 v.11 to 12 before and failed to upgrade. > > v/r, > > > ** > *Bach-Nga > > *No one in this world is pure and perfect. If you avoid people for=20 > their mistakes you will be alone. So judge less, love, and forgive=20 > more.EmojiEmojiEmoji > To call him a dog hardly seems to do him justice though in as much as=20 > he had four legs, a tail, and barked, I admit he was, to all outward=20 > appearances. But to those who knew him well, he was a perfect=20 > gentleman (Hermione Gingold) > > **Live simply **Love generously **Care deeply **Speak kindly. > *** Genuinely rich *** Faithful talent *** Sharing success > > > > > On Thursday, November 26, 2020, 09:00:48 AM EST, Holger Jakobs=20 > wrote: > > > It is no problem to move the base directory. > > 1. stop the database server > 2. move the base directory as a whole to some other location > mv /var/lib/pgsql/10/data/base /some/other/location > 3. create a symbolic link pointing to the new location > cd /var/lib/pgsql/10/data > ln -s /some/other/location/base . > 4. start the database server > > BTW, an upgrade to a newer major version would be a good idea. > > Regards, > > Holger > > Am 26.11.20 um 13:59 schrieb Yambu: > Hello > > May i know the procedure of moving the base directory from=20 > /var/lib/pgsql/10/data/base to another location? > > regards > --=20 > Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012 --=20 Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012 --------------A609EC5AAE8CFDC4F37D504C Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

Have a look here: Am 26.11.20 um 15:06 schrieb Pepe TD Vo:

Morning Holdger,

since you are mentioning= "upgrade to a newer major version", would you please share step by step how to do it in replica?=C2=A0 I have tried to migrate=C2=A0 v.11 to 12 before and failed to upgrade.

v/r,


Bach-Nga

No one in this world is pure and perfect.=C2=A0= If you avoid people for their mistakes you will be alone. So judge less, love, and forgive more.<= img title=3D"Emoji" alt=3D"Emoji" class=3D"ydp1ad97a09yahoo-emoji-wrapper" src=3D"https://s.yimg.com/nq/yemoji_assets/late= st/yemoji_assets/1f64f.png" style=3D"padding:0px 2px;vertical-align:middle;= " data-inlineimagemanipulating=3D"true" moz-do-not-send=3D"true" width=3D"16" height=3D= "16">3D"Emoji"3D"Emoji"
To call him a dog hardly seems to do him justice though in as much as he had four legs, a tail, and barked, I admit he was, to all outward appearances. But to those who knew him well, he was a perfect gentleman (Hermione Gingold)

= **Live simply **Love generously **Care deeply **Speak kindly.<= /span>
*** Genuinely rich *** Faithful talent *** Sharing success






It is no problem to move the base directory.

  1. stop the database server
  2. move the base directory as a whole to some other location
    mv /var/lib/pgsql/10/data/base /some/other/location
  3. create a symbolic link pointing to the new location
    cd /var/lib/pgsql/10/data
    ln -s /some/other/location/base .
  4. start the database server

BTW, an upgrade to a newer major version would be a good idea.

Regards,

Holger

Am 26.11.20 u= m 13:59 schrieb Yambu:
Hello

May i know the procedure of moving the base directory from /var/lib/pgsql/10/data/base to another location?

regards
--=20
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012
--=20
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012
--------------A609EC5AAE8CFDC4F37D504C-- --GNZhA44zzO8HwFeXm6vZTokyUPUS08XwS-- --Po8LjF1pwYXS7qiZsTRmP1sw4adnG4BTM Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wmMEABEIACMWIQScuJCxWJK1p5BOebGKV5yTsxlhugUCX7+7PgUDAAAAAAAKCRCKV5yTsxlhumdU AKDivXaBNGjOzZEENGsGTvtAO3q0rwCfZ+k5f0SuMVEgdhOmqDnDvPthk+Q= =/GO2 -----END PGP SIGNATURE----- --Po8LjF1pwYXS7qiZsTRmP1sw4adnG4BTM--