Re: How to restore roles without changing postgres password

From: "Andrus" <kobruleht2(at)hot(dot)ee>
To: "Justin" <zzzzz(dot)graf(at)gmail(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to restore roles without changing postgres password
Date: 2020-02-12 10:06:56
Message-ID: 6316D0244B55410388A5E0FC387B006E@dell2
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-general

Hi!

>Not a bad idea, would want to extend this to all the roles on the server not just postgres

>I've edited the global dump many times removing/editing table spaces, comment old users, etc..

Maybe it is easier to create plpgsql procedure which returns desired script as text.
Or it retrieves globals from other cluster using dblink and applies changes to new cluster.

This can be called instead of pq_dumpall and can edited for custom needs.
Editing plpgsql script is easier for postgres users than creating sed script to delete commands from sql file.

Andrus.

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Jonathan S. Katz 2020-02-12 13:15:08 Re: Duplicating website's formatting in local doc builds
Previous Message PG Doc comments form 2020-02-12 09:25:05 COPY performance vs insert

Browse pgsql-general by date

  From Date Subject
Next Message farjad.farid 2020-02-12 11:52:30 RE: Function not imported in Entity Framework
Previous Message Mladen Marinović 2020-02-12 09:22:14 pg_basebackup connection closed unexpectedly...