[GENERAL] IO in constraint trigger

2015-07-19 Thread Andreas Joseph Krogh
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

Re: [GENERAL] IO in constraint trigger

2015-07-19 Thread Tom Lane
Andreas Joseph Krogh andr...@visena.com writes: 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. That seems broken on its