pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg_xlogdump -p option correction
9+ messages / 2 participants
[nested] [flat]

* pg_xlogdump -p option correction
@ 2016-12-26 21:56 Bruce Momjian <bruce@momjian.us>
  2016-12-27 04:28 ` Re: pg_xlogdump -p option correction Michael Paquier <michael.paquier@gmail.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Bruce Momjian @ 2016-12-26 21:56 UTC (permalink / raw)
  To: pgsql-docs

I have found that pg_xlogdump looks for WAL files in the in the current
directory and the pg_wal subdirectory of both  the current directory and
the PGDATA directory.  Doc patch attached.

-- 
  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 +

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

Attachments:

xlogdump.diff (text/x-diff, 919B) download diff --git a/doc/src/sgml/ref/pg_xlogdump.sgml b/doc/src/sgml/ref/pg_xlogdump.sgml new file mode 100644 index cfb6d87..a229581 *** a/doc/src/sgml/ref/pg_xlogdump.sgml --- b/doc/src/sgml/ref/pg_xlogdump.sgml *************** PostgreSQL documentation *** 118,125 **** <listitem> <para> Directory in which to find log segment files. The default is to search ! for them in the <literal>pg_wal</literal> subdirectory of the current ! directory. </para> </listitem> </varlistentry> --- 118,126 ---- <listitem> <para> Directory in which to find log segment files. The default is to search ! for them in the current directory, and the <literal>pg_wal</literal> ! subdirectory of both the current directory and the ! <envar>PGDATA</envar> directory. </para> </listitem> </varlistentry>
^ permalink raw reply [nested|flat] 9+ messages in thread

* Re: pg_xlogdump -p option correction
  2016-12-26 21:56 pg_xlogdump -p option correction Bruce Momjian <bruce@momjian.us>
@ 2016-12-27 04:28 ` Michael Paquier <michael.paquier@gmail.com>
  2017-01-07 01:02   ` Re: pg_xlogdump -p option correction Bruce Momjian <bruce@momjian.us>
  0 siblings, 1 reply; 9+ messages in thread

From: Michael Paquier @ 2016-12-27 04:28 UTC (permalink / raw)
  To: Bruce Momjian <bruce@momjian.us>; +Cc: pgsql-docs

On Tue, Dec 27, 2016 at 6:56 AM, Bruce Momjian <bruce@momjian.us> wrote:
> I have found that pg_xlogdump looks for WAL files in the in the current
> directory and the pg_wal subdirectory of both  the current directory and
> the PGDATA directory.  Doc patch attached.

The whole behavior is listed in pg_xlogdump.c here:
/*
 * Try to find the file in several places:
 * if directory == NULL:
 *       fname
 *       XLOGDIR / fname
 *       $PGDATA / XLOGDIR / fname
 * else
 *       directory / fname
 *       directory / XLOGDIR / fname
 *
 * return a read only fd
 */
static int
fuzzy_open_file(const char *directory, const char *fname)

Updating the docs the way your patch does does not look enough IMO:
1) pg_xlogdump --help should mention PGDATA as well for the default
behavior, and should make clear the default and when -p is defined:
  -p, --path=PATH        directory in which to find log segment files
                         (default: ./pg_wal)
2) The documentation does not mention that if a directory is defined
pg_xlogdump will try to look as well at defined_dir/pg_wal.
-- 
Michael


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



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

* Re: pg_xlogdump -p option correction
  2016-12-26 21:56 pg_xlogdump -p option correction Bruce Momjian <bruce@momjian.us>
  2016-12-27 04:28 ` Re: pg_xlogdump -p option correction Michael Paquier <michael.paquier@gmail.com>
@ 2017-01-07 01:02   ` Bruce Momjian <bruce@momjian.us>
  2017-01-07 12:50     ` Re: pg_xlogdump -p option correction Michael Paquier <michael.paquier@gmail.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Bruce Momjian @ 2017-01-07 01:02 UTC (permalink / raw)
  To: Michael Paquier <michael.paquier@gmail.com>; +Cc: pgsql-docs

On Tue, Dec 27, 2016 at 01:28:17PM +0900, Michael Paquier wrote:
> On Tue, Dec 27, 2016 at 6:56 AM, Bruce Momjian <bruce@momjian.us> wrote:
> > I have found that pg_xlogdump looks for WAL files in the in the current
> > directory and the pg_wal subdirectory of both  the current directory and
> > the PGDATA directory.  Doc patch attached.
> 
> The whole behavior is listed in pg_xlogdump.c here:
> /*
>  * Try to find the file in several places:
>  * if directory == NULL:
>  *       fname
>  *       XLOGDIR / fname
>  *       $PGDATA / XLOGDIR / fname
>  * else
>  *       directory / fname
>  *       directory / XLOGDIR / fname
>  *
>  * return a read only fd
>  */
> static int
> fuzzy_open_file(const char *directory, const char *fname)
> 
> Updating the docs the way your patch does does not look enough IMO:

OK.

> 1) pg_xlogdump --help should mention PGDATA as well for the default
> behavior, and should make clear the default and when -p is defined:
>   -p, --path=PATH        directory in which to find log segment files
>                          (default: ./pg_wal)

Ah, good point. The new output is:

  -p, --path=PATH   directory in which to find log segment files
                    (default: current directory, ./pg_wal, $PGDATA/pg_wal)

> 2) The documentation does not mention that if a directory is defined
> pg_xlogdump will try to look as well at defined_dir/pg_wal.

Uh, I think it does in the first sentence:

	Directory in which to find log segment files.

Updated patch attached.

-- 
  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 +

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

Attachments:

xlogdump.diff (text/x-diff, 2.3K) download diff --git a/doc/src/sgml/ref/pg_xlogdump.sgml b/doc/src/sgml/ref/pg_xlogdump.sgml new file mode 100644 index cfb6d87..a229581 *** a/doc/src/sgml/ref/pg_xlogdump.sgml --- b/doc/src/sgml/ref/pg_xlogdump.sgml *************** PostgreSQL documentation *** 118,125 **** <listitem> <para> Directory in which to find log segment files. The default is to search ! for them in the <literal>pg_wal</literal> subdirectory of the current ! directory. </para> </listitem> </varlistentry> --- 118,126 ---- <listitem> <para> Directory in which to find log segment files. The default is to search ! for them in the current directory, and the <literal>pg_wal</literal> ! subdirectory of both the current directory and the ! <envar>PGDATA</envar> directory. </para> </listitem> </varlistentry> diff --git a/src/bin/pg_xlogdump/pg_xlogdump.c b/src/bin/pg_xlogdump/pg_xlogdump.c new file mode 100644 index 0ad441e..9e92f25 *** a/src/bin/pg_xlogdump/pg_xlogdump.c --- b/src/bin/pg_xlogdump/pg_xlogdump.c *************** usage(void) *** 680,686 **** printf(_(" -f, --follow keep retrying after reaching end of WAL\n")); printf(_(" -n, --limit=N number of records to display\n")); printf(_(" -p, --path=PATH directory in which to find log segment files\n" ! " (default: ./pg_wal)\n")); printf(_(" -r, --rmgr=RMGR only show records generated by resource manager RMGR\n" " use --rmgr=list to list valid resource manager names\n")); printf(_(" -s, --start=RECPTR start reading at log position RECPTR\n")); --- 680,686 ---- printf(_(" -f, --follow keep retrying after reaching end of WAL\n")); printf(_(" -n, --limit=N number of records to display\n")); printf(_(" -p, --path=PATH directory in which to find log segment files\n" ! " (default: current directory, ./pg_wal, $PGDATA/pg_wal)\n")); printf(_(" -r, --rmgr=RMGR only show records generated by resource manager RMGR\n" " use --rmgr=list to list valid resource manager names\n")); printf(_(" -s, --start=RECPTR start reading at log position RECPTR\n"));
^ permalink raw reply [nested|flat] 9+ messages in thread

* Re: pg_xlogdump -p option correction
  2016-12-26 21:56 pg_xlogdump -p option correction Bruce Momjian <bruce@momjian.us>
  2016-12-27 04:28 ` Re: pg_xlogdump -p option correction Michael Paquier <michael.paquier@gmail.com>
  2017-01-07 01:02   ` Re: pg_xlogdump -p option correction Bruce Momjian <bruce@momjian.us>
@ 2017-01-07 12:50     ` Michael Paquier <michael.paquier@gmail.com>
  2017-01-07 16:20       ` Re: pg_xlogdump -p option correction Bruce Momjian <bruce@momjian.us>
  0 siblings, 1 reply; 9+ messages in thread

From: Michael Paquier @ 2017-01-07 12:50 UTC (permalink / raw)
  To: Bruce Momjian <bruce@momjian.us>; +Cc: pgsql-docs

On Sat, Jan 7, 2017 at 10:02 AM, Bruce Momjian <bruce@momjian.us> wrote:
>> 1) pg_xlogdump --help should mention PGDATA as well for the default
>> behavior, and should make clear the default and when -p is defined:
>>   -p, --path=PATH        directory in which to find log segment files
>>                          (default: ./pg_wal)
>
> Ah, good point. The new output is:
>
>   -p, --path=PATH   directory in which to find log segment files
>                     (default: current directory, ./pg_wal, $PGDATA/pg_wal)

Looks good, thanks.

>> 2) The documentation does not mention that if a directory is defined
>> pg_xlogdump will try to look as well at defined_dir/pg_wal.
>
> Uh, I think it does in the first sentence:
>
>         Directory in which to find log segment files.

I am reading that as "only the current directory", not "the current
directory, then current directory + pg_wal". Do you think that this
sentence implies that the check routine looks as well at
current_dir/pg_wal?

> Updated patch attached.

+        subdirectory of both the current directory and the
+        <envar>PGDATA</envar> directory.
This could say "of both the current directory and *then* the PGDATA
directory" to outline the order of the actions taken by the check
routine. Just my 2c on the matter.
-- 
Michael


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



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

* Re: pg_xlogdump -p option correction
  2016-12-26 21:56 pg_xlogdump -p option correction Bruce Momjian <bruce@momjian.us>
  2016-12-27 04:28 ` Re: pg_xlogdump -p option correction Michael Paquier <michael.paquier@gmail.com>
  2017-01-07 01:02   ` Re: pg_xlogdump -p option correction Bruce Momjian <bruce@momjian.us>
  2017-01-07 12:50     ` Re: pg_xlogdump -p option correction Michael Paquier <michael.paquier@gmail.com>
@ 2017-01-07 16:20       ` Bruce Momjian <bruce@momjian.us>
  2017-01-08 06:27         ` Re: pg_xlogdump -p option correction Michael Paquier <michael.paquier@gmail.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Bruce Momjian @ 2017-01-07 16:20 UTC (permalink / raw)
  To: Michael Paquier <michael.paquier@gmail.com>; +Cc: pgsql-docs

On Sat, Jan  7, 2017 at 09:50:32PM +0900, Michael Paquier wrote:
> >> 2) The documentation does not mention that if a directory is defined
> >> pg_xlogdump will try to look as well at defined_dir/pg_wal.
> >
> > Uh, I think it does in the first sentence:
> >
> >         Directory in which to find log segment files.
> 
> I am reading that as "only the current directory", not "the current
> directory, then current directory + pg_wal". Do you think that this
> sentence implies that the check routine looks as well at
> current_dir/pg_wal?
> 
> > Updated patch attached.
> 
> +        subdirectory of both the current directory and the
> +        <envar>PGDATA</envar> directory.
> This could say "of both the current directory and *then* the PGDATA
> directory" to outline the order of the actions taken by the check
> routine. Just my 2c on the matter.

Ah, I see your point.  I ended up rewording the text to be more explicit
about the supplied argument and "searching".  Updated patch attached.

-- 
  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 +

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

Attachments:

xlogdump.diff (text/x-diff, 2.5K) download diff --git a/doc/src/sgml/ref/pg_xlogdump.sgml b/doc/src/sgml/ref/pg_xlogdump.sgml new file mode 100644 index cfb6d87..4b6e79c *** a/doc/src/sgml/ref/pg_xlogdump.sgml --- b/doc/src/sgml/ref/pg_xlogdump.sgml *************** PostgreSQL documentation *** 117,125 **** <term><option>--path=<replaceable>path</replaceable></option></term> <listitem> <para> ! Directory in which to find log segment files. The default is to search ! for them in the <literal>pg_wal</literal> subdirectory of the current ! directory. </para> </listitem> </varlistentry> --- 117,126 ---- <term><option>--path=<replaceable>path</replaceable></option></term> <listitem> <para> ! Specifies a directory in which to find log segment files. ! In addition, searches are performed in the current directory, ! and the <literal>pg_wal</literal> subdirectory of both the current ! directory and the <envar>PGDATA</envar> directory. </para> </listitem> </varlistentry> diff --git a/src/bin/pg_xlogdump/pg_xlogdump.c b/src/bin/pg_xlogdump/pg_xlogdump.c new file mode 100644 index 0ad441e..e83233f *** a/src/bin/pg_xlogdump/pg_xlogdump.c --- b/src/bin/pg_xlogdump/pg_xlogdump.c *************** usage(void) *** 680,686 **** printf(_(" -f, --follow keep retrying after reaching end of WAL\n")); printf(_(" -n, --limit=N number of records to display\n")); printf(_(" -p, --path=PATH directory in which to find log segment files\n" ! " (default: ./pg_wal)\n")); printf(_(" -r, --rmgr=RMGR only show records generated by resource manager RMGR\n" " use --rmgr=list to list valid resource manager names\n")); printf(_(" -s, --start=RECPTR start reading at log position RECPTR\n")); --- 680,686 ---- printf(_(" -f, --follow keep retrying after reaching end of WAL\n")); printf(_(" -n, --limit=N number of records to display\n")); printf(_(" -p, --path=PATH directory in which to find log segment files\n" ! " (default: current directory, ./pg_wal, PGDATA/pg_wal)\n")); printf(_(" -r, --rmgr=RMGR only show records generated by resource manager RMGR\n" " use --rmgr=list to list valid resource manager names\n")); printf(_(" -s, --start=RECPTR start reading at log position RECPTR\n"));
^ permalink raw reply [nested|flat] 9+ messages in thread

* Re: pg_xlogdump -p option correction
  2016-12-26 21:56 pg_xlogdump -p option correction Bruce Momjian <bruce@momjian.us>
  2016-12-27 04:28 ` Re: pg_xlogdump -p option correction Michael Paquier <michael.paquier@gmail.com>
  2017-01-07 01:02   ` Re: pg_xlogdump -p option correction Bruce Momjian <bruce@momjian.us>
  2017-01-07 12:50     ` Re: pg_xlogdump -p option correction Michael Paquier <michael.paquier@gmail.com>
  2017-01-07 16:20       ` Re: pg_xlogdump -p option correction Bruce Momjian <bruce@momjian.us>
@ 2017-01-08 06:27         ` Michael Paquier <michael.paquier@gmail.com>
  2017-01-09 19:32           ` Re: pg_xlogdump -p option correction Bruce Momjian <bruce@momjian.us>
  0 siblings, 1 reply; 9+ messages in thread

From: Michael Paquier @ 2017-01-08 06:27 UTC (permalink / raw)
  To: Bruce Momjian <bruce@momjian.us>; +Cc: pgsql-docs

On Sun, Jan 8, 2017 at 1:20 AM, Bruce Momjian <bruce@momjian.us> wrote:
> On Sat, Jan  7, 2017 at 09:50:32PM +0900, Michael Paquier wrote:
>> >> 2) The documentation does not mention that if a directory is defined
>> >> pg_xlogdump will try to look as well at defined_dir/pg_wal.
>> >
>> > Uh, I think it does in the first sentence:
>> >
>> >         Directory in which to find log segment files.
>>
>> I am reading that as "only the current directory", not "the current
>> directory, then current directory + pg_wal". Do you think that this
>> sentence implies that the check routine looks as well at
>> current_dir/pg_wal?
>>
>> > Updated patch attached.
>>
>> +        subdirectory of both the current directory and the
>> +        <envar>PGDATA</envar> directory.
>> This could say "of both the current directory and *then* the PGDATA
>> directory" to outline the order of the actions taken by the check
>> routine. Just my 2c on the matter.
>
> Ah, I see your point.  I ended up rewording the text to be more explicit
> about the supplied argument and "searching".  Updated patch attached.

-        Directory in which to find log segment files.  The default is to search
-        for them in the <literal>pg_wal</literal> subdirectory of the current
-        directory.
+        Specifies a directory in which to find log segment files.
+        In addition, searches are performed in the current directory,
+        and the <literal>pg_wal</literal> subdirectory of both the current
+        directory and the <envar>PGDATA</envar> directory.
Hm. This still misses the point that the lookup at PGDATA is done only
if no directory is defined. What do you think about the patch attached
that lists the five possible patterns: 2 for the case where a
directory is defined, and 3 for the default case.
-- 
Michael

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

Attachments:

xlogdump-v2.diff (text/plain, 2.2K) download diff --git a/doc/src/sgml/ref/pg_xlogdump.sgml b/doc/src/sgml/ref/pg_xlogdump.sgml index cfb6d87259..e66221a41c 100644 --- a/doc/src/sgml/ref/pg_xlogdump.sgml +++ b/doc/src/sgml/ref/pg_xlogdump.sgml @@ -117,8 +117,13 @@ PostgreSQL documentation <term><option>--path=<replaceable>path</replaceable></option></term> <listitem> <para> - Directory in which to find log segment files. The default is to search - for them in the <literal>pg_wal</literal> subdirectory of the current + Specifies a directory in which to find log segment files. + If log segment files are not found in the directory defined, a search + is done as well in <literal>pg_wal</literal> subdirectory of the + defined path. The default is to search for them in the current + directory, then in the <literal>pg_wal</literal> subdirectory of the + current directory, and finally in the <literal>pg_wal</literal> + subdirectory of <envar>PGDATA</envar>. directory. </para> </listitem> diff --git a/src/bin/pg_xlogdump/pg_xlogdump.c b/src/bin/pg_xlogdump/pg_xlogdump.c index 0ad441e22e..26d784459d 100644 --- a/src/bin/pg_xlogdump/pg_xlogdump.c +++ b/src/bin/pg_xlogdump/pg_xlogdump.c @@ -679,8 +679,10 @@ usage(void) printf(_(" -e, --end=RECPTR stop reading at log position RECPTR\n")); printf(_(" -f, --follow keep retrying after reaching end of WAL\n")); printf(_(" -n, --limit=N number of records to display\n")); - printf(_(" -p, --path=PATH directory in which to find log segment files\n" - " (default: ./pg_wal)\n")); + printf(_(" -p, --path=PATH directory in which to find log segment files,\n" + " the pg_wal subdirectory of defined directory being\n" + " looked at as well. (default: current directory,\n" + " ./pg_wal and PGDATA/pg_wal)\n")); printf(_(" -r, --rmgr=RMGR only show records generated by resource manager RMGR\n" " use --rmgr=list to list valid resource manager names\n")); printf(_(" -s, --start=RECPTR start reading at log position RECPTR\n"));
^ permalink raw reply [nested|flat] 9+ messages in thread

* Re: pg_xlogdump -p option correction
  2016-12-26 21:56 pg_xlogdump -p option correction Bruce Momjian <bruce@momjian.us>
  2016-12-27 04:28 ` Re: pg_xlogdump -p option correction Michael Paquier <michael.paquier@gmail.com>
  2017-01-07 01:02   ` Re: pg_xlogdump -p option correction Bruce Momjian <bruce@momjian.us>
  2017-01-07 12:50     ` Re: pg_xlogdump -p option correction Michael Paquier <michael.paquier@gmail.com>
  2017-01-07 16:20       ` Re: pg_xlogdump -p option correction Bruce Momjian <bruce@momjian.us>
  2017-01-08 06:27         ` Re: pg_xlogdump -p option correction Michael Paquier <michael.paquier@gmail.com>
@ 2017-01-09 19:32           ` Bruce Momjian <bruce@momjian.us>
  2017-01-09 22:22             ` Re: pg_xlogdump -p option correction Michael Paquier <michael.paquier@gmail.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Bruce Momjian @ 2017-01-09 19:32 UTC (permalink / raw)
  To: Michael Paquier <michael.paquier@gmail.com>; +Cc: pgsql-docs

On Sun, Jan  8, 2017 at 03:27:59PM +0900, Michael Paquier wrote:
> >> +        subdirectory of both the current directory and the
> >> +        <envar>PGDATA</envar> directory.
> >> This could say "of both the current directory and *then* the PGDATA
> >> directory" to outline the order of the actions taken by the check
> >> routine. Just my 2c on the matter.
> >
> > Ah, I see your point.  I ended up rewording the text to be more explicit
> > about the supplied argument and "searching".  Updated patch attached.
> 
> -        Directory in which to find log segment files.  The default is to search
> -        for them in the <literal>pg_wal</literal> subdirectory of the current
> -        directory.
> +        Specifies a directory in which to find log segment files.
> +        In addition, searches are performed in the current directory,
> +        and the <literal>pg_wal</literal> subdirectory of both the current
> +        directory and the <envar>PGDATA</envar> directory.
> Hm. This still misses the point that the lookup at PGDATA is done only
> if no directory is defined. What do you think about the patch attached
> that lists the five possible patterns: 2 for the case where a
> directory is defined, and 3 for the default case.

Understood.  Here is an updated patch which incorporates your
suggestions.

-- 
  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 +

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

Attachments:

xlogdump.diff (text/x-diff, 2.7K) download diff --git a/doc/src/sgml/ref/pg_xlogdump.sgml b/doc/src/sgml/ref/pg_xlogdump.sgml new file mode 100644 index cfb6d87..078b08e *** a/doc/src/sgml/ref/pg_xlogdump.sgml --- b/doc/src/sgml/ref/pg_xlogdump.sgml *************** PostgreSQL documentation *** 117,125 **** <term><option>--path=<replaceable>path</replaceable></option></term> <listitem> <para> ! Directory in which to find log segment files. The default is to search ! for them in the <literal>pg_wal</literal> subdirectory of the current ! directory. </para> </listitem> </varlistentry> --- 117,128 ---- <term><option>--path=<replaceable>path</replaceable></option></term> <listitem> <para> ! Specifies a directory to search for log segment files or a ! directory with a <literal>pg_wal</literal> subdirectory that ! contains such files. The default is to search in the current ! directory, the <literal>pg_wal</literal> subdirectory of the ! current directory, and the <literal>pg_wal</literal> subdirectory ! of <envar>PGDATA</envar>. </para> </listitem> </varlistentry> diff --git a/src/bin/pg_xlogdump/pg_xlogdump.c b/src/bin/pg_xlogdump/pg_xlogdump.c new file mode 100644 index 0ad441e..8bfa827 *** a/src/bin/pg_xlogdump/pg_xlogdump.c --- b/src/bin/pg_xlogdump/pg_xlogdump.c *************** usage(void) *** 680,686 **** printf(_(" -f, --follow keep retrying after reaching end of WAL\n")); printf(_(" -n, --limit=N number of records to display\n")); printf(_(" -p, --path=PATH directory in which to find log segment files\n" ! " (default: ./pg_wal)\n")); printf(_(" -r, --rmgr=RMGR only show records generated by resource manager RMGR\n" " use --rmgr=list to list valid resource manager names\n")); printf(_(" -s, --start=RECPTR start reading at log position RECPTR\n")); --- 680,687 ---- printf(_(" -f, --follow keep retrying after reaching end of WAL\n")); printf(_(" -n, --limit=N number of records to display\n")); printf(_(" -p, --path=PATH directory in which to find log segment files\n" ! printf(_(" or a directory with a ./pg_wal that contains such files\n" ! " (default: current directory, ./pg_wal, PGDATA/pg_wal)\n")); printf(_(" -r, --rmgr=RMGR only show records generated by resource manager RMGR\n" " use --rmgr=list to list valid resource manager names\n")); printf(_(" -s, --start=RECPTR start reading at log position RECPTR\n"));
^ permalink raw reply [nested|flat] 9+ messages in thread

* Re: pg_xlogdump -p option correction
  2016-12-26 21:56 pg_xlogdump -p option correction Bruce Momjian <bruce@momjian.us>
  2016-12-27 04:28 ` Re: pg_xlogdump -p option correction Michael Paquier <michael.paquier@gmail.com>
  2017-01-07 01:02   ` Re: pg_xlogdump -p option correction Bruce Momjian <bruce@momjian.us>
  2017-01-07 12:50     ` Re: pg_xlogdump -p option correction Michael Paquier <michael.paquier@gmail.com>
  2017-01-07 16:20       ` Re: pg_xlogdump -p option correction Bruce Momjian <bruce@momjian.us>
  2017-01-08 06:27         ` Re: pg_xlogdump -p option correction Michael Paquier <michael.paquier@gmail.com>
  2017-01-09 19:32           ` Re: pg_xlogdump -p option correction Bruce Momjian <bruce@momjian.us>
@ 2017-01-09 22:22             ` Michael Paquier <michael.paquier@gmail.com>
  2017-01-11 03:38               ` Re: pg_xlogdump -p option correction Bruce Momjian <bruce@momjian.us>
  0 siblings, 1 reply; 9+ messages in thread

From: Michael Paquier @ 2017-01-09 22:22 UTC (permalink / raw)
  To: Bruce Momjian <bruce@momjian.us>; +Cc: pgsql-docs

On Tue, Jan 10, 2017 at 4:32 AM, Bruce Momjian <bruce@momjian.us> wrote:
> On Sun, Jan  8, 2017 at 03:27:59PM +0900, Michael Paquier wrote:
>> >> +        subdirectory of both the current directory and the
>> >> +        <envar>PGDATA</envar> directory.
>> >> This could say "of both the current directory and *then* the PGDATA
>> >> directory" to outline the order of the actions taken by the check
>> >> routine. Just my 2c on the matter.
>> >
>> > Ah, I see your point.  I ended up rewording the text to be more explicit
>> > about the supplied argument and "searching".  Updated patch attached.
>>
>> -        Directory in which to find log segment files.  The default is to search
>> -        for them in the <literal>pg_wal</literal> subdirectory of the current
>> -        directory.
>> +        Specifies a directory in which to find log segment files.
>> +        In addition, searches are performed in the current directory,
>> +        and the <literal>pg_wal</literal> subdirectory of both the current
>> +        directory and the <envar>PGDATA</envar> directory.
>> Hm. This still misses the point that the lookup at PGDATA is done only
>> if no directory is defined. What do you think about the patch attached
>> that lists the five possible patterns: 2 for the case where a
>> directory is defined, and 3 for the default case.
>
> Understood.  Here is an updated patch which incorporates your
> suggestions.

Thanks. This looks good to me.
-- 
Michael


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



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

* Re: pg_xlogdump -p option correction
  2016-12-26 21:56 pg_xlogdump -p option correction Bruce Momjian <bruce@momjian.us>
  2016-12-27 04:28 ` Re: pg_xlogdump -p option correction Michael Paquier <michael.paquier@gmail.com>
  2017-01-07 01:02   ` Re: pg_xlogdump -p option correction Bruce Momjian <bruce@momjian.us>
  2017-01-07 12:50     ` Re: pg_xlogdump -p option correction Michael Paquier <michael.paquier@gmail.com>
  2017-01-07 16:20       ` Re: pg_xlogdump -p option correction Bruce Momjian <bruce@momjian.us>
  2017-01-08 06:27         ` Re: pg_xlogdump -p option correction Michael Paquier <michael.paquier@gmail.com>
  2017-01-09 19:32           ` Re: pg_xlogdump -p option correction Bruce Momjian <bruce@momjian.us>
  2017-01-09 22:22             ` Re: pg_xlogdump -p option correction Michael Paquier <michael.paquier@gmail.com>
@ 2017-01-11 03:38               ` Bruce Momjian <bruce@momjian.us>
  0 siblings, 0 replies; 9+ messages in thread

From: Bruce Momjian @ 2017-01-11 03:38 UTC (permalink / raw)
  To: Michael Paquier <michael.paquier@gmail.com>; +Cc: pgsql-docs

On Tue, Jan 10, 2017 at 07:22:17AM +0900, Michael Paquier wrote:
> On Tue, Jan 10, 2017 at 4:32 AM, Bruce Momjian <bruce@momjian.us> wrote:
> > On Sun, Jan  8, 2017 at 03:27:59PM +0900, Michael Paquier wrote:
> >> >> +        subdirectory of both the current directory and the
> >> >> +        <envar>PGDATA</envar> directory.
> >> >> This could say "of both the current directory and *then* the PGDATA
> >> >> directory" to outline the order of the actions taken by the check
> >> >> routine. Just my 2c on the matter.
> >> >
> >> > Ah, I see your point.  I ended up rewording the text to be more explicit
> >> > about the supplied argument and "searching".  Updated patch attached.
> >>
> >> -        Directory in which to find log segment files.  The default is to search
> >> -        for them in the <literal>pg_wal</literal> subdirectory of the current
> >> -        directory.
> >> +        Specifies a directory in which to find log segment files.
> >> +        In addition, searches are performed in the current directory,
> >> +        and the <literal>pg_wal</literal> subdirectory of both the current
> >> +        directory and the <envar>PGDATA</envar> directory.
> >> Hm. This still misses the point that the lookup at PGDATA is done only
> >> if no directory is defined. What do you think about the patch attached
> >> that lists the five possible patterns: 2 for the case where a
> >> directory is defined, and 3 for the default case.
> >
> > Understood.  Here is an updated patch which incorporates your
> > suggestions.
> 
> Thanks. This looks good to me.

Slightly modified version applied and backpatched to 9.6 (use pg_xlog). 
Thanks for your help.

-- 
  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 +


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



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


end of thread, other threads:[~2017-01-11 03:38 UTC | newest]

Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-12-26 21:56 pg_xlogdump -p option correction Bruce Momjian <bruce@momjian.us>
2016-12-27 04:28 ` Michael Paquier <michael.paquier@gmail.com>
2017-01-07 01:02   ` Bruce Momjian <bruce@momjian.us>
2017-01-07 12:50     ` Michael Paquier <michael.paquier@gmail.com>
2017-01-07 16:20       ` Bruce Momjian <bruce@momjian.us>
2017-01-08 06:27         ` Michael Paquier <michael.paquier@gmail.com>
2017-01-09 19:32           ` Bruce Momjian <bruce@momjian.us>
2017-01-09 22:22             ` Michael Paquier <michael.paquier@gmail.com>
2017-01-11 03:38               ` 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