Re: debug_print_plan (pg7.4) doesn't seem to do anything

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Eric Brown <eric(dot)brown(at)propel(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: debug_print_plan (pg7.4) doesn't seem to do anything
Date: 2004-12-29 22:28:36
Message-ID: 18294.1104359316@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Eric Brown <eric(dot)brown(at)propel(dot)com> writes:
> I thought setting debug_print_plan was supposed to explain every query
> in my log file? I don't see the plan print either.

No, it just prints the plan. With settings like yours I get

DEBUG: StartTransactionCommand
LOG: statement: select 2+2;
DEBUG: parse tree:
DETAIL: {QUERY :commandType 1 :querySource 0 :canSetTag true :utilityStmt <>
:resultRelation 0 :into <> :hasAggs false :hasSubLinks false :rtable <>
:jointree {FROMEXPR :fromlist <> :quals <>} :rowMarks () :targetList
({TARGETENTRY :resdom {RESDOM :resno 1 :restype 23 :restypmod -1 :resname
?column? :ressortgroupref 0 :resorigtbl 0 :resorigcol 0 :resjunk false} :expr
{OPEXPR :opno 551 :opfuncid 0 :opresulttype 23 :opretset false :args ({CONST
:consttype 23 :constlen 4 :constbyval true :constisnull false :constvalue 4 [
0 0 0 2 ]} {CONST :consttype 23 :constlen 4 :constbyval true :constisnull
false :constvalue 4 [ 0 0 0 2 ]})}}) :groupClause <> :havingQual <>
:distinctClause <> :sortClause <> :limitOffset <> :limitCount <>
:setOperations <> :resultRelations ()}

DEBUG: plan:
DETAIL: {RESULT :startup_cost 0.00 :total_cost 0.01 :plan_rows 1 :plan_width 0
:targetlist ({TARGETENTRY :resdom {RESDOM :resno 1 :restype 23 :restypmod -1
:resname ?column? :ressortgroupref 0 :resorigtbl 0 :resorigcol 0 :resjunk
false} :expr {CONST :consttype 23 :constlen 4 :constbyval true :constisnull
false :constvalue 4 [ 0 0 0 4 ]}}) :qual <> :lefttree <> :righttree <>
:initPlan <> :extParam () :allParam () :nParamExec 0 :resconstantqual <>}

DEBUG: PortalRun
DEBUG: CommitTransactionCommand
LOG: duration: 7.439 ms

Maybe you forgot "pg_ctl reload" after changing your config?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-12-29 22:33:18 Re: pg_dump and pgpool
Previous Message Christopher Browne 2004-12-29 22:28:34 Re: BCD format