As far as I understand, the Cleaner thread should run only when there are resource being in use (see https://github.com/pgjdbc/pgjdbc/blob/4888cbb1e592e3779c8027ad9e6adb774f7671a5/pgjdbc/src/main/java/org/postgresql/util/LazyCleaner.java#L133-L134). If you have a reproducible test case, feel free to file an issue