Assistance Needed: Issue with pg_upgrade and --link option

From: Pradeep Kumar <spradeepkumar29(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Assistance Needed: Issue with pg_upgrade and --link option
Date: 2023-06-28 06:19:43
Message-ID: CAJ4xhP=z7J4HaF3f5jMQE8oee4RRkm2_q-04VBwrWiLza7MA8A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dear Postgres Hackers,

I hope this email finds you well. I am currently facing an issue while
performing an upgrade using the pg_upgrade utility with the --link option.
I was under the impression that the --link option would create hard links
between the old and new cluster's data files, but it appears that the
entire old cluster data was copied to the new cluster, resulting in a
significant increase in the new cluster's size.

Here are the details of my scenario:
- PostgreSQL version: [Old Version: Postgres 11.4 | New Version: Postgres
14.0]
- Command used for pg_upgrade:
[~/pg_upgrade_testing/postgres_14/bin/pg_upgrade -b
~/pg_upgrade_testing/postgres_11.4/bin -B
~/pg_upgrade_testing/postgres_14/bin -d
~/pg_upgrade_testing/postgres_11.4/replica_db2 -D
~/pg_upgrade_testing/postgres_14/new_pg -r -k
- Paths to the old and new data directories:
[~/pg_upgrade_testing/postgres_11.4/replica_db2]
[~/pg_upgrade_testing/postgres_14/new_pg]
- OS information: [Ubuntu 22.04.2 linux]

However, after executing the pg_upgrade command with the --link option, I
observed that the size of the new cluster is much larger than expected. I
expected the --link option to create hard links instead of duplicating the
data files.

I am seeking assistance to understand the following:
1. Is my understanding of the --link option correct?
2. Is there any additional configuration or step required to properly
utilize the --link option?
3. Are there any limitations or considerations specific to my PostgreSQL
version or file system that I should be aware of?

Any guidance, clarification, or troubleshooting steps you can provide would
be greatly appreciated. I want to ensure that I am utilizing the --link
option correctly and optimize the upgrade process.

Best regards,
Pradeep Kumar

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Laurenz Albe 2023-06-28 06:24:45 Re: Assistance Needed: Issue with pg_upgrade and --link option
Previous Message Peter Eisentraut 2023-06-28 05:48:46 Re: pg_waldump: add test for coverage