New answers tagged


The 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 file present, PostgreSQL checks if there is a process running with the process with the process ID ...


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, \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