Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
592 views

getting the name of the function which caused trigger to activate in postgresql

Is there a way to get name of the function/procedure, which contains query, which caused a TRIGGER to activate? For example I have function update_user_whatever and it updates user data and I want to ...
YangombiUmpakati's user avatar
1 vote
4 answers
2k views

PostgreSQL logging: Statements splits into multiple lines

In PostgreSQL v10 and above, I activated the logging of the statements using the extension pg_stat_statements. My configuration: logging_collector = on log_line_prefix = '%t [%p]: [%l-1] db=%d,user=%u,...
dcop7's user avatar
  • 29
1 vote
0 answers
28 views

UNIX timestamp using for storing logs

Would it be feasible to use UNIX timestamp as a primary key to store log records/analytics data of users? Will there be inconsistencies if a RDBMS is used to store log data?
Rumesh Madhusanka's user avatar
0 votes
1 answer
1k views

How to use wal_level in Postgres to set the recovery mode to simple for a database like how Microsoft SQL Server does it?

In Microsoft SQL Server, ALTER DATABASE CURRENT SET RECOVERY SIMPLE WITH NO_WAIT; will set the recovery mode for a database to simple, so the transaction log file space can be re-used. In Postgres, ...
hunterex's user avatar
  • 147
1 vote
5 answers
6k views

PostgreSQL will stop logging when logrotate rotate postgresql log file

I have installed PostgreSQL 10.6 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 8.2.1 20180905 (Red Hat 8.2.1-3), 64-bit And configured: log_filename = 'postgresql.log' But I would like to manage ...
MyKE's user avatar
  • 121
1 vote
1 answer
913 views

PostgreSQL's PGP_SYM_ENCRYPT log security

In one of our project, I tried to use PostgreSQL's security extension pgcrypto. I found that is function, PGP_SYM_ENCRYPT is quite handy. Using this function enable me to query encrypted data with ...
Amri Shodiq's user avatar
8 votes
2 answers
15k views

PostgreSQL checkpoint log explained

I know what PostgreSQL checkpoint is and when it is happening. I need some additional information about the logs produced by the log_checkpoints = on parameter, so please explain some points of it to ...
inivanoff1's user avatar
5 votes
1 answer
2k views

Why is Postgres not respecting my log file name convention dictated by "log_filename"?

I’m using Postgres 9.5 on Ubuntu 14.04. I have these settings set in my /etc/postgresql/9.5/main/postgresql.conf file log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, ...
Dave's user avatar
  • 753
6 votes
4 answers
20k views

In Postgres, set log_rotation_size but my logs are still not rotating

I’m using Postgres 9.5 on Ubuntu 14.04. I wanted to rotate my logs whenever they reach a certain size. So I edited /etc/postgresql/9.5/main/postgresql.conf and set this log_rotation_size = 50MB ...
Dave's user avatar
  • 753
2 votes
1 answer
10k views

How do I limit the size of my Postgres log?

I’m using Postgres 9.5 on Ubuntu 14.04. I notice I’m generating a lot of Postgres logs in /var/log/postgresql/postgresql-9.5-main.log . I would like to limit the size of this file, and doing some ...
Dave's user avatar
  • 753
-1 votes
1 answer
1k views

Can I delete a postgresql-9.x-main.log in a running cluster?

In a debian 8 box I got a PostgreSQL 9.4 up and running in production environment. Recently I found that the postgres-9.4-main.log is larger than 38 GB. I have adjusted the postgresql.conf ...
marvin.deoliveira's user avatar
3 votes
1 answer
8k views

Postgres: How to log materialized view refresh

I would like to keep a record of when various Postgres materialised views are refreshed. As far as I can see there are no built in logs. The next obvious choice is to create a trigger, however it ...
Max Murphy's user avatar
1 vote
0 answers
519 views

How to view phppgadmin as the application name in PostgreSQL's log files?

I am using PostgreSQL 9.2.2 (Windows) with phpPgAdmin 5.1. I need to monitor who connects to the server, and with which application. In the logging parameters of postgresql.conf, I use the following ...
Sébastien Clément's user avatar
1 vote
0 answers
49 views

Logging within a procedure's transaction

I have an ETL process running inside a PostgreSQL 9.3 procedure on AWS RDS. The procedure normally takes about ten minutes to run, but I'm having a rare issue where it takes several hours and never ...
John's user avatar
  • 777
11 votes
1 answer
6k views

Is it possible to exclude specific users in log activity of PostgreSQL?

I need to monitor the activity of users in our databases. I have set the following parameters in postgresql.conf: log_min_duration_statement = 0 log_connections = on log_disconnections = on ...
Sébastien Clément's user avatar

15 30 50 per page