> > You are correct. I didn't realized that after I check the shared memory
> > for the pid, another backend could start with the pid I was checking and
> > create a sort file. The sort code doesn't do O_EXCL,
>
> ... quite deliberately ... you might want to add a comment to that
> effect in OpenTemporaryFile.
Done.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026