Re: debug_print_plan (pg7.4) doesn't seem to do anything - Mailing list pgsql-general

From Tom Lane
Subject Re: debug_print_plan (pg7.4) doesn't seem to do anything
Date
Msg-id 18294.1104359316@sss.pgh.pa.us
Whole thread Raw
In response to debug_print_plan (pg7.4) doesn't seem to do anything  (Eric Brown <eric.brown@propel.com>)
Responses Re: debug_print_plan (pg7.4) doesn't seem to do anything
List pgsql-general
Eric Brown <eric.brown@propel.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

pgsql-general by date:

Previous
From: "Ed L."
Date:
Subject: WARNING: group with ID NNN does not exist
Next
From: Tom Lane
Date:
Subject: Re: pg_dump and pgpool