Re: Postgres csv logging

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Alessandro_feliz <Alessandro_feliz(at)hotmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Postgres csv logging
Date: 2017-07-21 22:42:04
Message-ID: CAKFQuwYnAWh5abOs2oH9OmZ3aCQiDnqu1DS9SPSJJMvuVgHZBQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

It is customary to indicate when you've posted the same question to other
forums - in this case SO.

https://dba.stackexchange.com/questions/180263/postgres-log-query-and-command-tag-to-csv

As the comment there says your config and your output seem at odds. Though
I think your confusion is still adequately represented.

On Wed, Jul 19, 2017 at 4:41 PM, Alessandro_feliz <
Alessandro_feliz(at)hotmail(dot)com> wrote:

> Why is the first line, that has the query executed, saying that the command
> tag is "idle", shouldn't it say "SELECT"?

"Command tag: type of session's current command" - given your example I
suppose this means "initial state of the session" as opposed to being a
category tag of what the current line is doing. What you are seeing is
"start at idle and parse" the incoming statement text. That is one action
- parse. The subsequent action is "execute" the contents of the SELECT
that is now in the active state of the session.

If the above is correct the docs could be more clear since I'd agree that
your interpretation of the field seems more logical - though knowing
initial state is quite useful in its own right.

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Igor Korot 2017-07-22 03:21:23 Re: Backward compatibility
Previous Message Tom Lane 2017-07-21 21:01:17 Re: Bug in postgres 9.6.2?