Re: How to find the latest (partial) WAL file

Поиск
Список
Период
Сортировка
От Just Someone
Тема Re: How to find the latest (partial) WAL file
Дата
Msg-id 36932f270604101710t7a401676ue118a3d11e8a9060@mail.gmail.com
обсуждение исходный текст
Ответ на Re: How to find the latest (partial) WAL file  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi Tom,

> If you sort first by mtime and second by file name you should find the
> right one in all cases, ie, take the latest mtime among the
> properly-named files, breaking ties by taking the higher filename.
>
> It'd probably be better if we had a function to report this, but
> you can get along without one.

For now I'm using ls with grep:
LAST_WAL=$(/bin/ls -t1p $WAL_DIR | /bin/grep -v / | /bin/grep -v
backup | /usr/bin/head -1)

But a pg function for that would be great.

Regards,

Guy Naor.

--
Family management on rails: http://www.famundo.com - coming soon!
My development related blog: http://devblog.famundo.com

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Workaround for custom aggregate which would need "internal" as statetype
Следующее
От: "Wei Wei"
Дата:
Сообщение: Re: Date & Time with time zone