a simple transaction manager for pg