Issue #2184641 by eltrufa: Make saveHighwater() work with PostgreSQL