RE: How to get the content of Bind variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tom

	Thanks a lot for your answer.

*) Here is information about my server :
[postgres@noeyypvd pg_log]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.3 (Maipo)

postgres=# select version() ;
                                                 version
---------------------------------------------------------------------------------------------------------
 PostgreSQL 10.2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16), 64-bit
(1 row)

  *)  it's very problematic that we can not get the content of bind variables. We can not determine the root query which makes UPDATE statements to crash our production database.
What can explain the lack of information about bind variables?

*) Here is the parameters setting I use :
# postgresql.conf : include_if_exists = '/appli/postgres/pgbd_prod_pda/10/conf/audit.conf'

log_rotation_size = 0
log_destination=stderr
logging_collector=true
client_min_messages=notice
log_min_messages=ERROR
log_min_error_statement=ERROR
log_min_duration_statement=250
debug_print_parse=off
debug_print_rewritten=off
debug_print_plan=on
debug_pretty_print=on
log_checkpoints=on
log_connections=on
log_disconnections=on
log_duration=on
log_error_verbosity=VERBOSE
log_hostname=on
log_lock_waits=on
deadlock_timeout=1s
log_statement=all
log_temp_files=0
log_autovacuum_min_duration = 0
track_activities=on
track_io_timing=on
track_functions=all
log_line_prefix = '%t [%p]: [%l-1] [%x] user=%u,db=%d,client=%h'
lc_messages ='C'
shared_preload_libraries = 'passwordcheck,pg_stat_statements,pgstattuple'
listen_addresses = '*'
pg_stat_statements.track=all
pg_stat_statements.max = 1000
pg_stat_statements.track_utility=on
pg_stat_statements.save=on
   
*) -> suggestion : It would be nice to have the content of bind variable of a query in a table of  pg_catalog. (cf ORACLE) 

Didier ROS
Expertise SGBD
EDF - DTEO - DSIT - IT DMA
Département Solutions Groupe
Groupe Performance Applicative
32 avenue Pablo Picasso
92000 NANTERRE
 
didier.ros@xxxxxx
Tél. : +33 6 49 51 11 88

-----Message d'origine-----
De : tgl@xxxxxxxxxxxxx [mailto:tgl@xxxxxxxxxxxxx] 
Envoyé : vendredi 1 mars 2019 17:30
À : ROS Didier <didier.ros@xxxxxx>
Cc : pryzby@xxxxxxxxxxxxx; pgsql-performance@xxxxxxxxxxxxxx
Objet : Re: How to get the content of Bind variables

ROS Didier <didier.ros@xxxxxx> writes:
> postgres=# show log_error_verbosity ;
>  log_error_verbosity
> ---------------------
>  default
> (1 row)

So ... how old is this server?  AFAIK the above should be enough to ensure you get the DETAIL lines with parameter values.  But the ability to log those hasn't been there forever.

			regards, tom lane



Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme à sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez reçu ce Message par erreur, merci de le supprimer de votre système, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions également d'en avertir immédiatement l'expéditeur par retour du message.

Il est impossible de garantir que les communications par messagerie électronique arrivent en temps utile, sont sécurisées ou dénuées de toute erreur ou virus.
____________________________________________________

This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.

If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.

E-mail communication cannot be guaranteed to be timely secure, error or virus-free.






[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux