Re: Migration struggles - Mailing list pgsql-admin

From Vijaykumar Jain
Subject Re: Migration struggles
Date
Msg-id CAM+6J97VQRbWa9djZwDUjPJ5v5YjexYsrTbgcXSH4F_vvHyasA@mail.gmail.com
Whole thread Raw
In response to Re: Migration struggles  (Christian Lehmann <info@chlehmann.ch>)
List pgsql-admin
On Tue, 3 Aug 2021 at 20:25, Christian Lehmann <info@chlehmann.ch> wrote:
Hi there
Well, migration itself won't be triggered by ansible (maybe in the
future, but then -c for sure will be used!). But I honestly did not
try --if-exists because there is no "create role abc if not exists".
But maybe it handles role-creation differently, I will try that.


there is no "create role if not exists",
it would use "if exists" to drop the objects and the create the objects normally.


from a dummy dumpall
egrep -i 'DROP|CREATE' dump.sql
-- Drop databases (except postgres and template1)
DROP DATABASE IF EXISTS vjain;
-- Drop roles
DROP ROLE IF EXISTS postgres;
DROP ROLE IF EXISTS vjain;
CREATE ROLE postgres;

and so on.. 

pgsql-admin by date:

Previous
From: Christian Lehmann
Date:
Subject: Re: Migration struggles
Next
From: Eko Prasetiyo
Date:
Subject: