tag:blogger.com,1999:blog-2095009998266493615.post1922303155798856511..comments2023-07-12T02:39:28.134-07:00Comments on Simple PostgreSQL Blog: Huge archive generation with PostgreSQL cluster??Baji Shaikhttp://www.blogger.com/profile/15132725823431299637noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-2095009998266493615.post-90361905964750364072018-01-15T22:42:01.582-08:002018-01-15T22:42:01.582-08:00Hi,
I'm currently using PostgreSQL 9.1 in my ...Hi,<br /><br />I'm currently using PostgreSQL 9.1 in my production server. Recently, I found very huge amount of archive logs generation on the server. Around 80 files per hour for just a delete statement of 8000 rows approx. And the archive logs size per day will be around 42 GB. We are getting​serious disk space problem. Kindly help me to sort out this issue, ASAP. Thanks in advance.<br /><br />Regards,<br />Pavan Teja,<br />DBA,<br />Postgres Certified Associate,<br />9841380956Pavan Tejanoreply@blogger.comtag:blogger.com,1999:blog-2095009998266493615.post-56919041402203958082014-03-03T07:32:21.283-08:002014-03-03T07:32:21.283-08:00Great, thank you Gurjeet, I was not aware of this ...Great, thank you Gurjeet, I was not aware of this built-in function. Good one. Will update the post as well.. ;-)Baji Shaikhttps://www.blogger.com/profile/15132725823431299637noreply@blogger.comtag:blogger.com,1999:blog-2095009998266493615.post-90807667375799519412014-03-03T06:42:04.151-08:002014-03-03T06:42:04.151-08:00If you're worried about spurious UPDATE statem...If you're worried about spurious UPDATE statements which don't really change anything in the row, you can consider creating trigger on problem tables using the Postgres built-in function suppress_redundant_updates_trigger (see [1] ).<br /><br />Of course the best option would be to stop the application from sending such UPDATEs, but if that's not an option, or as a stop-gap measure until the application developers can fix the behaviour, this trigger can save on WAL generation, and hence archive generation.<br /><br />[1]: http://www.postgresql.org/docs/9.3/static/functions-trigger.html<br /><br />Best regards,Gurjeet Singhhttps://www.blogger.com/profile/07566934368109450898noreply@blogger.com