Re: BUG #16583: merge join on tables with different DB collation behind postgres_fdw fails

From: Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Neil Chen <carpenter(dot)nail(dot)cz(at)gmail(dot)com>
Subject: Re: BUG #16583: merge join on tables with different DB collation behind postgres_fdw fails
Date: 2021-07-13 11:07:41
Message-ID: CALtqXTdeSReq0Y1-mRAMO-SivqDRX_caamymdH9f=zsfLxsjow@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Wed, Mar 3, 2021 at 1:42 PM Neil Chen <carpenter(dot)nail(dot)cz(at)gmail(dot)com>
wrote:

> The following review has been posted through the commitfest application:
> make installcheck-world: tested, passed
> Implements feature: tested, passed
> Spec compliant: not tested
> Documentation: tested, passed
>
> Greetings,
> I learned about the patch and read your discussions. I'm not sure why this
> patch has not been discussed now. In short, I think it's beneficial to
> submit it as a temporary solution.
> Another thing I want to know is whether these codes can be simplified:
> - if (state > outer_cxt->state)
> + if (collation == outer_cxt->collation &&
> + ((state == FDW_COLLATE_UNSAFE &&
> + outer_cxt->state == FDW_COLLATE_SAFE) ||
> + (state == FDW_COLLATE_SAFE &&
> + outer_cxt->state == FDW_COLLATE_UNSAFE)))
> + {
> + outer_cxt->state = FDW_COLLATE_SAFE;
> + }
> + else if (state > outer_cxt->state)
>
> If the state is determined by the collation, when the collations are
> equal, do we just need to judge the state not equal to FDW_COLLATE_NONE?

The patch is failing the regression, @Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> can you
please take a look at that.

https://cirrus-ci.com/task/4593497492684800

============== running regression test queries ==============
test postgres_fdw ... FAILED 2782 ms
============== shutting down postmaster ==============
======================
1 of 1 tests failed.
======================
The differences that caused some tests to fail can be viewed in the
file "/tmp/cirrus-ci-build/contrib/postgres_fdw/regression.diffs". A copy
of the test summary that you see
above is saved in the file
"/tmp/cirrus-ci-build/contrib/postgres_fdw/regression.out".

--
Ibrar Ahmed

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Lætitia Avrot 2021-07-13 13:33:41 Re: Statistics updates is delayed when using `commit and chain`
Previous Message PG Bug reporting form 2021-07-13 09:15:17 BUG #17103: WAL segments are not removed after exceeding max_slot_wal_keep_size

Browse pgsql-hackers by date

  From Date Subject
Next Message gkokolatos 2021-07-13 11:16:06 Re: Introduce pg_receivewal gzip compression tests
Previous Message Amit Kapila 2021-07-13 10:57:34 Re: row filtering for logical replication