Hi, On 2017-11-27 22:25:12 +1300, Thomas Munro wrote: Pushed 0003-Add-infrastructure-for-sharing-temporary-files-betwe.patch after minor adjustments (some including conversing with you).
Changes: - Changed an impossible elog() into an Assert(). - changed SharedFileSet->counter, and the backend static variable, to uint32. Not impossible that a 32bit int overflows over the course of a few weeks, and we a) imo shouldn't unnecessarily rely on signed overflow being defined b) a negative number would look weird, even if well defined (-fwrapv et al). - Added a small comment about arbitrary-ness of the 8 in Oid tablespaces[8]. - pgindent'ed Questions: - Right now RemovePgTempFilesInDir() will recurse into appropriately named directories, and when it recurses it doesn't require the same name pattern checks. I think that's good, but I think it'd be prudent to be a bit more paranoid and prevent recursing into symlinked subdirectories. - As we don't clean temp files after crash-restarts it isn't impossible to have a bunch of crash-restarts and end up with pids *and* per-pid shared file set counters reused. Which'd lead to conflicts. Do we care? Greetings, Andres Freund