In postgres, is there a way to find out the list of dates of malfunctions of db or app for one year.
This is a very generic question. You may want to check apps like Nagios - there are many alternatives. As there are many reasons a database may fail (CPU load, memory, network, disk...), you will probably want a list of sensors.
Just keep in mind that these apps may also fail...