replace db to pg