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 1tjPJi-009Zlw-Ec for pgsql-general@arkaria.postgresql.org; Sat, 15 Feb 2025 21:03:14 +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 1tjPJg-0049IN-Qx for pgsql-general@arkaria.postgresql.org; Sat, 15 Feb 2025 21:03:12 +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 1tjPJg-0049IE-D7 for pgsql-general@lists.postgresql.org; Sat, 15 Feb 2025 21:03:12 +0000 Received: from mail-oa1-x2a.google.com ([2001:4860:4864:20::2a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tjPJe-0012hY-0E for pgsql-general@lists.postgresql.org; Sat, 15 Feb 2025 21:03:12 +0000 Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-2b5acf00c5bso1446428fac.0 for ; Sat, 15 Feb 2025 13:03:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739653387; x=1740258187; darn=lists.postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=CB4gqD6TKbVvYIJ/2b9yJW/XmvffhSPZwbGVyW/avsI=; b=R4uZcZWTLeeX2hSH89ZNXEzXe5i6z/RS0sH1RGz98aIfaXvUZgpoHuLY6w6OoBFcre Iu8jYu1qu2fjKTTJ31pGaYg58v6eL+croDlONTAxgLjNo7RJzFSTs/y+H2O/FRm7ck8h eCc2Zh6Sh8b/AfoZLXExezPRSuRZKBJb2eIzSov7hbYFM4BuBN0q5Iugt/7kvp/7jQhT hUNItbXU7U6rtSRIifIvBxf4o6LNR6QSQECIEpDRDK1bzjIrZJXnnQQFTGrd7rDyV30R S68tMvW5yntEUZDMyQy2lYu9iAqgVEYibpmzcgfSqLD5RlUSDvTt1T/vE+cxM8mRxFN2 2wIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739653387; x=1740258187; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CB4gqD6TKbVvYIJ/2b9yJW/XmvffhSPZwbGVyW/avsI=; b=JX4Y9pI+wCISpshsRB8PCS6/466M7uq8E2UmtDuVOYlWU5mF9B9naOEfvprNqvVXHC BmhDjjwCFCRJIjvVTg6Oav6mURdxrKqkqYApkRzpFCU8/wXNvW7ctfELCqh9YXQoZA0U g5pnZaiYO8h1J7LE565J/Skjs3IpJKQc6WXo+TBxS0NdfXTAltqGStJ2l1/W+1vElHVN fN1sz09D8l8uHV8Pwnxy+dgnfhkb/p6iIFwsSWrTr3R5luBqE6Iy7zUU68MB2yVv0BmR AmOH1kdbi1mD/nxzP/i4DS+EbskzS8kD+PDbJBrwBpw2DAw4BzpylyPovDtrLkRweqf1 8BaQ== X-Gm-Message-State: AOJu0YwXymUvZqROsTvz4w7UVBYiIYV+wdZDvO/BJUGclvNSeBT2LrF9 3ERltcQ+wyjQbXoHCAnBWdNQNmCuE0WIlEOu81Y9PJVAdHBQ6lGzokppdemxIeO9Ml9zu+yp0de I0VdwoTiFyLz46xk2tPfVodlbCAnqSQ== X-Gm-Gg: ASbGncuJOQm3LaOfOoRGgfcZ1VNmzXvjawzmNqoaIi6jUTy7VPRbRuw/EL9P4J0axLC 4hYKE8fDjXN88qaFW0BK4UR+s7vE3BFHTDL4VkllQfG57wzM8KxXnPiHn/vW6GtvIXdqUMcJ2fg == X-Google-Smtp-Source: AGHT+IFKjEsRUsSSeyGLFE2KOrassyV/YQSyVC1nH3eOwGrAdUZGJQp4FQ8W2yP5bZ8Sl8FVeOnPCT3iX+co1H8DeDM= X-Received: by 2002:a05:6870:828e:b0:2bc:716c:4622 with SMTP id 586e51a60fabf-2bc99e2978emr2135504fac.38.1739653387608; Sat, 15 Feb 2025 13:03:07 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Ron Johnson Date: Sat, 15 Feb 2025 16:02:56 -0500 X-Gm-Features: AWEUYZkU2GvdN3E_9iUI-qHITSoIbnc_gHeoVahpoRl9T2AcAf_J3JxYdzXnt4k Message-ID: Subject: Re: Bash profile To: "pgsql-generallists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000336da2062e349e54" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000336da2062e349e54 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable So? Honestly, your question has zero to do with Postgresql. Its basic Linux configuration. Before the migration, PGDATA and PATH should point to the v12 "stuff", and after the migration they should point to the v15 "stuff". It's that simple= . On Sat, Feb 15, 2025 at 2:17=E2=80=AFPM Yongye Serkfem = wrote: > I am upgrading from version 12.7 to 15.7 > > On Sat, Feb 15, 2025, 2:15 PM Ron Johnson wrote= : > >> On Sat, Feb 15, 2025 at 2:01=E2=80=AFPM Yongye Serkfem >> wrote: >> >>> Hi Everyone! >>> I would appreciate any assistance with configuring the bash profile to >>> run two different postgresql versions. Specifically V12.7 and 15.7 >>> >> >> Create a bash function that exports PGDATA to the relevant directory, >> based on the parameter you pass. >> Add as much error checking (to ensure that the parameter you passed >> actually points to a real data dir and that the postmaster is running. = How >> you do that depends on whether it's Debian-based, RH-based or something >> else. >> >> We, for example, have standardized on data directories in the format: >> /Database//data >> >> Thus, something as simple as this would work for us: >> pgswitch() { export PGDATA=3D/Database/${1}/data ; } >> >> -- >> Death to , and butter sauce. >> Don't boil me, I'm still alive. >> lobster! >> > --=20 Death to , and butter sauce. Don't boil me, I'm still alive. lobster! --000000000000336da2062e349e54 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
So?

Honestly, your question = has zero to do with Postgresql.=C2=A0 Its basic Linux configuration.
<= div>
Before the migration, PGDATA and PATH should point to th= e v12 "stuff", and after the migration they should point to the v= 15 "stuff".=C2=A0 It's that simple.

On S= at, Feb 15, 2025 at 2:17=E2=80=AFPM Yongye Serkfem <yserkfem@gmail.com> wrote:

I am upgrading from vers= ion 12.7 to 15.7


On Sat= , Feb 15, 2025, 2:15 PM Ron Johnson <ronljohnsonjr@gmail.com> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">
On Sat, Feb 15, 2025 at 2:01=E2=80=AFPM Yongye Serkfem <yserkfe= m@gmail.com> wrote:
Hi Everyone!
I would appreciate any assistance with configuring the bash profile = to run two different postgresql versions. Specifically V12.7 and 15.7
=

Create a bash function that exports = PGDATA to the relevant directory, based on the parameter you pass.
Add as much error checking (to ensure that the parameter you passed actua= lly points to a real data dir and that the postmaster is running.=C2=A0 How= you do that depends on whether it's Debian-based, RH-based or somethin= g else.

We, for=C2=A0example, have standardized on= data directories in the format:
/Database/<MajorVer>/data<= /div>

Thus, something as simple as this would work for u= s:
pgswitch() { export PGDATA=3D/Database/${1}/data ; }

--
Death to <Redacte= d>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!


--
Death to <Redacted>, and butter sauce.Don't boil me, I'm still alive.
<Redacted> lobs= ter!
--000000000000336da2062e349e54--