How do I avoid race conditions when appending to a file?
问题 I'm looking at using PipelineDB for analytics. For data warehousing I want to append all new data to a file, and tail -F it into psql like the examples on the website. I have multiple data sources, so to get deterministic results, I'd like to append them all to the same input file, where they'll stay in the same order. Is there a simple, idiomatic way of avoiding race conditions? Something like a single-file server I can pipe data to? Edit: Actually, a race condition is exactly what I want .