public inbox for [email protected]
help / color / mirror / Atom feedFrom: Ron Johnson <[email protected]>
To: Pgsql-admin <[email protected]>
Subject: Re: Postgresql Database and PG_WAL locations
Date: Mon, 2 Sep 2024 09:15:57 -0400
Message-ID: <CANzqJaCy8W2m3SunnzXn2tRf-K34=-QFFzRkBdci+-S=9O2smg@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CABHPps4uW9RFwUc0_2CoPMZ1_Du8HRuvNwyXRvCp48ZzgUuKzQ@mail.gmail.com>
<[email protected]>
<CANzqJaBPFm5wjGRuzC8Ywh1=uaeg4BRunhFGgruoy1e-ZxR2Cw@mail.gmail.com>
<[email protected]>
On Mon, Sep 2, 2024 at 6:30 AM Laurenz Albe <[email protected]>
wrote:
> On Thu, 2024-08-29 at 15:02 -0400, Ron Johnson wrote:
> > On Thu, Aug 29, 2024 at 2:22 PM Matthew Tice <[email protected]> wrote:
> > > > On Aug 29, 2024, at 12:18 PM, Henry Ashu <[email protected]> wrote:
> > > >
> > > > I have a database that's about 2TB in size, and I want to place the
> database
> > > > files in a separate mount point(PGDATA) and the log files in a
> different mount
> > > > point(PG_WAL). What's your take on this?.
> > >
> > >
> > > Take a look at
> https://wiki.postgresql.org/wiki/Installation_and_Administration_Best_practices
> > >
> > > Essentially, yes, you will want your WAL and data stored on different
> devices
> > > (or the very least, different partitions).
> >
> > Is that recommendation still valid? After all, that was written when 15
> years old
> > Sun Studio 12 was still pertinent. Times have changed since then.
> Disks are much, much bigger.
>
> I think the advice is still valid.
>
> Today you'd have different filesystems on different logical volumes rather
> than different physical disks,
None of our disks are physical; they're all SAN LUNs.
> but it is still a good idea to separate data and WAL,
> so that they cannot fill up each other's file system.
>
Regular checkpoints, transactions(*) that don't stay open for hours or
days, and monitoring replication to ensure that it keeps replicating data
instead of piling up on the primary server all solve that problem
Honestly... it's been *YEARS* since I've seen that problem.
Besides, "disks are cheap", right?
*COPY statements don't count.
I'd actually define a third file system for the PostgreSQL log files, for
> the same reason.
>
I set log_directory to /var/log/postgresql because logs go in
/var/log. 😀 (pg_basebackup won't replicate it, which is also handy.) On
a separate partition so as to isolate PG data from other application and OS
data (and lets me manage capacity via a script).
Ditto the PgBackrest directory: isolate PG data from other application and
OS data.
We'd have to put them on separate mount points anyway, since the VM build
process doesn't like large / and /boot disks.
--
Death to America, and butter sauce.
Iraq lobster!
view thread (8+ 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 Database and PG_WAL locations
In-Reply-To: <CANzqJaCy8W2m3SunnzXn2tRf-K34=-QFFzRkBdci+-S=9O2smg@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