| From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
|---|---|
| To: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | 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 10:17:08 |
| Message-ID: | da7da2f6-bb58-d271-1a5e-feb31ad5282b@2ndquadrant.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 2020-01-24 01:21, Thomas Munro wrote:
> 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().
The calls to this function are all conditional on
!get_collation_isdeterministic(). The comment should perhaps be changed.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fabien COELHO | 2020-01-24 10:56:27 | Re: [PoC] Non-volatile WAL buffer |
| Previous Message | Peter Eisentraut | 2020-01-24 10:15:54 | Re: Busted(?) optimization in ATAddForeignKeyConstraint |