BUG #2258: debug_print_plan doesn't work for cursors

From: "James Gray" <jim(dot)gray(at)bull(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2258: debug_print_plan doesn't work for cursors
Date: 2006-02-13 17:52:18
Message-ID: 20060213175218.247CDF0B05@svr2.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 2258
Logged by: James Gray
Email address: jim(dot)gray(at)bull(dot)com
PostgreSQL version: 8.1.2
Operating system: Linux/Windows
Description: debug_print_plan doesn't work for cursors
Details:

Feature request: Allow debug_print_plan to produce log output for DECLARE
CURSOR statements (or on the first FETCH). The TODO FAQ does not list this
feature, nor does the mail archives discuss it. Looking at the Postgres
source for pg_plan_query() shows that DECLARE CURSOR is considered a utility
command, and currently does not produce log output for debug_print_plan.
However, EXPLAIN does allow a DECLARE CURSOR statement using a further
statement type check. We have a large customer/application with performance
problems related to a few of a large number of embedded cursors, and this
feature would help isolate the problem more rapidly. The cursors are all of
the type for which SPI_IS_CURSOR_PLAN would return TRUE. We could do a
Postgres source change ourselves, but we are not sure that it is as simple
as adding: if (Debug_print_plan) elog_node_display(DEBUG1, "plan", plan,
debug_pretty_print) after the call to planner() in the routine
PerformCursorOpen().

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrew Klosterman 2006-02-13 19:35:49 Re: BUG #2246: Bad malloc interactions: ecpg, openssl
Previous Message Evgeny Gridasov 2006-02-13 15:01:36 BUG #2257: Can' stop server while autovacuum is running