Re: [HACKERS] Re: [COMMITTERS] pgsql: Only try to push down foreign joins if the user mapping OIDs mat

2016-03-28 Thread Robert Haas
On Thu, Mar 17, 2016 at 2:26 AM, Ashutosh Bapat wrote: > On Wed, Mar 16, 2016 at 10:22 PM, Tom Lane wrote: >> Robert Haas writes: >> > On Wed, Mar 16, 2016 at 4:10 AM, Ashutosh Bapat < >> >

Re: [HACKERS] Re: [COMMITTERS] pgsql: Only try to push down foreign joins if the user mapping OIDs mat

2016-03-19 Thread Ashutosh Bapat
On Wed, Mar 16, 2016 at 10:22 PM, Tom Lane wrote: > Robert Haas writes: > > On Wed, Mar 16, 2016 at 4:10 AM, Ashutosh Bapat < > > ashutosh.ba...@enterprisedb.com> wrote: > >> In 9.5, postgres_fdw allowed to prepare statements involving foreign > >>

Re: [HACKERS] Re: [COMMITTERS] pgsql: Only try to push down foreign joins if the user mapping OIDs mat

2016-03-19 Thread Robert Haas
On Wed, Mar 16, 2016 at 4:10 AM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > > Now what's going on here? It seems to me that either postgres_fdw >> requires a user mapping (in which case this ought to fail) or it >> doesn't (in which case this ought to push the join down). I

Re: [HACKERS] Re: [COMMITTERS] pgsql: Only try to push down foreign joins if the user mapping OIDs mat

2016-03-19 Thread Tom Lane
Robert Haas writes: > On Wed, Mar 16, 2016 at 4:10 AM, Ashutosh Bapat < > ashutosh.ba...@enterprisedb.com> wrote: >> In 9.5, postgres_fdw allowed to prepare statements involving foreign >> tables without an associated user mapping as long as planning did not >> require the

Re: [HACKERS] Re: [COMMITTERS] pgsql: Only try to push down foreign joins if the user mapping OIDs mat

2016-03-16 Thread Ashutosh Bapat
On Wed, Mar 16, 2016 at 2:14 AM, Robert Haas wrote: > On Tue, Mar 15, 2016 at 6:44 AM, Ashutosh Bapat > wrote: > > Here's patch which fixes the issue using Robert's idea. > > Please at least check your patches with 'git diff --check'

Re: [HACKERS] Re: [COMMITTERS] pgsql: Only try to push down foreign joins if the user mapping OIDs mat

2016-03-15 Thread Robert Haas
On Tue, Mar 15, 2016 at 6:44 AM, Ashutosh Bapat wrote: > Here's patch which fixes the issue using Robert's idea. Please at least check your patches with 'git diff --check' before submitting them. And where it's not too much trouble, pgindent them. Or at least

Re: [HACKERS] Re: [COMMITTERS] pgsql: Only try to push down foreign joins if the user mapping OIDs mat

2016-03-15 Thread Ashutosh Bapat
Here's patch which fixes the issue using Robert's idea. On Mon, Mar 14, 2016 at 10:53 PM, Robert Haas wrote: > On Mon, Mar 14, 2016 at 1:05 PM, Tom Lane wrote: > > Robert Haas writes: > >> On Sun, Mar 13, 2016 at 10:51 PM, Tom

Re: [HACKERS] Re: [COMMITTERS] pgsql: Only try to push down foreign joins if the user mapping OIDs mat

2016-03-14 Thread Robert Haas
On Mon, Mar 14, 2016 at 1:05 PM, Tom Lane wrote: > Robert Haas writes: >> On Sun, Mar 13, 2016 at 10:51 PM, Tom Lane wrote: >>> I'm not really sold on enforcing that people create meaningless user >>> mappings. For one thing,

Re: [HACKERS] Re: [COMMITTERS] pgsql: Only try to push down foreign joins if the user mapping OIDs mat

2016-03-14 Thread Tom Lane
Robert Haas writes: > On Sun, Mar 13, 2016 at 10:51 PM, Tom Lane wrote: >> I'm not really sold on enforcing that people create meaningless user >> mappings. For one thing, they're likely to be sloppy about it, which >> could lead to latent security

Re: [HACKERS] Re: [COMMITTERS] pgsql: Only try to push down foreign joins if the user mapping OIDs mat

2016-03-14 Thread Robert Haas
On Sun, Mar 13, 2016 at 10:51 PM, Tom Lane wrote: > Etsuro Fujita writes: >> On 2016/03/13 4:46, Andres Freund wrote: >>> ... The difference apears to be the >>> check that's now in build_simple_rel() - there was nothing hitting the >>> user

Re: [HACKERS] Re: [COMMITTERS] pgsql: Only try to push down foreign joins if the user mapping OIDs mat

2016-03-14 Thread Ashutosh Bapat
On Mon, Mar 14, 2016 at 8:21 AM, Tom Lane wrote: > Etsuro Fujita writes: > > On 2016/03/13 4:46, Andres Freund wrote: > >> ... The difference apears to be the > >> check that's now in build_simple_rel() - there was nothing hitting the > >> user

Re: [HACKERS] Re: [COMMITTERS] pgsql: Only try to push down foreign joins if the user mapping OIDs mat

2016-03-13 Thread Etsuro Fujita
On 2016/03/14 11:51, Tom Lane wrote: > Etsuro Fujita writes: >> On 2016/03/13 4:46, Andres Freund wrote: >>> ... The difference apears to be the >>> check that's now in build_simple_rel() - there was nothing hitting the >>> user mapping code before for file_fdw. >>

Re: [HACKERS] Re: [COMMITTERS] pgsql: Only try to push down foreign joins if the user mapping OIDs mat

2016-03-13 Thread Tom Lane
Etsuro Fujita writes: > On 2016/03/13 4:46, Andres Freund wrote: >> ... The difference apears to be the >> check that's now in build_simple_rel() - there was nothing hitting the >> user mapping code before for file_fdw. > Exactly. > I'm not sure it's worth

Re: [HACKERS] Re: [COMMITTERS] pgsql: Only try to push down foreign joins if the user mapping OIDs mat

2016-03-13 Thread Etsuro Fujita
Hi, On 2016/03/13 4:46, Andres Freund wrote: On 2016-03-12 11:56:24 -0500, Robert Haas wrote: On Fri, Mar 11, 2016 at 10:15 PM, Andres Freund wrote: On 2016-01-28 19:09:01 +, Robert Haas wrote: Only try to push down foreign joins if the user mapping OIDs match.

[HACKERS] Re: [COMMITTERS] pgsql: Only try to push down foreign joins if the user mapping OIDs mat

2016-03-12 Thread Andres Freund
Hi, On 2016-03-12 11:56:24 -0500, Robert Haas wrote: > On Fri, Mar 11, 2016 at 10:15 PM, Andres Freund wrote: > > On 2016-01-28 19:09:01 +, Robert Haas wrote: > >> Only try to push down foreign joins if the user mapping OIDs match. > >> > >> Previously, the foreign join

[HACKERS] Re: [COMMITTERS] pgsql: Only try to push down foreign joins if the user mapping OIDs mat

2016-03-12 Thread Robert Haas
On Fri, Mar 11, 2016 at 10:15 PM, Andres Freund wrote: > On 2016-01-28 19:09:01 +, Robert Haas wrote: >> Only try to push down foreign joins if the user mapping OIDs match. >> >> Previously, the foreign join pushdown infrastructure left the question >> of security entirely

[HACKERS] Re: [COMMITTERS] pgsql: Only try to push down foreign joins if the user mapping OIDs mat

2016-03-11 Thread Andres Freund
Hi, On 2016-01-28 19:09:01 +, Robert Haas wrote: > Only try to push down foreign joins if the user mapping OIDs match. > > Previously, the foreign join pushdown infrastructure left the question > of security entirely up to individual FDWs, but it would be easy for > a foreign data wrapper to