pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Lakhin <exclusion@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org, Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Subject: Re: BUG #17872: Dropping an attribute of a composite type breaks indexes over the type silently
Date: Mon, 27 Mar 2023 14:20:13 -0400
Message-ID: <3267914.1679941213@sss.pgh.pa.us> (raw)
In-Reply-To: <1aa2eec0-2017-3870-6d88-228d08c587d3@gmail.com>
References: <17872-d0fbb799dc3fd85d@postgresql.org>
	<3169550.1679928579@sss.pgh.pa.us>
	<3182314.1679935605@sss.pgh.pa.us>
	<1aa2eec0-2017-3870-6d88-228d08c587d3@gmail.com>

Alexander Lakhin <exclusion@gmail.com> writes:
> Yes, I think something like that can resolve the issue.
> But I would also note that the problem is not with indexes only, but also
> with "... partition by list(comp_type_value)", for example.

Hmm ... really?  I'd just concluded that a partitioned table is okay
as long as it doesn't yet have any partitions.  Even if the modified
type is a partitioning column, there's no structure yet that could
depend on the contents of the type.  (If it does have partitions,
we'll fail when we get to one of those.)

[ thinks some more... ] I guess there's the corner case where we
replace, say, a hashable type with a non-hashable one and thereby
break decisions about whether PARTITION BY HASH is allowable.
That's kind of a stretch.  But find_composite_type_dependencies
currently rejects partitioned tables, so we're not taking away any
functionality if we continue to forbid that.

			regards, tom lane





view thread (9+ messages)  latest in thread

Message-ID: <3267914.1679941213@sss.pgh.pa.us>
Permalink:  ../3267914.1679941213@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3267914.1679941213@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, exclusion@gmail.com, peter.eisentraut@enterprisedb.com
  Subject: Re: BUG #17872: Dropping an attribute of a composite type breaks indexes over the type silently
  In-Reply-To: <3267914.1679941213@sss.pgh.pa.us>

* 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