public inbox for [email protected]
help / color / mirror / Atom feedFrom: Senor Cervesa <[email protected]>
To: [email protected] <[email protected]>
Subject: Linked directory or explicit reference
Date: Tue, 30 Apr 2024 15:59:47 -0700
Message-ID: <SN4P221MB06832A96CD534D5D78BA822AF71A2@SN4P221MB0683.NAMP221.PROD.OUTLOOK.COM> (raw)
Hi All;
When doing an initial install of PostgreSQL on RHEL 7 or 8 derived OS
via rpm, what are pros, cons and recommendations of these 2 procedures
for utilizing a second disk?
Secondary SSD or RAID mounted at /disk2.
Option #1
1. install the rpm which creates basic user and home
2. Create symlink /var/lib/pgsql/15/data --> /disk2/data
3. initdb with no special options
Or Option #2
1. install the rpm which creates basic user and home
2. initdb with --pgdata=/disk2/data
Probably using included 'postgresql-12-setup' script
I also link /var/lib/pgsql/data --> ../15/data so automation can
reference postgresql.conf without knowing version (legacy stuff).
The install is automated with a bash script which handles several
options including whether there is a second disk for DB. Scripting the
install with or without the second disk is straight forward but I'm
concerned with either scenario causing unforeseen differences.
I don't think there's a benefit to using tablespace here but I have no
experience with it. The systemd service is configured with a dependency
on the disk mount so I don't think there are different risks for
starting postgres with missing data directory.
I've run postgres in both scenarios and not had any issues. I'm
interested in comments from others on their experience using these or
other options.
Thanks,
Senor
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: Linked directory or explicit reference
In-Reply-To: <SN4P221MB06832A96CD534D5D78BA822AF71A2@SN4P221MB0683.NAMP221.PROD.OUTLOOK.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