IO in constraint trigger

Поиск
Список
Период
Сортировка
От Andreas Joseph Krogh
Тема IO in constraint trigger
Дата
Msg-id VisenaEmail.1ba.9a77f7beb4b7eeed.14ea5ed30e4@tc7-visena
обсуждение исходный текст
Ответы Re: IO in constraint trigger  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi.
 
We're planning to move away from Blobs (stored as OID) and use files with path/URI stored in DB. For this to be reliable we're planning to do rename() (which is atomic) in a constraint trigger, which triggers on commit. The plan is to write stuff to a file (with at tmp-filename) in the application and to pass the absolute file-name down to the DB so the trigger can rename it ON COMMIT. This way we can use a naming-convention to figure out what files are OK and which are not (which can be deleted due to rolled back transactions).
 
I have found this extension: https://github.com/csimsek/pgsql-fio/
but it doesn't seem to support renaming.
 
Any advice on how to proceed?
 
Thanks.
 
--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
Вложения

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

Предыдущее
От: Rafal Pietrak
Дата:
Сообщение: Re: INSERT ... ON CONFLICT DO UPDATE
Следующее
От: Geoff Winkless
Дата:
Сообщение: Re: INSERT ... ON CONFLICT DO UPDATE