Re: auto_explain & FDW - Mailing list pgsql-general

From Albe Laurenz
Subject Re: auto_explain & FDW
Date
Msg-id A737B7A37273E048B164557ADEF4A58B17BC1831@ntex2010a.host.magwien.gv.at
Whole thread Raw
In response to auto_explain & FDW  (David Greco <David_Greco@harte-hanks.com>)
Responses Re: auto_explain & FDW  (David Greco <David_Greco@harte-hanks.com>)
List pgsql-general
David Greco wrote:
> In my development environment, I am using the auto_explain module to help debug queries the developers
> complain about being slow. I am also using the oracle_fdw to perform queries against some oracle
> servers. These queries are generally very slow and the application allows them to be. The trouble is
> that it appears auto_explain kicks in on the query to try and explain them when they take longer than
> the configured threshold.  In this particular case, the Oracle user is very locked down and cannot
> actually perform an explain. Therefore an error gets raised to the client.
> 
> I would suggest one of two things- either make the error that gets raised simply be a notice/warning,
> or preferably just add an option to auto_explain to enable/disable its operation on queries involving
> foreign servers.

I'm reluctant to change oracle_fdw to not throw an error if
it doesn't have the permission to explain the query when
you ask it to --- for one, what should it return in that case?

I'd say that the solution in this case would be to temporarily
allow the user to query the necessary Oracle catalogs.
If you debug in a production scenario, you'll have to make
compromises (similar to granting the PLUSTRACE role if you want
to use AUTOTRACE with SQL*Plus).

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: Jiří Pavlovský
Date:
Subject: Re: utf8 errors
Next
From: hubert depesz lubaczewski
Date:
Subject: Why are there no inequality scans for ctid?