Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQfgb-00014w-MO for pgsql-docs@arkaria.postgresql.org; Mon, 09 Jan 2017 19:32:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cQfga-0003U7-Hu for pgsql-docs@arkaria.postgresql.org; Mon, 09 Jan 2017 19:32:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cQfgE-00035P-3V for pgsql-docs@postgresql.org; Mon, 09 Jan 2017 19:32:30 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cQfgA-0007G2-Iz for pgsql-docs@postgresql.org; Mon, 09 Jan 2017 19:32:29 +0000 Received: from bruce by momjian.us with local (Exim 4.84_2) (envelope-from ) id 1cQfg7-0006oD-Qz; Mon, 09 Jan 2017 14:32:23 -0500 Date: Mon, 9 Jan 2017 14:32:23 -0500 From: Bruce Momjian To: Michael Paquier Cc: PostgreSQL-documentation Subject: Re: pg_xlogdump -p option correction Message-ID: <20170109193223.GA19680@momjian.us> References: <20161226215604.GA24784@momjian.us> <20170107010257.GB3164@momjian.us> <20170107162059.GE3164@momjian.us> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="LZvS9be/3tNcYl/X" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -5.1 (-----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org --LZvS9be/3tNcYl/X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Jan 8, 2017 at 03:27:59PM +0900, Michael Paquier wrote: > >> + subdirectory of both the current directory and the > >> + PGDATA 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 pg_wal 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 pg_wal subdirectory of both the current > + directory and the PGDATA 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 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 + --LZvS9be/3tNcYl/X Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="xlogdump.diff" 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 **** ! Directory in which to find log segment files. The default is to search ! for them in the pg_wal subdirectory of the current ! directory. --- 117,128 ---- ! Specifies a directory to search for log segment files or a ! directory with a pg_wal subdirectory that ! contains such files. The default is to search in the current ! directory, the pg_wal subdirectory of the ! current directory, and the pg_wal subdirectory ! of PGDATA. 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")); --LZvS9be/3tNcYl/X Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs --LZvS9be/3tNcYl/X--