Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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

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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group