Re: jsonb, collection & postgres_fdw - Mailing list pgsql-hackers

From Bharath Rupireddy
Subject Re: jsonb, collection & postgres_fdw
Date
Msg-id CALj2ACXGs_wSCwaAQ6VZ7gbXEkWPjnQV5DeccGsm0k3m+CKDZw@mail.gmail.com
Whole thread Raw
In response to jsonb, collection & postgres_fdw  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
Responses Re: jsonb, collection & postgres_fdw  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
List pgsql-hackers
On Thu, Aug 13, 2020 at 8:54 PM Konstantin Knizhnik
<k.knizhnik@postgrespro.ru> wrote:
>
> Right now jsonb functions are treated as non-shippable by postgres_fdw
> and so predicates with them are not pushed down to foreign server:
>
> I wonder if there is some way of making postgres_fdw to push this this
> function to foreign server?
> May be this check should be changed to:
>
>                  if (fe->inputcollid == InvalidOid || inner_cxt.state ==
> FDW_COLLATE_NONE)
>                       /* OK, inputs are all noncollatable */ ;
>

I think, in general, we may want to push the some of the local
functions that may filter out tuples/rows to remote backend to reduce
the data transfer(assuming collation and other settings are similar to
that of the local backend), but definitely, not this way. One possible
issue could be that, what if these functions are supported/installed
on the local server, but not on the remote? May be because the remote
postgres server version is different than that of the local? Is there
a version check between local and remote servers in postgres_fdw?

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: Terminate the idle sessions
Next
From: Konstantin Knizhnik
Date:
Subject: Re: jsonb, collection & postgres_fdw