From: | Raul Kaubi <raulkaubi(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: How to log bind values for statements that produce errors |
Date: | 2021-09-07 14:52:52 |
Message-ID: | CAO_+3-Dqa4EVaVwYz2jqCHgmwuqkFYMetiBR8FwOc8ScrPBbDg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hmm, actually, this same client executes several queries for that same
session. For the first queries, I can clearly see the binds in
postgresql.log. Only this third query that is being executed, it produces
error and not binds are logged.
Also, there may the case, where the third query gets its bind parameter
from the second query (as I understood the developer).
Regards
Raul
Kontakt Tom Lane (<tgl(at)sss(dot)pgh(dot)pa(dot)us>) kirjutas kuupäeval T, 7. september
2021 kell 16:48:
> Raul Kaubi <raulkaubi(at)gmail(dot)com> writes:
> > We have a problem with certain select statement, which produces error
> and we would like to know the bind value that is given as parameter.
> > I have tried parameters:
> > log_min_duration_statement = 0
> > log_parameter_max_length_on_error = -1
>
> The other constraint on reporting parameters during error is that they
> have to be sent by the client in text not binary mode. I venture that
> your client is sending them in binary.
>
> (The reason for this restriction is to avoid the overhead of converting
> binary to text for every query, which we'd have to do in advance of
> knowing whether the query will throw an error.)
>
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Lewis | 2021-09-07 15:27:07 | Re: Query takes around 15 to 20 min over 20Lakh rows |
Previous Message | Tom Lane | 2021-09-07 13:48:52 | Re: How to log bind values for statements that produce errors |