Re: performance of pg_upgrade "Copying user relation files"

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Glenn Pierce <glennpierce(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: performance of pg_upgrade "Copying user relation files"
Date: 2019-10-03 00:47:48
Message-ID: 6890f634-b620-e6b3-530c-181d459dfec8@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/2/19 4:58 PM, Glenn Pierce wrote:
Please reply to list also.
Ccing list.
>
>
> On Thu, 3 Oct 2019, 00:11 Adrian Klaver, <adrian(dot)klaver(at)aklaver(dot)com
> <mailto:adrian(dot)klaver(at)aklaver(dot)com>> wrote:
>
> On 10/2/19 3:30 PM, Glenn Pierce wrote:
> > I have been trying to upgrade postgres 9.5 to 9.6 with pg_upgrade
> >
> > Everything seems to start fine but when pg_upgrade gets to "Copying
> > user relation files"
> > It takes ages to complete copying.
>
> This is going to need more information:
>
> 1) What is the pg_upgrade command you are using?
>
>
> I was using pg_upgrade from the installed postgres 9.6
>
> /usr/pgsql-9.6/bin/pg_upgrade --old-bindir=/usr/pgsql-9.5/bin/
> --new-bindir=/usr/pgsql-9.6/bin/ --old-datadir=/var/lib/pgsql/9.5/data/
> --new-datadir=/var/lib/pgsql/9.6/data/
>
>
> I was following the article from
>
> https://medium.com › postgresql-upg...
> Web results
> PostgreSQL upgrade on CentOS - Dzmitry Plashchynski - Medium
>
>
>
> 2) Where are you upgrading from/to?
>
>
> Trying to upgrade from 9.5 to 9.6
> Same machine with both versions installed.
>
>
> 3) What OS, version?
>
> Centos 7.4
>
>
> Thanks
>
>
> >
> > ie
> > Each file like
> >
> > /var/lib/pgsql/9.5/data/base/24602/25140
> > is 1G and taking ~5-10 minutes to copyand that directory is 223G of
> > about 990 files
> >
> > After a couple of hours running pg_upgrade I had to give up.
> >
> > looking a iotop I was seeing
> >
> > 99% IO load caused by [md0_raid1]
> >
> > and only seeing pg_upgrade go to 99% every 3-4 seconds
> >
> > I had no other processes using io or high cpu.
> >
> > Has anyone got any pointers of what could be the issue ?
> >
> > Ps running cp on /var/lib/pgsql/9.5/data/base/24602/25140 to my home
> > directory is instantaneous
> >
> > System is Centos 7
> >
> > Thanks
> >
> >
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shital A 2019-10-03 03:00:41 Re: Urgent :: Postgresql streaming replication issue - sync mode
Previous Message Rob Sargent 2019-10-02 23:49:51 Re: Users, Roles and Connection Pooling