l-lin
Archives Tags About me Resources
l-lin
Cancel
ArchivesTagsAbout meResources

Remove idle transactions

l-lin included in post
 2018-08-31  21 words   One minute 
https://www.virtual-dba.com/media/postgresql-database-services-remote-dba.png
1
2
3
4
SELECT pg_terminate_backend(pid) 
FROM pg_stat_activity 
WHERE state LIKE 'idle %' 
AND state_change < now() - interval '1 hour';
Updated on 2021-02-10  2c3a287
Read Markdown
 postgresql
Back | Home
Circuit breaker Using host DNS in Docker container with Ubuntu 18
Powered by Hugo | Theme - LoveIt