Re: Postgresql Software Location

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 29, 2024 at 2:13 PM Henry Ashu <henry.ashu@xxxxxxx> 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!

[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux