pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Steele <david@pgmasters.net>
To: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Volume partitioning (was Re: pgbackrest when data/base is symlinked to another volume)
Date: Mon, 10 Sep 2018 10:33:55 -0400
Message-ID: <7d479816-e84b-00e9-bf87-17a19cc07581@pgmasters.net> (raw)
In-Reply-To: <cb2eb6b8-f020-b553-30d2-e02b2760ec93@gmail.com>
References: <c793eb2a-4af4-0e3b-b3ee-852708eb6286@gmail.com>
	<3db7c0dc-b5e8-fab6-3521-bc60e2c1375b@pgmasters.net>
	<f1ce38e9-6afa-5418-72dc-6b0deb4b1a11@gmail.com>
	<83d9fd2e-49f2-7100-33b0-ff381a2c996b@pgmasters.net>
	<cb2eb6b8-f020-b553-30d2-e02b2760ec93@gmail.com>

Hi Ron

On 9/8/18 4:26 PM, Ron wrote:
> 
> Googled "postgresql disk partitioning" and "postgresql volume 
> partitioning" without much success.
> 
> Is the best practice volume partitioning:
> /Database/9.6/data
> /Database/9.6/data/pg_log
> /Database/9.6/data/pg_xlog
> 
> where /var/lib/pgsql/9.6 (on RHEL6) is a symlink to /Database/9.6/data 
> and PGDATA=/Database/9.6/data
> 
> *or *
> 
> /Database/9.6/data/base
> /Database/9.6/data/pg_log
> /Database/9.6/data/pg_xlog
> 
> where PGDATA=/var/lib/pgsql/9.6/data and base, pg_log and px_xlog are 
> symlinks to the partitions?

This is really a matter of preference, but simpler is better, so the 
first one looks better to me.

In general I prefer to keep everything in /var/lib/pgsql/9.6:

/var/lib/pgsql/9.6/data
/var/lib/pgsql/9.6/data/pg_xlog -> /var/lib/pgsql/9.6/wal

Then use the log_directory setting to put logs in:

/var/log/pgsql or /var/lib/pgsql/9.6/log

pgBackRest will expect to be pointed at a real directory (pg-path) and 
expect the data_directory in PostgreSQL to match.

Regards,
-- 
-David
david@pgmasters.net




view thread (2+ messages)

Message-ID: <7d479816-e84b-00e9-bf87-17a19cc07581@pgmasters.net>
Permalink:  ../7d479816-e84b-00e9-bf87-17a19cc07581@pgmasters.net/
Also on:    postgresql.org/message-id/7d479816-e84b-00e9-bf87-17a19cc07581@pgmasters.net

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: david@pgmasters.net, ronljohnsonjr@gmail.com
  Subject: Re: Volume partitioning (was Re: pgbackrest when data/base is symlinked to another volume)
  In-Reply-To: <7d479816-e84b-00e9-bf87-17a19cc07581@pgmasters.net>
  References: <c793eb2a-4af4-0e3b-b3ee-852708eb6286@gmail.com> <3db7c0dc-b5e8-fab6-3521-bc60e2c1375b@pgmasters.net> <f1ce38e9-6afa-5418-72dc-6b0deb4b1a11@gmail.com> <83d9fd2e-49f2-7100-33b0-ff381a2c996b@pgmasters.net> <cb2eb6b8-f020-b553-30d2-e02b2760ec93@gmail.com> <7d479816-e84b-00e9-bf87-17a19cc07581@pgmasters.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox