pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: System (and DB) upgrade problem., "part 2"
8+ messages / 6 participants
[nested] [flat]

* Re: System (and DB) upgrade problem., "part 2"
@ 2021-01-18 04:33  W.P. <laurentp@wp.pl>
  0 siblings, 2 replies; 8+ messages in thread

From: W.P. @ 2021-01-18 04:33 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org; laurenz.albe@cybertec.at

W dniu 13.01.2021 o 12:28, Laurenz Albe pisze:
> On Wed, 2021-01-13 at 07:41 +0100, W.P. wrote:
>> I am upgrading Fedora 24 to (now) 26, PostgreSQL stopped starting (as
>> expected), the message from systemctl was to do "postgresql-setup
>> --upgrade".
>>
>> Did installed the tool, loaunched.
>>
>> But it fails with (attached logs) messages, I am missing some libraries,
>> what should I install?
> The logs complain about missing the "dblink" library, so you forgot to install
> the -contrib package.
>
> Remember to REINDEX all indexes on string columns, because the collations
> may have changed.
>
> Yours,
> Laurenz Albe
For 9.5 to 9.6 transition, it worked like charm. (except some problems 
with parsing json data in a view, but this I will address later, after 
upgrade to final version - Fedora 30, probably PG 10.x).

Now I have problem with 9.6 -> 10.7 (Fedora 27 -> 28) upgrade.
As expected after system upgrade, database fails to start "files 
incompatible with binaries".

Found pg_upgrade, command line options "-b 
/usr/lib/pgsql/postgresql-9.6/bin -B /usr/bin -d /var/lib/pgsql/data/" 
BUT what should I put for option -D? ("new cluster data") Was 
(directory) already created for me (during system upgrade), or have I to 
create it somewhere (where? is best practice).

There are NO logs for today trial to start in 
/var/lib/pgsql/data/pg_log/. Where they could be?

Laurent







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

* Re: System (and DB) upgrade problem., "part 2"
@ 2021-01-18 11:36  Peter J. Holzer <hjp-pgsql@hjp.at>
  parent: W.P. <laurentp@wp.pl>
  1 sibling, 0 replies; 8+ messages in thread

From: Peter J. Holzer @ 2021-01-18 11:36 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 2021-01-18 05:33:05 +0100, W.P. wrote:
> Now I have problem with 9.6 -> 10.7 (Fedora 27 -> 28) upgrade.
> As expected after system upgrade, database fails to start "files
> incompatible with binaries".
> 
> Found pg_upgrade, command line options "-b /usr/lib/pgsql/postgresql-9.6/bin
> -B /usr/bin -d /var/lib/pgsql/data/" BUT what should I put for option -D?
> ("new cluster data") Was (directory) already created for me (during system
> upgrade), or have I to create it somewhere (where? is best practice).

The Debian/Ubuntu package contains a script pg_upgradecluster which
knows about the distribution-specific directory layout. You would
normally use that script instead pg_upgrade directly.

Maybe the Fedora package has something similar?

        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] 8+ messages in thread

* Re: System (and DB) upgrade problem., "part 2"
@ 2021-01-18 16:19  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: W.P. <laurentp@wp.pl>
  1 sibling, 1 reply; 8+ messages in thread

From: Laurenz Albe @ 2021-01-18 16:19 UTC (permalink / raw)
  To: W.P. <laurentp@wp.pl>; pgsql-general@lists.postgresql.org

On Mon, 2021-01-18 at 05:33 +0100, W.P. wrote:
> For 9.5 to 9.6 transition, it worked like charm. (except some problems 
> with parsing json data in a view, but this I will address later, after 
> upgrade to final version - Fedora 30, probably PG 10.x).
> 
> Now I have problem with 9.6 -> 10.7 (Fedora 27 -> 28) upgrade.
> As expected after system upgrade, database fails to start "files 
> incompatible with binaries".
> 
> Found pg_upgrade, command line options "-b 
> /usr/lib/pgsql/postgresql-9.6/bin -B /usr/bin -d /var/lib/pgsql/data/" 
> BUT what should I put for option -D? ("new cluster data") Was 
> (directory) already created for me (during system upgrade), or have I to 
> create it somewhere (where? is best practice).
> 
> There are NO logs for today trial to start in 
> /var/lib/pgsql/data/pg_log/. Where they could be?

You would call "initdb" or "postgresql-10-setup" to create a new, empty
cluster in version 10 and use that with -D.

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






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

* Re: System (and DB) upgrade problem., "part 2"
@ 2021-01-18 20:53  W.P. <laurentp@wp.pl>
  parent: Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 1 reply; 8+ messages in thread

From: W.P. @ 2021-01-18 20:53 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

W dniu 18.01.2021 o 17:19, Laurenz Albe pisze:
> On Mon, 2021-01-18 at 05:33 +0100, W.P. wrote:
>> For 9.5 to 9.6 transition, it worked like charm. (except some problems
>> with parsing json data in a view, but this I will address later, after
>> upgrade to final version - Fedora 30, probably PG 10.x).
>>
>> Now I have problem with 9.6 -> 10.7 (Fedora 27 -> 28) upgrade.
>> As expected after system upgrade, database fails to start "files
>> incompatible with binaries".
>>
>> Found pg_upgrade, command line options "-b
>> /usr/lib/pgsql/postgresql-9.6/bin -B /usr/bin -d /var/lib/pgsql/data/"
>> BUT what should I put for option -D? ("new cluster data") Was
>> (directory) already created for me (during system upgrade), or have I to
>> create it somewhere (where? is best practice).
>>
>> There are NO logs for today trial to start in
>> /var/lib/pgsql/data/pg_log/. Where they could be?
> You would call "initdb" or "postgresql-10-setup" to create a new, empty
> cluster in version 10 and use that with -D.
Ok, so "step-by-step":
1), I copy / move "somewhere" OLD DB files (*/pgsql/data/* for -d option),
2). Do initdb / postgresql-10-setup to create NEW empty base (in 
/var/lib/pgsql/ or  somewhere, for -D option),
3). do pg_upgrade.

Is that correct?

Is there somewhere "guide for 9.x -> 10.x CONCEPTS changes (and upgrade) 
guide"? (clusters etc).

Laurent
> Yours,
> Laurenz Albe







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

* Re: System (and DB) upgrade problem., "part 2"
@ 2021-01-18 20:58  Bruce Momjian <bruce@momjian.us>
  parent: W.P. <laurentp@wp.pl>
  0 siblings, 1 reply; 8+ messages in thread

From: Bruce Momjian @ 2021-01-18 20:58 UTC (permalink / raw)
  To: W.P. <laurentp@wp.pl>; +Cc: pgsql-general@lists.postgresql.org

On Mon, Jan 18, 2021 at 09:53:33PM +0100, W.P. wrote:
> W dniu 18.01.2021 o 17:19, Laurenz Albe pisze:
> > On Mon, 2021-01-18 at 05:33 +0100, W.P. wrote:
> > > For 9.5 to 9.6 transition, it worked like charm. (except some problems
> > > with parsing json data in a view, but this I will address later, after
> > > upgrade to final version - Fedora 30, probably PG 10.x).
> > > 
> > > Now I have problem with 9.6 -> 10.7 (Fedora 27 -> 28) upgrade.
> > > As expected after system upgrade, database fails to start "files
> > > incompatible with binaries".
> > > 
> > > Found pg_upgrade, command line options "-b
> > > /usr/lib/pgsql/postgresql-9.6/bin -B /usr/bin -d /var/lib/pgsql/data/"
> > > BUT what should I put for option -D? ("new cluster data") Was
> > > (directory) already created for me (during system upgrade), or have I to
> > > create it somewhere (where? is best practice).
> > > 
> > > There are NO logs for today trial to start in
> > > /var/lib/pgsql/data/pg_log/. Where they could be?
> > You would call "initdb" or "postgresql-10-setup" to create a new, empty
> > cluster in version 10 and use that with -D.
> Ok, so "step-by-step":
> 1), I copy / move "somewhere" OLD DB files (*/pgsql/data/* for -d option),
> 2). Do initdb / postgresql-10-setup to create NEW empty base (in
> /var/lib/pgsql/ or  somewhere, for -D option),
> 3). do pg_upgrade.
> 
> Is that correct?
> 
> Is there somewhere "guide for 9.x -> 10.x CONCEPTS changes (and upgrade)
> guide"? (clusters etc).

The pg_upgade docs have all the steps.

-- 
  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] 8+ messages in thread

* Re: System (and DB) upgrade problem., "part 2"
@ 2021-01-18 21:13  Ron <ronljohnsonjr@gmail.com>
  parent: Bruce Momjian <bruce@momjian.us>
  0 siblings, 2 replies; 8+ messages in thread

From: Ron @ 2021-01-18 21:13 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 1/18/21 2:58 PM, Bruce Momjian wrote:
> On Mon, Jan 18, 2021 at 09:53:33PM +0100, W.P. wrote:
[snip]
>> Ok, so "step-by-step":
>> 1), I copy / move "somewhere" OLD DB files (*/pgsql/data/* for -d option),
>> 2). Do initdb / postgresql-10-setup to create NEW empty base (in
>> /var/lib/pgsql/ or  somewhere, for -D option),
>> 3). do pg_upgrade.
>>
>> Is that correct?
>>
>> Is there somewhere "guide for 9.x -> 10.x CONCEPTS changes (and upgrade)
>> guide"? (clusters etc).
> The pg_upgade docs have all the steps.

The documents tend to assume the reader thoroughly knows Postgresql, and 
that's manifestly Not True.

-- 
Angular momentum makes the world go 'round.





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

* Re: System (and DB) upgrade problem., "part 2"
@ 2021-01-18 21:26  David G. Johnston <david.g.johnston@gmail.com>
  parent: Ron <ronljohnsonjr@gmail.com>
  1 sibling, 0 replies; 8+ messages in thread

From: David G. Johnston @ 2021-01-18 21:26 UTC (permalink / raw)
  To: Ron <ronljohnsonjr@gmail.com>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>

On Mon, Jan 18, 2021 at 2:13 PM Ron <ronljohnsonjr@gmail.com> wrote:

> The documents tend to assume the reader thoroughly knows Postgresql, and
> that's manifestly Not True.
>

Maybe not, but users are still expected to read the documentation.  If
there remains questions or concerns after doing so then by asking such
there is a chance for someone to decide to volunteer an improvement to the
documentation so that the same question doesn't have to be asked in the
future.

David J.

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

* Re: System (and DB) upgrade problem., "part 2"
@ 2021-01-18 21:37  Bruce Momjian <bruce@momjian.us>
  parent: Ron <ronljohnsonjr@gmail.com>
  1 sibling, 0 replies; 8+ messages in thread

From: Bruce Momjian @ 2021-01-18 21:37 UTC (permalink / raw)
  To: Ron <ronljohnsonjr@gmail.com>; +Cc: pgsql-general@lists.postgresql.org

On Mon, Jan 18, 2021 at 03:13:13PM -0600, Ron wrote:
> On 1/18/21 2:58 PM, Bruce Momjian wrote:
> > On Mon, Jan 18, 2021 at 09:53:33PM +0100, W.P. wrote:
> [snip]
> > > Ok, so "step-by-step":
> > > 1), I copy / move "somewhere" OLD DB files (*/pgsql/data/* for -d option),
> > > 2). Do initdb / postgresql-10-setup to create NEW empty base (in
> > > /var/lib/pgsql/ or  somewhere, for -D option),
> > > 3). do pg_upgrade.
> > > 
> > > Is that correct?
> > > 
> > > Is there somewhere "guide for 9.x -> 10.x CONCEPTS changes (and upgrade)
> > > guide"? (clusters etc).
> > The pg_upgade docs have all the steps.
> 
> The documents tend to assume the reader thoroughly knows Postgresql, and
> that's manifestly Not True.

What is your point?  Maybe they shouldn't be using pg_upgrade then,
right?  If the documentaiton is unclear, please explain why.

-- 
  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] 8+ messages in thread


end of thread, other threads:[~2021-01-18 21:37 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-01-18 04:33 Re: System (and DB) upgrade problem., "part 2" W.P. <laurentp@wp.pl>
2021-01-18 11:36 ` Peter J. Holzer <hjp-pgsql@hjp.at>
2021-01-18 16:19 ` Laurenz Albe <laurenz.albe@cybertec.at>
2021-01-18 20:53   ` W.P. <laurentp@wp.pl>
2021-01-18 20:58     ` Bruce Momjian <bruce@momjian.us>
2021-01-18 21:13       ` Ron <ronljohnsonjr@gmail.com>
2021-01-18 21:26         ` David G. Johnston <david.g.johnston@gmail.com>
2021-01-18 21:37         ` 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