pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
[Major version upgrade] pg_upgrade fails despite passing check mode
4+ messages / 3 participants
[nested] [flat]

* [Major version upgrade] pg_upgrade fails despite passing check mode
@ 2021-10-22 08:11  Abhishek Bhola <abhishek.bhola@japannext.co.jp>
  0 siblings, 1 reply; 4+ messages in thread

From: Abhishek Bhola @ 2021-10-22 08:11 UTC (permalink / raw)
  To: pgsql-general

While upgrading from Postgres 11 to 13, the pg_upgrade passed the check mode

postgres@dxxxpgs03:/Dxxxx1/datadg/data13$ /usr/pgsql-13/bin/pg_upgrade -k
--check --new-datadir='/Dxxxx1/datadg/data13'
--old-datadir='/Dxxxx1/datadg/data' --new-bind$
r='/usr/pgsql-13/bin' --old-bindir='/usr/pgsql-11/bin'
Performing Consistency Checks
-----------------------------
Checking cluster versions                                   ok
Checking database user is the install user                  ok
Checking database connection settings                       ok
Checking for prepared transactions                          ok
Checking for system-defined composite types in user tables  ok
Checking for reg* data types in user tables                 ok
Checking for contrib/isn with bigint-passing mismatch       ok
Checking for tables WITH OIDS                               ok
Checking for invalid "sql_identifier" user columns          ok
Checking for presence of required libraries                 ok
Checking database user is the install user                  ok
Checking for prepared transactions                          ok
Checking for new cluster tablespace directories             ok

*Clusters are compatible*

But then while *performing the actual upgrade, it failed* saying the "*owner
of a FDW should be a super user*"

So I started the old Postgres 11 again, changed the owner of that FDW to a
super user.

Now when I try to run the upgrade (even in check mode) again, it says "*new
cluster tablespace directory already exists*"

Is it safe to delete the new tablespace directories?

What are my options to safely start/upgrade the DB without any chances of
data corruption?

Thanks

-- 
_This correspondence (including any attachments) is for the intended 
recipient(s) only. It may contain confidential or privileged information or 
both. No confidentiality or privilege is waived or lost by any 
mis-transmission. If you receive this correspondence by mistake, please 
contact the sender immediately, delete this correspondence (and all 
attachments) and destroy any hard copies. You must not use, disclose, copy, 
distribute or rely on any part of this correspondence (including any 
attachments) if you are not the intended 
recipient(s).本メッセージに記載および添付されている情報(以下、総称して「本情報」といいます。)は、本来の受信者による使用のみを意図しています。誤送信等により本情報を取得された場合でも、本情報に係る秘密、または法律上の秘匿特権が失われるものではありません。本電子メールを受取られた方が、本来の受信者ではない場合には、本情報及びそのコピーすべてを削除・破棄し、本電子メールが誤って届いた旨を発信者宛てにご通知下さいますようお願いします。本情報の閲覧、発信または本情報に基づくいかなる行為も明確に禁止されていることをご了承ください。_


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

* Re: [Major version upgrade] pg_upgrade fails despite passing check mode
@ 2021-10-22 15:20  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: Abhishek Bhola <abhishek.bhola@japannext.co.jp>
  0 siblings, 1 reply; 4+ messages in thread

From: Laurenz Albe @ 2021-10-22 15:20 UTC (permalink / raw)
  To: Abhishek Bhola <abhishek.bhola@japannext.co.jp>; pgsql-general

On Fri, 2021-10-22 at 17:11 +0900, Abhishek Bhola wrote:
> postgres@dxxxpgs03:/Dxxxx1/datadg/data13$ /usr/pgsql-13/bin/pg_upgrade -k --check
>   --new-datadir='/Dxxxx1/datadg/data13' --old-datadir='/Dxxxx1/datadg/data'
>   --new-bindir='/usr/pgsql-13/bin' --old-bindir='/usr/pgsql-11/bin'
> 
> *Clusters are compatible*
> 
> But then while performing the actual upgrade, it failed saying the "owner of a FDW should be a super user"
> 
> So I started the old Postgres 11 again, changed the owner of that FDW to a super user.
> 
> Now when I try to run the upgrade (even in check mode) again, it says "new cluster tablespace directory already exists"
> 
> Is it safe to delete the new tablespace directories?

Don't remove the tablespace directories, because they contain the original data from the
old cluster.  But there should be directories called PG_13_202007201, and you have to
remove those.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






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

* Re: [Major version upgrade] pg_upgrade fails despite passing check mode
@ 2021-10-24 22:52  Abhishek Bhola <abhishek.bhola@japannext.co.jp>
  parent: Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 1 reply; 4+ messages in thread

From: Abhishek Bhola @ 2021-10-24 22:52 UTC (permalink / raw)
  To: Laurenz Albe <laurenz.albe@cybertec.at>; +Cc: pgsql-general

Thanks, let me try that out.

But is there a way to know for sure if pg_upgrade will have any such
problems?
Other than FDW's owner, any other things I should check before upgrading
other clusters?

Regards
Abhishek Bhola

On Sat, Oct 23, 2021 at 12:20 AM Laurenz Albe <laurenz.albe@cybertec.at>
wrote:

> On Fri, 2021-10-22 at 17:11 +0900, Abhishek Bhola wrote:
> > postgres@dxxxpgs03:/Dxxxx1/datadg/data13$ /usr/pgsql-13/bin/pg_upgrade
> -k --check
> >   --new-datadir='/Dxxxx1/datadg/data13'
> --old-datadir='/Dxxxx1/datadg/data'
> >   --new-bindir='/usr/pgsql-13/bin' --old-bindir='/usr/pgsql-11/bin'
> >
> > *Clusters are compatible*
> >
> > But then while performing the actual upgrade, it failed saying the
> "owner of a FDW should be a super user"
> >
> > So I started the old Postgres 11 again, changed the owner of that FDW to
> a super user.
> >
> > Now when I try to run the upgrade (even in check mode) again, it says
> "new cluster tablespace directory already exists"
> >
> > Is it safe to delete the new tablespace directories?
>
> Don't remove the tablespace directories, because they contain the original
> data from the
> old cluster.  But there should be directories called PG_13_202007201, and
> you have to
> remove those.
>
> Yours,
> Laurenz Albe
> --
> Cybertec | https://www.cybertec-postgresql.com
>
>

-- 
_This correspondence (including any attachments) is for the intended 
recipient(s) only. It may contain confidential or privileged information or 
both. No confidentiality or privilege is waived or lost by any 
mis-transmission. If you receive this correspondence by mistake, please 
contact the sender immediately, delete this correspondence (and all 
attachments) and destroy any hard copies. You must not use, disclose, copy, 
distribute or rely on any part of this correspondence (including any 
attachments) if you are not the intended 
recipient(s).本メッセージに記載および添付されている情報(以下、総称して「本情報」といいます。)は、本来の受信者による使用のみを意図しています。誤送信等により本情報を取得された場合でも、本情報に係る秘密、または法律上の秘匿特権が失われるものではありません。本電子メールを受取られた方が、本来の受信者ではない場合には、本情報及びそのコピーすべてを削除・破棄し、本電子メールが誤って届いた旨を発信者宛てにご通知下さいますようお願いします。本情報の閲覧、発信または本情報に基づくいかなる行為も明確に禁止されていることをご了承ください。_


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

* Re: [Major version upgrade] pg_upgrade fails despite passing check mode
@ 2021-10-26 19:48  Bruce Momjian <bruce@momjian.us>
  parent: Abhishek Bhola <abhishek.bhola@japannext.co.jp>
  0 siblings, 0 replies; 4+ messages in thread

From: Bruce Momjian @ 2021-10-26 19:48 UTC (permalink / raw)
  To: Abhishek Bhola <abhishek.bhola@japannext.co.jp>; +Cc: Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-general

On Mon, Oct 25, 2021 at 07:52:13AM +0900, Abhishek Bhola wrote:
> Thanks, let me try that out.
> 
> But is there a way to know for sure if pg_upgrade will have any such problems?
> Other than FDW's owner, any other things I should check before upgrading other
> clusters?

No.  pg_upgrade's check mode checks as much as it reasonable can, but it
doesn't try restoring the database schema, for performance reasons, and
that is where the failure is happening.

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

  If only the physical world exists, free will is an illusion.






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


end of thread, other threads:[~2021-10-26 19:48 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-10-22 08:11 [Major version upgrade] pg_upgrade fails despite passing check mode Abhishek Bhola <abhishek.bhola@japannext.co.jp>
2021-10-22 15:20 ` Laurenz Albe <laurenz.albe@cybertec.at>
2021-10-24 22:52   ` Abhishek Bhola <abhishek.bhola@japannext.co.jp>
2021-10-26 19:48     ` 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