Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tyXxy-008CL5-Sc for pgsql-docs@arkaria.postgresql.org; Sat, 29 Mar 2025 15:19:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tyXxx-00CTrn-Bb for pgsql-docs@arkaria.postgresql.org; Sat, 29 Mar 2025 15:19:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tyXxx-00CTrf-49 for pgsql-docs@lists.postgresql.org; Sat, 29 Mar 2025 15:19:21 +0000 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tyXxv-001odw-12 for pgsql-docs@lists.postgresql.org; Sat, 29 Mar 2025 15:19:20 +0000 Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-301cda78d48so5642551a91.0 for ; Sat, 29 Mar 2025 08:19:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743261558; x=1743866358; darn=lists.postgresql.org; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=KrQEfvv9IY5gDR0lcjyaDlF4en2XAbgwvhwD28PpPoA=; b=GS5kQvxD8hDlLjK2OUHVEEYGbvWcwjo0+CJZ3iVuI4e61yHuTErvLeS0pjTFTdK9bY z1HKXrZnvhrDUzW0yYpDPYAX5oGgeZMIvQbcY2mASsE0l1j+Qs/CX9v6BU0zs7HzJ5Qx Z/hntV7U64CWdO8+vfDoEJQWNMuTwBxpNU78nsrho/lOWjSe+VLRuFVCmXtqY5oCUVZr HxxrONYU07OhlJo9Lo47Gyp365jfnsBh5wWQPZaY3BKuOLF20g0AY6fnRD9TvI0OpyTd jOWK9K1nSfJPZEr181OBlJ6LMAH4pZQk0slEQG6ax/C3e/7FQnjnvEsDvptffWe6H2qQ nS9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743261558; x=1743866358; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=KrQEfvv9IY5gDR0lcjyaDlF4en2XAbgwvhwD28PpPoA=; b=Y3SNJd0LR2tez0UKj8+ugqjAfZ8++0BYYbfXKESzYorqOrhLxhqOVYdpTmkAd/vikc 9GlkrhYhPt7GS9e/ytREQzBYWZoEOppvCDNt0MBU/YZq+x5CnRD3UVbA1JJhi21KdoQi 2tzBYbrQh1vooggHeE3KTx/DfW93ruOj4R4x0lcz6Xq91JgrG1haJzWDxYdANMZUI0yF 6vSWvOzjZTC9lrcV9xkgozhMo6V9vV4+H7Cj5YrdPW68DHzvMco7rrjrVQhT93AhepXK 5m2kTfH4Pc90qN6VmAoYCTBpQdoDwjL6Mu1o9yc6/gzbeEPGK3k+jL6sdNmlmIOZbVWM j6LQ== X-Forwarded-Encrypted: i=1; AJvYcCVJDUESbVL8dK3EybWXCneQzRuyoXvj10cdY3TJl9mY0hwU3ba1raR2G2ivkE28KGWIdUsweTe9AivN@lists.postgresql.org X-Gm-Message-State: AOJu0YzMmhfkHz4kb5sLhmQS9KYm2KJq8cicRhEUBATwxWoyD+mutY09 m+y/8Dqkcy2XXybykOzObZ211C/ZCSrBIorDbe2IPVBZ4sZ7JFdG X-Gm-Gg: ASbGncv3VrxE5bceYg3ynAeB7m/GPV0uSIc3fFGw9XKW7Wy7R86+9V3bQWiefGX5K1H kbN4dOxe9QgyLSm2pQKDPkf2QTmyQuTQbQGhra+jZsfZi67obH6Ic2I0Cb51GfQ5A2FQTUvSxgv 6EfuS+OMWDWAH95FdOmNShN3uTCBXEUrgJPYFXhF05U6IjM8J7Mq+p9BhgNjFz7PA79rseisy73 IyrFM/6IWVz+3IK2w4xCdoC/pj07iFSRey0EXM3GyBGmAW2tAVuSCtsHWSKRTFuMb55SQ4RpU8n 98DH0Y37M0kxzm3j/vo5vbakmuvoc4JM3KsS6njuxzplIrKAmUZUOVvl X-Google-Smtp-Source: AGHT+IFtiBkijOram4qGvbDpxR2H+tMm+OptyzFcS+U/ltdc2O2IkYttZmXscxZG2+JnoMYYs2IyRw== X-Received: by 2002:a17:90b:51cb:b0:301:6343:1626 with SMTP id 98e67ed59e1d1-30531f7c092mr4904108a91.1.1743261558391; Sat, 29 Mar 2025 08:19:18 -0700 (PDT) Received: from localhost ([2601:644:8000:ee20:c090:a7c:4bd8:1550]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3039dfd4a12sm6214854a91.4.2025.03.29.08.19.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 29 Mar 2025 08:19:17 -0700 (PDT) Sender: Gurjeet Singh Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Sat, 29 Mar 2025 08:19:16 -0700 Message-Id: Cc: "Euler Taveira" , "Theodor Herlo" , "Laurenz Albe" , "pgsql-docs@lists.postgresql.org" Subject: Re: Documentation for initdb option --waldir From: "Gurjeet Singh" To: "Robert Treat" , "David G. Johnston" X-Mailer: aerc 0.20.1 References: <174291831170.676.262776479364497352@wrigleys.postgresql.org> <1f38ffb000b9ead35702a63191c28f36e259c7d1.camel@cybertec.at> In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat Mar 29, 2025 at 7:26 AM PDT, Robert Treat wrote: > On Thu, Mar 27, 2025 at 5:57=E2=80=AFPM David G. Johnston > wrote: >> On Thu, Mar 27, 2025 at 2:28=E2=80=AFPM Robert Treat wr= ote: >>> On Thu, Mar 27, 2025 at 12:06=E2=80=AFPM David G. Johnston >>> wrote: >>> > I expanded upon the material regarding using different file systems a= nd 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-CLUS= TER-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.