From: Tom Lane <tgl@sss.pgh.pa.us>
To: fabriziomello@gmail.com
Cc: josef.machytka@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 10:54:21 -0400
Message-ID: <6469.1507301661@sss.pgh.pa.us> (raw)
In-Reply-To: <CAFcNs+qAF-Y-J=a2SkCdf1ahgBv2Pe8TvLW_y79Vg=wh=T511Q@mail.gmail.com>
References: <20171006112426.14640.55619@wrigleys.postgresql.org>
<CAFcNs+qAF-Y-J=a2SkCdf1ahgBv2Pe8TvLW_y79Vg=wh=T511Q@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
=?UTF-8?Q?Fabr=C3=ADzio_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
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, fabriziomello@gmail.com, josef.machytka@gmail.com
Subject: Re: BUG #14845: postgres_fdw and mysql_fdw can cause crash of instance
In-Reply-To: <6469.1507301661@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>
* 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