Assistance Needed: Issue with pg_upgrade and --link option - Mailing list pgsql-hackers

From Pradeep Kumar
Subject Assistance Needed: Issue with pg_upgrade and --link option
Date
Msg-id CAJ4xhP=z7J4HaF3f5jMQE8oee4RRkm2_q-04VBwrWiLza7MA8A@mail.gmail.com
Whole thread Raw
Responses Re: Assistance Needed: Issue with pg_upgrade and --link option
List 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

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: pg_waldump: add test for coverage
Next
From: Laurenz Albe
Date:
Subject: Re: Assistance Needed: Issue with pg_upgrade and --link option