Re: Busted(?) optimization in ATAddForeignKeyConstraint

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Busted(?) optimization in ATAddForeignKeyConstraint
Date: 2020-01-24 00:21:11
Message-ID: CA+hUKG+KLCKGoFQsfVU-++BU3+0Eodw6PH+HrmA8G9aZK+zCNg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 24, 2020 at 11:12 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> I happened to notice this comment in the logic in
> ATAddForeignKeyConstraint that tries to decide if it can skip
> revalidating a foreign-key constraint after a DDL change:
>
> * Since we require that all collations share the same notion of
> * equality (which they do, because texteq reduces to bitwise
> * equality), we don't compare collation here.
>
> Hasn't this been broken by the introduction of nondeterministic
> collations?

Similar words appear in the comment for ri_GenerateQualCollation().

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2020-01-24 00:27:40 Re: making the backend's json parser work in frontend code
Previous Message Tom Lane 2020-01-23 22:11:57 Busted(?) optimization in ATAddForeignKeyConstraint