init and replacement for Postgresql