Re: exceptional result of postres_fdw external table joining local table

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Qu, Mischa, Majorel China" <mischa(dot)qu(at)majorel(dot)cn>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: exceptional result of postres_fdw external table joining local table
Date: 2023-02-06 15:34:24
Message-ID: 2665266.1675697664@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Qu, Mischa, Majorel China" <mischa(dot)qu(at)majorel(dot)cn> writes:
> But when I run some full table scans and found a problems. the results of the following sql were different.

> Method 1: directly join external table and local table
> select count(distinct user_id),count(distinct member_code)
> from a_fdw t1
> join b as t6 on t1.user_id=t6.tags ->> '10'::varchar(50)
> where coalesce(user_id,'') <> '';
> -- result: 50739 50845

What sort of plan is that query using? If it's a merge join, I'd
bet that the problem is related to local and remote servers not
having the same default collation.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2023-02-06 15:39:59 Re: BUG #17776: Connections are terminated unexpectedly sometimes
Previous Message Alvaro Herrera 2023-02-06 15:22:09 Re: WAL segments removed from primary despite the fact that logical replication slot needs it.