pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: bchen90@163.com
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16771: Server process killed by signal 9, after recovery drop tablespace failed
Date: Fri, 25 Dec 2020 09:20:25 +0900 (JST)
Message-ID: <20201225.092025.358717070845212934.horikyota.ntt@gmail.com> (raw)
In-Reply-To: <16771-cbef7d97ba93f4b9@postgresql.org>
References: <16771-cbef7d97ba93f4b9@postgresql.org>

Hello.

At Fri, 11 Dec 2020 11:34:47 +0000, PG Bug reporting form <noreply@postgresql.org> wrote in 
> The following bug has been logged on the website:
> 
> Bug reference:      16771
> Logged by:          Bo Chen
> Email address:      bchen90@163.com
> PostgreSQL version: 11.8
> Operating system:   euleros v2r7 x86_64
> Description:        
> 
> hi 
> 
> I encounter a problem of  drop tablespace failed for reasion 'tablespace is
> not empty'. The problem occurs  in the following scenarios:
> 
> I start a transaction to create some table located in an alreaedy created
> tablespace, before the transaction commits, the process of creating data is
> killed by somebady with signal 9. when the database recoveried I try to drop
> the tablesapce, it failed for 'tablespace is not empty'.
> 
> Does this bug need to be resolved ?  

It seems to be a known behavior that hasn't been fixed for a long time.

It comes from a mechanism in PostgreSQL called "pending deletes", by
which deletion of underlynig files is delayed until commit/abort
time. Since the "to-be-deleted at abort" infomation is not persistent,
it should be lost if the server crashed before the transaction ends.

I happend to be proposing a patch [*1] for another issue and I
realized that the approach could solve this issue as well.

*1: https://www.postgresql.org/message-id/20201225.091252.53717619425847881.horikyota.ntt%40gmail.com

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center





view thread (2+ messages)

Message-ID: <20201225.092025.358717070845212934.horikyota.ntt@gmail.com>
Permalink:  ../20201225.092025.358717070845212934.horikyota.ntt@gmail.com/
Also on:    postgresql.org/message-id/20201225.092025.358717070845212934.horikyota.ntt@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: horikyota.ntt@gmail.com, bchen90@163.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #16771: Server process killed by signal 9, after recovery drop tablespace failed
  In-Reply-To: <20201225.092025.358717070845212934.horikyota.ntt@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox