pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Dávid Suchan <david.suchan.ds@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: pg_upgradecluster transfering only a portion of the data
Date: Mon, 27 Feb 2023 08:58:34 -0800
Message-ID: <a18f2d20-e4fc-7e73-687d-df53eaf32981@aklaver.com> (raw)
In-Reply-To: <CAHD9QtYbzbxdZhD3EYA4oqtK1a4wtyv1rCv553p=PSioizm_ZQ@mail.gmail.com>
References: <CAHD9QtYPifFBOULZVPJQ0XuSBc1WwQdQqHUjWZk8UdxRorGAZQ@mail.gmail.com>
	<fd0d1b0d-3017-5d6c-cc95-18fd664c35ad@aklaver.com>
	<CAHD9QtYbzbxdZhD3EYA4oqtK1a4wtyv1rCv553p=PSioizm_ZQ@mail.gmail.com>

On 2/27/23 08:49, Dávid Suchan wrote:

Reply to list
Ccing list for real this time.

> 1) I used \l+ in psql and then counted rows- millions were missing

\l lists databases.

Are you saying there are millions of database?

Otherwise what rows where you counting?

> 3) nothing at all, everything was "success"
> 4) I did not, I presume it is there, the question is why only 700 mb was 
> transferred

If you have not connected how could you do the \l and row count?

> 5) would it be inside main pg log? Or some special one?
> 
> Dňa po 27. 2. 2023, 17:14 Adrian Klaver <adrian.klaver@aklaver.com 
> <mailto:adrian.klaver@aklaver.com>> napísal(a):
> 
>     On 2/27/23 07:44, Dávid Suchan wrote:
>      > Hello, I tried upgrading pg db from version 9.6 to 14 by using
>      > pg_upgradecluster command. I freshly installed pg 14 -> ran
>      > pg_dropcluster 14 main --stop -> and then upgraded using
>      > pg_upgradecluster 9.6 main.
>      > After a successful prompt finished, I checked the database and
>     the size
>      > went from originally 20gb (in 9.6) to 700~ mb (in 14) while the disk
>      > space available shrank by about 2gb meaning that there is still
>     the 20gb
>      > of data. I tried the entire process twice (since I had created an
>     AWS
> 
>     1) How did you measure the size of the database clusters?
> 
>     2) pg_upgrade will not remove the old cluster automatically so it not
>     surprising the overall disk usage increased.
> 
>     3) Did you see any messages at end of upgrade mentioning issues?
> 
>     4) Have you connected to new cluster to see if everything is there?
> 
>     5) Does the Postgres log provide any relevant information?
> 
>      > EC2 snapshot for this) and the result was the same.
>      > Is my solution to migrating old pg version to the new one wrong?
>     Before
>      > this I tried the same process with around 300mb of data and all
>     of that
>      > transferred successfully. If I did not understand the
>     pg_upgradecluster
>      > command, what would be the best practice when upgrading pg
>     version with
>      > huge amounts of data(could be a terabyte)?
> 
>     -- 
>     Adrian Klaver
>     adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
> 

-- 
Adrian Klaver
adrian.klaver@aklaver.com






view thread (13+ messages)  latest in thread

Message-ID: <a18f2d20-e4fc-7e73-687d-df53eaf32981@aklaver.com>
Permalink:  ../a18f2d20-e4fc-7e73-687d-df53eaf32981@aklaver.com/
Also on:    postgresql.org/message-id/a18f2d20-e4fc-7e73-687d-df53eaf32981@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, david.suchan.ds@gmail.com
  Subject: Re: pg_upgradecluster transfering only a portion of the data
  In-Reply-To: <a18f2d20-e4fc-7e73-687d-df53eaf32981@aklaver.com>
  References: <CAHD9QtYPifFBOULZVPJQ0XuSBc1WwQdQqHUjWZk8UdxRorGAZQ@mail.gmail.com> <fd0d1b0d-3017-5d6c-cc95-18fd664c35ad@aklaver.com> <CAHD9QtYbzbxdZhD3EYA4oqtK1a4wtyv1rCv553p=PSioizm_ZQ@mail.gmail.com> <a18f2d20-e4fc-7e73-687d-df53eaf32981@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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