Re: Failed to delete old ReorderBuffer spilled files - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Failed to delete old ReorderBuffer spilled files
Date
Msg-id CAB7nPqQP52cLEUZJv-1MoCiejNYQ4CGs=tzwhP2oEErvv7R3Bg@mail.gmail.com
Whole thread Raw
In response to Re: Failed to delete old ReorderBuffer spilled files  (Craig Ringer <craig@2ndquadrant.com>)
Responses Re: Failed to delete old ReorderBuffer spilled files  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
List pgsql-hackers
On Wed, Nov 22, 2017 at 11:49 AM, Craig Ringer <craig@2ndquadrant.com> wrote:
> On 20 November 2017 at 18:35, atorikoshi
> <torikoshi_atsushi_z2@lab.ntt.co.jp> wrote:
>> I put many queries into one transaction and made ReorderBuffer spill
>> data to disk, and sent SIGKILL to postgres before the end of the
>> transaction.
>>
>> After starting up postgres again, I observed the files spilled to
>> data wasn't deleted.
>
> Since this can only happen  on crash exits, and the reorderbuffer data is
> useless after a decoding backend exits, why don't we just recursively delete
> the tree contents on Pg startup?

+1. You would just need an extra step after say
DeleteAllExportedSnapshotFiles() in startup.c. Looks saner to me do so
so as well.
-- 
Michael


pgsql-hackers by date:

Previous
From: Vicky Vergara
Date:
Subject: generic-msvc.h(91): error C2664
Next
From: Kyotaro HORIGUCHI
Date:
Subject: Re: [HACKERS] More stats about skipped vacuums