Re: [GENERAL] Logging queries cancelled due to replication timeouts
Christophe Pettus wrote: Greetings, Is there a combination of options that will cause a hot standby replica to log queries that are cancelled due to a replication timeout (max_standby_streaming_delay)? Sure, how about the system view pg_stat_database_conflicts in PG 9.1? Our docs say: Add the link linkend=monitoring-stats-views-tablestructnamepg_stat_database_conflicts//link system view to show queries that have been canceled and the reason (Magnus Hagander) /para para Cancellations can occur because of dropped tablespaces, lock timeouts, old snapshots, pinned buffers, and deadlocks. I assume replication cancellations are also in there, no? -- Bruce Momjian br...@momjian.ushttp://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. + -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
[GENERAL] Logging queries cancelled due to replication timeouts
Greetings, Is there a combination of options that will cause a hot standby replica to log queries that are cancelled due to a replication timeout (max_standby_streaming_delay)? -- -- Christophe Pettus x...@thebuild.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
[GENERAL] Logging queries that are part of a stored procedure
Setting postgresql 8.1.3 to log all queries only logs direct queries, not ones made as part of a stored procedure (function) call.Is there a way to get it to log queries that are part of functions?--Mike Nolan
Re: [GENERAL] Logging queries that are part of a stored procedure
On 9/8/06, Michael Nolan [EMAIL PROTECTED] wrote: Setting postgresql 8.1.3 to log all queries only logs direct queries, not ones made as part of a stored procedure (function) call. Is there a way to get it to log queries that are part of functions? not really, but you can 'raise notice' inside pl/pgsql functions or (as a last resort) insert records into a log table. in between statement executions. merlin ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
[GENERAL] Logging queries
Hi all, I've got a machine I am setting up (read; low volume atm). I need a way to log all the queries made to Postgres (just for a short time). I've got a problem with a 3rd party program (OSS, but I'm not 'let' enough to trace it) and I am hoping to help fix the problem by being able to see what query it is exactly trying to do. I remember once long ago I did this but I'll be dumb-struck if I can remember how. As an aside; I've got a user named 'madison' who is in postgres and owns another database which is working fine with one of my programs. So I know the user is okay. I've created a new database and I am trying to tell this program to connect to the new database as this user (local machine) but I keep getting the error: 2006-02-02 23:07:36 [21958] LOG: connection received: host=127.0.0.1 port=33387 2006-02-02 23:07:36 [21958] FATAL: IDENT authentication failed for user madison 2 I've tried changing the 'pg_hba.conf' file from 'ident sameuser' to 'trust'' with no love, too. I'm hoping that seeing the query this program is using might help me solve this problem. Thanks!! Madison -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Madison Kelly (Digimer) TLE-BU; The Linux Experience, Back Up Main Project Page: http://tle-bu.org Community Forum:http://forum.tle-bu.org -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
Re: [GENERAL] Logging queries
Madison Kelly wrote: Hi all, I've got a machine I am setting up (read; low volume atm). I need a way to log all the queries made to Postgres (just for a short time). I've got a problem with a 3rd party program (OSS, but I'm not 'let' enough to trace it) and I am hoping to help fix the problem by being able to see what query it is exactly trying to do. I remember once long ago I did this but I'll be dumb-struck if I can remember how. As an aside; I've got a user named 'madison' who is in postgres and owns another database which is working fine with one of my programs. So I know the user is okay. I've created a new database and I am trying to tell this program to connect to the new database as this user (local machine) but I keep getting the error: 2006-02-02 23:07:36 [21958] LOG: connection received: host=127.0.0.1 port=33387 2006-02-02 23:07:36 [21958] FATAL: IDENT authentication failed for user madison 2 I've tried changing the 'pg_hba.conf' file from 'ident sameuser' to 'trust'' with no love, too. I'm hoping that seeing the query this program is using might help me solve this problem. Thanks!! Madison Oops, should have mentioned that I'm running 7.4.7 on Debian Sarge stable. Madison -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Madison Kelly (Digimer) TLE-BU; The Linux Experience, Back Up Main Project Page: http://tle-bu.org Community Forum:http://forum.tle-bu.org -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Solved: Re: [GENERAL] Logging queries
Madison Kelly wrote: Madison Kelly wrote: Hi all, I've got a machine I am setting up (read; low volume atm). I need a way to log all the queries made to Postgres (just for a short time). I've got a problem with a 3rd party program (OSS, but I'm not 'let' enough to trace it) and I am hoping to help fix the problem by being able to see what query it is exactly trying to do. I remember once long ago I did this but I'll be dumb-struck if I can remember how. As an aside; I've got a user named 'madison' who is in postgres and owns another database which is working fine with one of my programs. So I know the user is okay. I've created a new database and I am trying to tell this program to connect to the new database as this user (local machine) but I keep getting the error: 2006-02-02 23:07:36 [21958] LOG: connection received: host=127.0.0.1 port=33387 2006-02-02 23:07:36 [21958] FATAL: IDENT authentication failed for user madison 2 I've tried changing the 'pg_hba.conf' file from 'ident sameuser' to 'trust'' with no love, too. I'm hoping that seeing the query this program is using might help me solve this problem. Thanks!! Madison Oops, should have mentioned that I'm running 7.4.7 on Debian Sarge stable. Madison For the love of... . I found the answer right after posting... Just had to set 'log_min_duration_statement' in 'postgres.conf' to '0'. Sorry for the line noise! ^.^; Madison -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Madison Kelly (Digimer) TLE-BU; The Linux Experience, Back Up Main Project Page: http://tle-bu.org Community Forum:http://forum.tle-bu.org -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
Re: [GENERAL] logging queries and time used
On Fri, Oct 29, 2004 at 11:18:48PM +0200, stig erikson wrote: i would like to log every single query coming in to the database into a table. i would like the log to include the entire query and execution time and execution cost, and if possible the user that executed the query. A trigger is what i was thinking of, but how can i find out the actual query, the time it took to execute it, etc.? See the Error Reporting and Logging section of the documentation: http://www.postgresql.org/docs/7.4/static/runtime-config.html#RUNTIME-CONFIG-LOGGING You might be able to feed the logging output to a script that inserts into a table, but make sure that important log messages are also stored outside the database to avoid losing them if trouble arises. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
[GENERAL] logging queries and time used
Hi. i would like to log every single query coming in to the database into a table. i would like the log to include the entire query and execution time and execution cost, and if possible the user that executed the query. A trigger is what i was thinking of, but how can i find out the actual query, the time it took to execute it, etc.? stig ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])