Re: [BUGS] BUG #14845: postgres_fdw and mysql_fdw can cause crash of instance - Mailing list pgsql-bugs

From Tom Lane
Subject Re: [BUGS] BUG #14845: postgres_fdw and mysql_fdw can cause crash of instance
Date
Msg-id 9948.1507309286@sss.pgh.pa.us
Whole thread Raw
In response to Re: [BUGS] BUG #14845: postgres_fdw and mysql_fdw can cause crash of instance  (Josef Machytka <josef.machytka@gmail.com>)
Responses Re: [BUGS] BUG #14845: postgres_fdw and mysql_fdw can cause crash of instance
List pgsql-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

pgsql-bugs by date:

Previous
From: "Hans Buschmann"
Date:
Subject: Re: [BUGS] BUG #14844: Failure/Duplicate key value with ALTER DATABASE set search_path
Next
From: Andres Freund
Date:
Subject: Re: [BUGS] BUG #14843: CREATE TABLE churns through all memory,crashes db