New answers tagged

0

The postmaster.pid file is one of the measure that PostgreSQL takes to prevent starting multiple database servers on the same data directory at the same time (which would cause data corruption). If you start the PostgreSQL server and there is a postmaster.pid file present, PostgreSQL checks if there is a process running with the process with the process ID ...


1

This will allow you to do it. In your case, everything between '$$' is a "dollar-quoted string constant, so nothing gets interpreted. See sql syntax, 4.1.2.4. \set CREDO 'begin create user ' :dbuser '; exception when duplicate_object then raise notice ''user already exists''; end'; do :'CREDO';


Top 50 recent answers are included