public inbox for [email protected]  
help / color / mirror / Atom feed
From: Ron Johnson <[email protected]>
To: pgsql-generallists.postgresql.org <[email protected]>
Subject: Re: Bash profile
Date: Sat, 15 Feb 2025 16:02:56 -0500
Message-ID: <CANzqJaA9oo=LzRPTK76E9fpCOssfx_0Lbwd7qNyWgUs_DVM4ZA@mail.gmail.com> (raw)
In-Reply-To: <CAAu_hGsPXp3Yn+WdZHLT+t3MXHgHSp+FSUqcu5G=O7oRrm9+GQ@mail.gmail.com>
References: <CAAu_hGujUz250rkREPWztG2R1EPSvcTdGfxLAwi5EquUEq64fA@mail.gmail.com>
	<CANzqJaACBCTmxejwZwEHPF-3Uee0eTA73f5hL5Z9PvWZR7we-A@mail.gmail.com>
	<CAAu_hGsPXp3Yn+WdZHLT+t3MXHgHSp+FSUqcu5G=O7oRrm9+GQ@mail.gmail.com>

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 PM Yongye Serkfem <[email protected]> wrote:

> I am upgrading from version 12.7 to 15.7
>
> On Sat, Feb 15, 2025, 2:15 PM Ron Johnson <[email protected]> wrote:
>
>> On Sat, Feb 15, 2025 at 2:01 PM Yongye Serkfem <[email protected]>
>> 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/<MajorVer>/data
>>
>> Thus, something as simple as this would work for us:
>> pgswitch() { export PGDATA=/Database/${1}/data ; }
>>
>> --
>> Death to <Redacted>, 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> lobster!


view thread (3+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Bash profile
  In-Reply-To: <CANzqJaA9oo=LzRPTK76E9fpCOssfx_0Lbwd7qNyWgUs_DVM4ZA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox