Zend certified PHP/Magento developer

postgres keeps drive active, how to debug

I run a small home server with Debian including a autoshutdown script if the system is idle. Since a few days my drives are not staying in standby and with this the server is always running.

I analysed this with iotop -bktoqqq -d .5 and the following entry always shows up when the drives are going back from standby to active

rsyslogd -n -iNONE [rs:main Q:Reg]
postgres: 11/main: nextcloud_db_user nextcloud_db ::1(42284) idle

or

rsyslogd -n -iNONE [rs:main Q:Reg]
postgres: 11/main: nextcloud_db_user nextcloud_db ::1(34282) UPDATE
postgres: 11/main: nextcloud_db_user nextcloud_db ::1(34282) SELECT

Additional problem is that I have same or similar entries in my log as well where drives are staying in standby.

If I disable postgres service my drives are going in standby and the server shuts down as defined.

What could be the reason for these? My postgres database is not located on these 2 hard drives. Only data is.

How can I figure out which specific file is accessed at the time the log shows up?