pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #14898: pg_upgrade documentation is misleading
3+ messages / 2 participants
[nested] [flat]

Commits from this thread:
  2018-01-31 e5dede9097 3dcc7ceec0  doc:  mention datadir locations are actually config locations
* BUG #14898: pg_upgrade documentation is misleading
@ 2017-11-10 22:09  yves.goergen@gmail.com
  0 siblings, 1 reply; 3+ messages in thread

From: yves.goergen@gmail.com @ 2017-11-10 22:09 UTC (permalink / raw)
  To: pgsql-bugs; +Cc: yves.goergen@gmail.com

The following bug has been logged on the website:

Bug reference:      14898
Logged by:          Yves Goergen
Email address:      yves.goergen@gmail.com
PostgreSQL version: 10.0
Operating system:   Ubuntu
Description:        

The documentation of pg_upgrade suggests that -d and -D are the data
directories. But actually they expect the config directories. In a default
installation from the official packages for Ubuntu (from PostgreSQL, not
from Ubuntu), this is a difference between /var/lib/postgresql/10/main and
/etc/postgresql/10/main. See also https://dba.stackexchange.com/q/190469


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [BUGS] BUG #14898: pg_upgrade documentation is misleading
@ 2018-01-23 17:28  Bruce Momjian <bruce@momjian.us>
  parent: yves.goergen@gmail.com
  0 siblings, 1 reply; 3+ messages in thread

From: Bruce Momjian @ 2018-01-23 17:28 UTC (permalink / raw)
  To: yves.goergen@gmail.com; +Cc: pgsql-bugs

On Fri, Nov 10, 2017 at 10:09:12PM +0000, yves.goergen@gmail.com wrote:
> The following bug has been logged on the website:
> 
> Bug reference:      14898
> Logged by:          Yves Goergen
> Email address:      yves.goergen@gmail.com
> PostgreSQL version: 10.0
> Operating system:   Ubuntu
> Description:        
> 
> The documentation of pg_upgrade suggests that -d and -D are the data
> directories. But actually they expect the config directories. In a default
> installation from the official packages for Ubuntu (from PostgreSQL, not
> from Ubuntu), this is a difference between /var/lib/postgresql/10/main and
> /etc/postgresql/10/main. See also https://dba.stackexchange.com/q/190469

I think you are correct.  We have tried to adjust our documentation to
show the most common implementation locations, but at the same time to
be accurate.  For example, in the the 'postgres' manual page, we kept -D
(signifying datadir) but describe it as the location of the
configuration files, e.g.

       -D datadir
           Specifies the file system location of the database
           configuration files.

This was not done with pg_upgrade, and the attached patch fixes that.  I
am thinking of applying this to PG 10 and head (PG 11)  but not
backpatching it further.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +

Attachments:

datadir.diff (text/x-diff, 3.3K) download diff --git a/doc/src/sgml/ref/pgupgrade.sgml b/doc/src/sgml/ref/pgupgrade.sgml new file mode 100644 index 055eac3..62f5cb3 *** a/doc/src/sgml/ref/pgupgrade.sgml --- b/doc/src/sgml/ref/pgupgrade.sgml *************** *** 24,32 **** <arg choice="plain"><option>-B</option></arg> <arg choice="plain"><replaceable>newbindir</replaceable></arg> <arg choice="plain"><option>-d</option></arg> ! <arg choice="plain"><replaceable>olddatadir</replaceable></arg> <arg choice="plain"><option>-D</option></arg> ! <arg choice="plain"><replaceable>newdatadir</replaceable></arg> <arg rep="repeat"><replaceable>option</replaceable></arg> </cmdsynopsis> </refsynopsisdiv> --- 24,32 ---- <arg choice="plain"><option>-B</option></arg> <arg choice="plain"><replaceable>newbindir</replaceable></arg> <arg choice="plain"><option>-d</option></arg> ! <arg choice="plain"><replaceable>oldconfigdir</replaceable></arg> <arg choice="plain"><option>-D</option></arg> ! <arg choice="plain"><replaceable>newconfigdir</replaceable></arg> <arg rep="repeat"><replaceable>option</replaceable></arg> </cmdsynopsis> </refsynopsisdiv> *************** *** 99,114 **** </varlistentry> <varlistentry> ! <term><option>-d</option> <replaceable>datadir</replaceable></term> ! <term><option>--old-datadir=</option><replaceable>datadir</replaceable></term> ! <listitem><para>the old cluster data directory; environment variable <envar>PGDATAOLD</envar></para></listitem> </varlistentry> <varlistentry> ! <term><option>-D</option> <replaceable>datadir</replaceable></term> ! <term><option>--new-datadir=</option><replaceable>datadir</replaceable></term> ! <listitem><para>the new cluster data directory; environment variable <envar>PGDATANEW</envar></para></listitem> </varlistentry> --- 99,114 ---- </varlistentry> <varlistentry> ! <term><option>-d</option> <replaceable>configdir</replaceable></term> ! <term><option>--old-datadir=</option><replaceable>configdir</replaceable></term> ! <listitem><para>the old database cluster configuration directory; environment variable <envar>PGDATAOLD</envar></para></listitem> </varlistentry> <varlistentry> ! <term><option>-D</option> <replaceable>configdir</replaceable></term> ! <term><option>--new-datadir=</option><replaceable>configdir</replaceable></term> ! <listitem><para>the new database cluster configuration directory; environment variable <envar>PGDATANEW</envar></para></listitem> </varlistentry> *************** pg_upgrade.exe *** 476,482 **** <title>Save configuration files</title> <para> ! Save any configuration files from the old standbys' data directories you need to keep, e.g. <filename>postgresql.conf</filename>, <literal>recovery.conf</literal>, because these will be overwritten or removed in the next step. --- 476,482 ---- <title>Save configuration files</title> <para> ! Save any configuration files from the old standbys' configuration directories you need to keep, e.g. <filename>postgresql.conf</filename>, <literal>recovery.conf</literal>, because these will be overwritten or removed in the next step.
^ permalink raw reply [nested|flat] 3+ messages in thread

* Re: [BUGS] BUG #14898: pg_upgrade documentation is misleading
@ 2018-01-31 21:25  Bruce Momjian <bruce@momjian.us>
  parent: Bruce Momjian <bruce@momjian.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Bruce Momjian @ 2018-01-31 21:25 UTC (permalink / raw)
  To: yves.goergen@gmail.com; +Cc: pgsql-bugs

On Tue, Jan 23, 2018 at 12:28:30PM -0500, Bruce Momjian wrote:
> On Fri, Nov 10, 2017 at 10:09:12PM +0000, yves.goergen@gmail.com wrote:
> > The following bug has been logged on the website:
> > 
> > Bug reference:      14898
> > Logged by:          Yves Goergen
> > Email address:      yves.goergen@gmail.com
> > PostgreSQL version: 10.0
> > Operating system:   Ubuntu
> > Description:        
> > 
> > The documentation of pg_upgrade suggests that -d and -D are the data
> > directories. But actually they expect the config directories. In a default
> > installation from the official packages for Ubuntu (from PostgreSQL, not
> > from Ubuntu), this is a difference between /var/lib/postgresql/10/main and
> > /etc/postgresql/10/main. See also https://dba.stackexchange.com/q/190469
> 
> I think you are correct.  We have tried to adjust our documentation to
> show the most common implementation locations, but at the same time to
> be accurate.  For example, in the the 'postgres' manual page, we kept -D
> (signifying datadir) but describe it as the location of the
> configuration files, e.g.
> 
>        -D datadir
>            Specifies the file system location of the database
>            configuration files.
> 
> This was not done with pg_upgrade, and the attached patch fixes that.  I
> am thinking of applying this to PG 10 and head (PG 11)  but not
> backpatching it further.

Done.  Thanks for the report.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2018-01-31 21:25 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-11-10 22:09 BUG #14898: pg_upgrade documentation is misleading yves.goergen@gmail.com
2018-01-23 17:28 ` Bruce Momjian <bruce@momjian.us>
2018-01-31 21:25   ` Bruce Momjian <bruce@momjian.us>

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