Re: [GENERAL] Unlogged Crash Detection
От
Andres Freund
Тема
Re: [GENERAL] Unlogged Crash Detection
Дата
Msg-id
20170829140941.oxdgu5b3ukutcgga@alap3.anarazel.de
Ответ на
Re: [GENERAL] Unlogged Crash Detection (Michael Paquier)
Список
Дерево обсуждения
[GENERAL] Unlogged Crash Detection Gersner <gersner@gmail.com>
Re: [GENERAL] Unlogged Crash Detection Michael Paquier <michael.paquier@gmail.com>
Re: [GENERAL] Unlogged Crash Detection Gersner <gersner@gmail.com>
Re: [GENERAL] Unlogged Crash Detection Michael Paquier <michael.paquier@gmail.com>
Re: [GENERAL] Unlogged Crash Detection Andres Freund <andres@anarazel.de>
Re: [GENERAL] Unlogged Crash Detection Michael Paquier <michael.paquier@gmail.com>
On 2017-08-29 20:19:52 +0900, Michael Paquier wrote: > On Tue, Aug 29, 2017 at 6:06 PM, Gersner wrote: > > I see, interesting. > > Please do not top-post. This is not the recommended way of dealing > with threads on this mailing list. > > > We have lots of unlogged tables, upon a crash we want to create a > > feedback/alert that data disappeared. > > > > Not very familiar with the internal structure, but is it possible to > > identify if the current table is the INIT_FORKNUM? > > Using pg_relation_filepath, you can know the path to a relation file > on disk. So a simple idea would be to use pg_read_binary_file with the > path of the file and the path of the init fork, which is suffixed with > "_init", and then a comparison between both. If the data read is the > same, the relation has been untouched. Huh, but that's not particularly meaningful, is it? That'll just as well be the case for a freshly created relation, no? - Andres
В списке pgsql-general по дате отправления
От: Daniel Verite
Дата: