agora inbox for pgsql-docs@postgresql.org
help / color / mirror / Atom feedFrom: Gurjeet Singh <gurjeet@singh.im>
To: Robert Treat <rob@xzilla.net>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Euler Taveira <euler@eulerto.com>
Cc: Theodor Herlo <t.herlo@proventa.de>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>
Subject: Re: Documentation for initdb option --waldir
Date: Sat, 29 Mar 2025 08:19:16 -0700
Message-ID: <D8SUNBF5CFW8.24B0ICY0SOFNI@singh.im> (raw)
In-Reply-To: <CAJSLCQ3J31T0VrKZ+Ad1qBvECmEFByfY5JrJ6z2bX=8OnN+GZg@mail.gmail.com>
References: <174291831170.676.262776479364497352@wrigleys.postgresql.org>
<CAKFQuwba2Rmf4X5yAkxARyy8X=Lv_4sN9vE7Z5exJji3d+7M2g@mail.gmail.com>
<1f38ffb000b9ead35702a63191c28f36e259c7d1.camel@cybertec.at>
<FR3P281MB19197329968C1F5D6537C6D5F6A12@FR3P281MB1919.DEUP281.PROD.OUTLOOK.COM>
<eeb6331a-dd43-4ddf-b378-f59e0fd2c1d7@app.fastmail.com>
<CAKFQuwbenWrFVa-BkzkHy9RFvFUQzzo=kDBTjikKfurxAse0cw@mail.gmail.com>
<CABV9wwN8nafxG8MdfEuHPxMhxr9SmGAoWKLBNr=9Ja6q9=1N+Q@mail.gmail.com>
<CAKFQuwYpmEUDVw2DTCs0v4J3g20BmZq_5HYgjpcFQfDt4Yy2+w@mail.gmail.com>
<CAJSLCQ3J31T0VrKZ+Ad1qBvECmEFByfY5JrJ6z2bX=8OnN+GZg@mail.gmail.com>
On Sat Mar 29, 2025 at 7:26 AM PDT, Robert Treat wrote:
> On Thu, Mar 27, 2025 at 5:57 PM David G. Johnston
> <david.g.johnston@gmail.com> wrote:
>> On Thu, Mar 27, 2025 at 2:28 PM Robert Treat <rob@xzilla.net> wrote:
>>> On Thu, Mar 27, 2025 at 12:06 PM David G. Johnston
>>> <david.g.johnston@gmail.com> wrote:
>>> > I expanded upon the material regarding using different file systems and disks.
>>> >
>>> > I would like to add a similar "why" to the mount point recommendation but don't know what that would be. Suggestions welcomed.
>>> >
>>>
>>> I'm not sure I follow what you are asking for... but a non-performance
>>> reason to use a seperate mount point for pg_wal, even if the
>>> underlying storage is the same, would be for something like using
>>> filesystem snapshots to grab contents of the data directory without
>>> grabbing wal (which can be handled separately).
>>>
>>
>> If I mount the filesystem on disk2 to: /mnt/disk2
>> Why do I need to create "/mnt/disk2/wal_files/" and point there instead of: "/mnt/disk2/"?
>>
>
> My immediate response to this was "because Postgres won't let you"
> which seemed unhelpful, and that I couldn't remember why was pretty
> unsatisfying, so I dug around in the source which was unhelpful but
> eventually came across this from
> https://www.postgresql.org/docs/devel/creating-cluster.html#CREATING-CLUSTER-MOUNT-POINTS
>
> "Best practice is to create a directory within the mount-point
> directory that is owned by the PostgreSQL user, and then create the
> data directory within that. This avoids permissions problems,..."
>
> Which I do remember having tried to do it directly and the OS
> complaining that my mount point wasn't owned by root and/or Postgres
> complaining that the xlog dir wasn't owned by Postgres, so I think
> this advice probably still holds.
I remembered an old advice related to lost+found being placed on mount
points, but couldn't remember the specific, so searched and found Tom's
advice for data directory. I feel that the advice would apply to WAL
directory, as well.
view thread (14+ messages) latest in thread
Message-ID: <D8SUNBF5CFW8.24B0ICY0SOFNI@singh.im>
Permalink: ../D8SUNBF5CFW8.24B0ICY0SOFNI@singh.im/
Also on: postgresql.org/message-id/D8SUNBF5CFW8.24B0ICY0SOFNI@singh.im
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: pgsql-docs@postgresql.org
Cc: gurjeet@singh.im, rob@xzilla.net, david.g.johnston@gmail.com, euler@eulerto.com, t.herlo@proventa.de, laurenz.albe@cybertec.at, pgsql-docs@lists.postgresql.org
Subject: Re: Documentation for initdb option --waldir
In-Reply-To: <D8SUNBF5CFW8.24B0ICY0SOFNI@singh.im>
* 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