public inbox for [email protected]  
help / color / mirror / Atom feed
From: Ron Johnson <[email protected]>
To: Pgsql-admin <[email protected]>
Subject: Re: Postgresql Software Location
Date: Thu, 29 Aug 2024 14:58:53 -0400
Message-ID: <CANzqJaAjUpPGKyR9G4gtA6FYM=-3Nuc8JZXs4FjJs4DZKMA47w@mail.gmail.com> (raw)
In-Reply-To: <CABHPps5BG3NFh4xXGjuTxs4yniXV+YNrDj8s86kOAEg7-7QG5g@mail.gmail.com>
References: <CABHPps5BG3NFh4xXGjuTxs4yniXV+YNrDj8s86kOAEg7-7QG5g@mail.gmail.com>

On Thu, Aug 29, 2024 at 2:13 PM Henry Ashu <[email protected]> wrote:

> We have installed our postgresql software in this location:
>
> [postgres@testdbapql01 data]$ pwd
> /var/lib/pgsql/16/data
>

That directory is where I put the $PGDATA for a long time.  Now I put it in
/Database/16/data.  Why?  Two reasons:
1. /var/lib/pgsql is usually postgres' $HOME, and I don't want to clutter
that up.
2. /Database makes it obvious to all concerned what's in it.


> [postgres@testbapql01 data]$ df -h .
> Filesystem             Size  Used Avail Use% Mounted on
> /dev/mapper/rhel-root   28G  4.5G   23G  17% /
> [postgres@testdbapql01 data]$
>
> Does this look correct?
>

"Correct" is relative.  What other mount points are on that server (for
example, /var/log)?  Having said that... I think it's a horrible idea.


> We are thinking that it should not be installed on the root filesystem
>

I would *never* put a database directory on the root filesystem.  Some
other process outside of your control fills up root, and... poof, there
goes your database.  (Postgresql doesn't like full mount points.)

We go with three mount points:
- /Database/${MajorVersion}  (note the lack of "data"!)
- /Database/backups
- /var/log/postgresql (which $PGDATA/postgresql.conf log_directory points
to).

No separate mount point for pg_wal.  I think that's a relic of the bygone
era of 300GB spindles (much less 300MB spindles). YMMV..

-- 
Death to America, and butter sauce.
Iraq lobster!


view thread (5+ 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: Postgresql Software Location
  In-Reply-To: <CANzqJaAjUpPGKyR9G4gtA6FYM=-3Nuc8JZXs4FjJs4DZKMA47w@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