Re: [DOCS] pg_xlogdump -p option correction

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [DOCS] pg_xlogdump -p option correction
Дата
Msg-id CAB7nPqTW2iH70tJkhu8U9AUmVKB43gR0FvODmctqS=+fjuuzhA@mail.gmail.com
обсуждение исходный текст
Ответы Re: [DOCS] pg_xlogdump -p option correction  (Bruce Momjian <bruce@momjian.us>)
Список 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


В списке pgsql-docs по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: [DOCS] pg_xlogdump -p option correction
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [DOCS] Error when trying to start server