Re: cleanup temporary files after crash - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: cleanup temporary files after crash
Date
Msg-id 5e704f3b-15c2-1970-c810-f4d3d0b59074@enterprisedb.com
Whole thread Raw
In response to Re: cleanup temporary files after crash  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Responses Re: cleanup temporary files after crash
List pgsql-hackers
On 3/19/21 5:26 PM, Tomas Vondra wrote:
> On 3/19/21 5:23 PM, Tomas Vondra wrote:
>> ...
>>
>> If I replace this with a wait loop in a plpgsql block, that works
>> perfectly fine (no infinite loops). Tested both on x86_64 and rpi.
>>
> 
> For the record, here's the version with plpgsql block, which seems to be
> working just fine.
> 

I've pushed this version, with the plpgsql block. I've tested it on all
the machines I have here, hopefully it'll make buildfarm happy too.

AFAICS I was mistaken about what the pump() functions do - it clearly
does not run the command repeatedly, it just waits for the right output
to appear. So a busy loop in plpgsql seems like a reasonable solution.
Perhaps there's a better way to do this in TAP, not sure.

My brain hurts from reading too much Perl today ...


regards

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Maxim Orlov
Date:
Subject: Failed assertion on standby while shutdown
Next
From: Tom Lane
Date:
Subject: Bringing some sanity to RestoreGUCState()