Re: handle tablespaces for partitioned tables during ALTER DATABASE

From: Andres Freund <andres(at)anarazel(dot)de>
To: postgres(at)jasonk(dot)me
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: handle tablespaces for partitioned tables during ALTER DATABASE
Date: 2020-03-24 19:23:59
Message-ID: 20200324192359.yw7q5rlfqqxoktl6@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

On 2020-03-23 23:26:08 -0700, postgres(at)jasonk(dot)me wrote:
> Normally, you are not allowed to `ALTER DATABASE ... SET TABLESPACE` when the
> target tablespace is in use by a table in the database. However, this check
> doesn't seem to apply to partitioned tables, and that can lead to unexpected
> behavior.

I don't immediately see what problem this could cause? There's no
physical file associated with a partitioned table, it's "just" a
template for new partitions of that partitioned table.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message postgres 2020-03-25 03:31:32 Fwd: Re: handle tablespaces for partitioned tables during ALTER DATABASE
Previous Message PG Bug reporting form 2020-03-24 17:46:33 BUG #16316: The application has lost the database connection: