pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Move configuration files with pg_upgrade
4+ messages / 4 participants
[nested] [flat]

* Move configuration files with pg_upgrade
@ 2020-06-04 19:52 Tanja Savic <tanja.savic@crossmasters.com>
  2020-06-04 22:05 ` Re: Move configuration files with pg_upgrade Peter J. Holzer <hjp-pgsql@hjp.at>
  2020-06-04 22:26 ` Re: Move configuration files with pg_upgrade Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 2 replies; 4+ messages in thread

From: Tanja Savic @ 2020-06-04 19:52 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

Hello,

I did Postgresql upgrade from v10 to v12 using pg_upgrade (on Linux Ubuntu server).
Of course i wanted settings in pg_hba.conf and postgresql.conf to keep, but after the upgrade there were new configuration files and I moved it manually.

Is it possible somehow to migrate these old
configuration files with pg_upgrade or it shall be done manually?

Cheers,
Tanja

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Move configuration files with pg_upgrade
  2020-06-04 19:52 Move configuration files with pg_upgrade Tanja Savic <tanja.savic@crossmasters.com>
@ 2020-06-04 22:05 ` Peter J. Holzer <hjp-pgsql@hjp.at>
  1 sibling, 0 replies; 4+ messages in thread

From: Peter J. Holzer @ 2020-06-04 22:05 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 2020-06-04 19:52:19 +0000, Tanja Savic wrote:
> I did Postgresql upgrade from v10 to v12 using pg_upgrade (on Linux Ubuntu
> server). 

Did you use the packages from the PGDG server or from Ubuntu?

> Of course i wanted settings in pg_hba.conf and postgresql.conf to keep, but
> after the upgrade there were new configuration files and I moved it manually. 

I recently did an upgrade from 9.6 to 12 on a Debian system (using the
PGDG packages - I think they should be the same for Debian and Ubuntu)
and pg_uprade migrated the existing configuration without problems.
So that's not a general problem - did you get any error messages or
warnings during the upgrade?

        hp

-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Move configuration files with pg_upgrade
  2020-06-04 19:52 Move configuration files with pg_upgrade Tanja Savic <tanja.savic@crossmasters.com>
@ 2020-06-04 22:26 ` Adrian Klaver <adrian.klaver@aklaver.com>
  2020-06-15 18:09   ` Re: Move configuration files with pg_upgrade Bruce Momjian <bruce@momjian.us>
  1 sibling, 1 reply; 4+ messages in thread

From: Adrian Klaver @ 2020-06-04 22:26 UTC (permalink / raw)
  To: Tanja Savic <tanja.savic@crossmasters.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

On 6/4/20 12:52 PM, Tanja Savic wrote:
> Hello,
> 
> I did Postgresql upgrade from v10 to v12 using pg_upgrade (on Linux 
> Ubuntu server).
> Of course i wanted settings inpg_hba.conf and postgresql.conf to keep, 
> but after the upgrade there were new configuration files and I moved it 
> manually.

That is documented:

https://www.postgresql.org/docs/12/pgupgrade.html

"
Restore pg_hba.conf

If you modified pg_hba.conf, restore its original settings. It might 
also be necessary to adjust other configuration files in the new cluster 
to match the old cluster, e.g. postgresql.conf.
"

The new version's conf files  will probably have new settings available 
so this is something that should be reviewed before moving over. One way 
to deal with this is include file(s):

https://www.postgresql.org/docs/12/config-setting.html#CONFIG-INCLUDES

Using them you create the settings you want to manage in the include 
file. Then copy that over and set the include 'some_file' in the new 
postgresql.conf and you are good.

> 
> Is it possible somehow to migrate these old
> configuration files with pg_upgrade or it shall be done manually?
> 
> Cheers,
> Tanja
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Move configuration files with pg_upgrade
  2020-06-04 19:52 Move configuration files with pg_upgrade Tanja Savic <tanja.savic@crossmasters.com>
  2020-06-04 22:26 ` Re: Move configuration files with pg_upgrade Adrian Klaver <adrian.klaver@aklaver.com>
@ 2020-06-15 18:09   ` Bruce Momjian <bruce@momjian.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Bruce Momjian @ 2020-06-15 18:09 UTC (permalink / raw)
  To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: Tanja Savic <tanja.savic@crossmasters.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

On Thu, Jun  4, 2020 at 03:26:07PM -0700, Adrian Klaver wrote:
> On 6/4/20 12:52 PM, Tanja Savic wrote:
> > Hello,
> > 
> > I did Postgresql upgrade from v10 to v12 using pg_upgrade (on Linux
> > Ubuntu server).
> > Of course i wanted settings inpg_hba.conf and postgresql.conf to keep,
> > but after the upgrade there were new configuration files and I moved it
> > manually.
> 
> That is documented:
> 
> https://www.postgresql.org/docs/12/pgupgrade.html
> 
> "
> Restore pg_hba.conf
> 
> If you modified pg_hba.conf, restore its original settings. It might also be
> necessary to adjust other configuration files in the new cluster to match
> the old cluster, e.g. postgresql.conf.
> "
> 
> The new version's conf files  will probably have new settings available so
> this is something that should be reviewed before moving over. One way to
> deal with this is include file(s):
> 
> https://www.postgresql.org/docs/12/config-setting.html#CONFIG-INCLUDES
> 
> Using them you create the settings you want to manage in the include file.
> Then copy that over and set the include 'some_file' in the new
> postgresql.conf and you are good.

Yes, the community instructions require you to reconfigure the new
server to match the old one.  Some packagers who automate pg_upgrade
might do that configuration migration automatically.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee






^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2020-06-15 18:09 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-06-04 19:52 Move configuration files with pg_upgrade Tanja Savic <tanja.savic@crossmasters.com>
2020-06-04 22:05 ` Peter J. Holzer <hjp-pgsql@hjp.at>
2020-06-04 22:26 ` Adrian Klaver <adrian.klaver@aklaver.com>
2020-06-15 18:09   ` Bruce Momjian <bruce@momjian.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox