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 6469.1507301661@sss.pgh.pa.us
Whole thread Raw
In response to Re: [BUGS] BUG #14845: postgres_fdw and mysql_fdw can cause crash of instance  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
Responses Re: [BUGS] BUG #14845: postgres_fdw and mysql_fdw can cause crash of instance
List pgsql-bugs
Fabrízio de Royes Mello <fabriziomello@gmail.com> writes:
>> I work from time to time with postgres_fdw and mysql_fdw and they both seem
>> to have the same problem - they use too much memory if I query huge remote
>> tables.

> Would be nice if you can provide to us a reproducible test case, so we can
> try to figure out what's happen...

Indeed.  I can't say about mysql_fdw, but postgres_fdw is only supposed to
fetch 100 rows at a time (cf fetch_size option), so it shouldn't run out
of memory just because the amount of data to be fetched is large.

One idea is that, because the planner lacks information about the remote
table, it picks some stupid plan that ends up blowing out memory.  In that
case, perhaps turning on use_remote_estimate would help.  But we're just
guessing here due to lack of useful detail.
        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: Tom Lane
Date:
Subject: Re: [BUGS] BUG #14844: Failure/Duplicate key value with ALTER DATABASE set search_path
Next
From: Tom Lane
Date:
Subject: Re: [BUGS] postgresql-10.0/src/bin/psql/mainloop.c:465: suspicious condition ?