postgresql - How to Notify Deadlocks in Postgres -
i new postgres databases. can suggest how notify if there deadlock happening in postgres. how set email alerts deadlocks .
thanks in advance...
generally, postgres logs deadlock information in log files under /var/lib/pgsql/data/pg_log directory. can create script read log files , grep word 'deadlock' , notify through email. schedule cron job run script in day. of course, limitation may not emails @ moment deadlock occurs, still helpful.
thanks