pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Josef Machytka <josef.machytka@gmail.com>
Cc: fabriziomello@gmail.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14845: postgres_fdw and mysql_fdw can cause crash of instance
Date: Fri, 06 Oct 2017 13:01:26 -0400
Message-ID: <9948.1507309286@sss.pgh.pa.us> (raw)
In-Reply-To: <CAGvVEFtBaaDESMoBzAzrB+b5AWVg2QJFy50-tgfRCDus+92ZKg@mail.gmail.com>
References: <20171006112426.14640.55619@wrigleys.postgresql.org>
	<CAFcNs+qAF-Y-J=a2SkCdf1ahgBv2Pe8TvLW_y79Vg=wh=T511Q@mail.gmail.com>
	<6469.1507301661@sss.pgh.pa.us>
	<CAGvVEFtBaaDESMoBzAzrB+b5AWVg2QJFy50-tgfRCDus+92ZKg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Josef Machytka <josef.machytka@gmail.com> writes:
> In this case which went wrong I used postgres_fdw to compare data on local
> and remote database using "select all from remote except select all from
> local".

I think my theory B probably applies then: without use_remote_estimate,
the planner would not guess that the remote table is huge, and that could
well allow it to pick a hashed EXCEPT implementation --- which will then
try to collect the entire remote table into an in-memory hash table.

I don't know whether mysql_fdw has a comparable switch, but in any case
if it wasn't turned on then the same failure mode could apply to that FDW.

I wonder if we should rethink the default setting of use_remote_estimate
being "off".  Particularly as we keep on allowing postgres_fdw to consider
more different plan types, it seems like the potential for stupid plan
choices is getting worse all the time.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (8+ messages)  latest in thread

Message-ID: <9948.1507309286@sss.pgh.pa.us>
Permalink:  ../9948.1507309286@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9948.1507309286@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, josef.machytka@gmail.com, fabriziomello@gmail.com
  Subject: Re: BUG #14845: postgres_fdw and mysql_fdw can cause crash of instance
  In-Reply-To: <9948.1507309286@sss.pgh.pa.us>
  References: <20171006112426.14640.55619@wrigleys.postgresql.org> <CAFcNs+qAF-Y-J=a2SkCdf1ahgBv2Pe8TvLW_y79Vg=wh=T511Q@mail.gmail.com> <6469.1507301661@sss.pgh.pa.us> <CAGvVEFtBaaDESMoBzAzrB+b5AWVg2QJFy50-tgfRCDus+92ZKg@mail.gmail.com> <9948.1507309286@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox