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 1tjNcy-009GFs-IY for pgsql-general@arkaria.postgresql.org; Sat, 15 Feb 2025 19:15:00 +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 1tjNcx-003Ixw-AH for pgsql-general@arkaria.postgresql.org; Sat, 15 Feb 2025 19:14:59 +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 1tjNcw-003Ixm-Vf for pgsql-general@lists.postgresql.org; Sat, 15 Feb 2025 19:14:58 +0000 Received: from mail-oa1-x2f.google.com ([2001:4860:4864:20::2f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tjNcv-0011wd-02 for pgsql-general@lists.postgresql.org; Sat, 15 Feb 2025 19:14:58 +0000 Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-2aa17010cbcso2421923fac.3 for ; Sat, 15 Feb 2025 11:14:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739646895; x=1740251695; 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=27f57F8nfYEyIucxtJ4QK0V0FHWbblUCqMYHBJGxYy8=; b=dvjT6fr26Yn96UAPKxt/eILK9WpYFlBmOUL9q+1gWEQ9eUiyiARxrJatVMa4sy9gwg /ZSaowdxItrxIbQIjhksrxI+aNI2/Hf7p613OJt4gJydFP63jrDzP24KdGGA1qHgQi5E uAkyHbsoALBq4pAlvcnX4O16GxyliauHwphS15+BvSa4jkllMxTkyvDe4+SDWevUTbAQ tayXW2nUWW7/q4ljVPZHC+VuO+KlsEXCVQGR5e4jg2hy+kTAny5WmwYxhP51KLq4WoZ2 geE16pJ61xMLaGdRKN+B9u2jscS5DlokrujAK7tfPI3fHMlmB8uPyMf6c8awK/UEWd4H N4+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739646895; x=1740251695; 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=27f57F8nfYEyIucxtJ4QK0V0FHWbblUCqMYHBJGxYy8=; b=dodUj4qv5WmDngGZCgcWjyoDx4mGvomrBvXVoM6C5+m0OfGyqE5u6Ncug3kIJPiOUA LbH7FjpRRfSFJaRpnwKxLiDh4Lch3GylIvUjf+9DwRlBo1MYdYagO/ydVhAMoY14UZyU OIPzQ+0sF5wf1bN3uy9vG2fAnMw1aLnvCZe0lLKIDwltBT9DU4slLkiWcO3NGFJywhU1 duomhGjygQ1h8cH6v1M/yj1w1YhLSaq2Ce77gnhKtNYVbgryKuvSEGGwPNNMSj3yLUyN Y8MZignSaRitbIDHTO7vgA8NvcXAs/sE3jjyz5Xc9ZHCwHB2SZgVVw2VuKh3lCPt0DMF Ssrw== X-Gm-Message-State: AOJu0Yxu6kNRMFsYDDie0gr8XZJpUYGs7rJ2HniIYqIhY+af9uwo99Uq vrKCR8nryLpIvaE1qbRxl/xbaolWr0HKchp9V133pysE2qW2p3c8kyi/jXXheeHg8zenEkN8J99 BPS7//H3nBmKDKl4Vuv1dTu9rt4tflQ== X-Gm-Gg: ASbGncsDyokKVDb4aMfY5Qg3aljuJz5FguRZiEMAh+zCEZDouuFgCKjaquIcajdg2R5 41XGn/cQy/pUiIrT3SbcE2md889N4XSBC6E62KPNGpqWTJ04HgElSfGUIehuDhZnIkEVCIgJmfA == X-Google-Smtp-Source: AGHT+IGOivngOKtoHA1d/qEHY9iQG89pQpQQ7/dZMbPLaTGbHzpbOOIr91Y/7X1E0uDdXUK2MUCIFDRP3bJe7Wvl558= X-Received: by 2002:a05:6870:d110:b0:2bc:98d0:dc64 with SMTP id 586e51a60fabf-2bc995a5583mr2132713fac.0.1739646894868; Sat, 15 Feb 2025 11:14:54 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Ron Johnson Date: Sat, 15 Feb 2025 14:14:43 -0500 X-Gm-Features: AWEUYZno5CBztS7GA2b8wjyymNShxcsCFEDG28Z-6_a2GNlbxcpCwDIOYAKyeos Message-ID: Subject: Re: Bash profile To: "pgsql-generallists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000340f21062e331bd0" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000340f21062e331bd0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 ru= n > 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 ; } --=20 Death to , and butter sauce. Don't boil me, I'm still alive. lobster! --000000000000340f21062e331bd0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Feb 15, 2025 at 2:01=E2=80=AFPM Y= ongye Serkfem <yserkfem@gmail.com<= /a>> wrote:




--
Death to &= lt;Redacted>, and butter sauce.
Don't boil me, I'm still ali= ve.
<Redacted> lobster!
--000000000000340f21062e331bd0--