performance of pg_upgrade "Copying user relation files"

From: Glenn Pierce <glennpierce(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: performance of pg_upgrade "Copying user relation files"
Date: 2019-10-02 22:30:19
Message-ID: CAM5ipV8xf2AmDChfdnUiieONzyevDikyEnzLu_Ox=pGRJuux9A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message legrand legrand 2019-10-02 22:37:27 Re: Questions about Partitioned Tables and Indexes
Previous Message Stephen Frost 2019-10-02 22:09:15 Re: Wall shiping replica failed to recover database with error: invalid contrecord length 1956 at FED/38FFE208