Hi Tom and community members,
>Here's a POC patch to fix AIX's alignment problems that way.
>I feel much better about this approach than the other one …
Thank you for this POC patch.
We built the master branch with this POC patch plus meson and GNU build
development patches for AIX.
We tested this in our AIX environment using DOUBLE PRECISION and BIGINT columns
to verify that pg_upgrade succeeds. We first created a PostgreSQL 15 database
cluster, populated it with sample records, and then upgraded it to a
master-branch build that includes this patch. The upgrade completed
successfully.
Below are the output snapshots and TAP test results from the master branch with
this patch from our run.
pg_upgrade -b $HOME/postgres_15/postgres/install/usr/local/pgsql/bin/ -B
$HOME/postgres/install/usr/local/pgsql/bin/ -d $HOME/data15 -D $HOME/datamaster
--check
Performing Consistency Checks
-----------------------------
Checking cluster versions ok
Checking database connection settings ok
Checking database user is the install user ok
Checking for prepared transactions ok
Checking for contrib/isn with bigint-passing mismatch ok
Checking data type usage ok
Checking for not-null constraint inconsistencies ok
Checking for uses of gist_inet_ops/gist_cidr_ops ok
Checking for presence of required libraries ok
Checking database user is the install user ok
Checking for prepared transactions ok
Checking for new cluster tablespace directories ok
*Clusters are compatible*
Schema of the table:
CREATE TABLE sensor_readings (
id BIGSERIAL PRIMARY KEY,
measurement_value DOUBLE PRECISION,
count_64 BIGINT,
note TEXT
);
These were the records before the upgrade in PostgreSQL version 15,
testdb=# select * from sensor_readings;
id | measurement_value | count_64 | note
----+-------------------+----------+------------
1 | 12.45 | 1001 | Reading 1
2 | 15.02 | 1002 | Reading 2
3 | 18.77 | 1003 | Reading 3
4 | 21.05 | 1004 | Reading 4
5 | 25.61 | 1005 | Reading 5
6 | 28.43 | 1006 | Reading 6
7 | 30.12 | 1007 | Reading 7
8 | 31.98 | 1008 | Reading 8
9 | 33.47 | 1009 | Reading 9
10 | 35.22 | 1010 | Reading 10
And then after pg_upgrade in Postgresql master branch
testdb=# select * from sensor_readings;
id | measurement_value | count_64 | note
----+-------------------+----------+------------
1 | 12.45 | 1001 | Reading 1
2 | 15.02 | 1002 | Reading 2
3 | 18.77 | 1003 | Reading 3
4 | 21.05 | 1004 | Reading 4
5 | 25.61 | 1005 | Reading 5
6 | 28.43 | 1006 | Reading 6
7 | 30.12 | 1007 | Reading 7
8 | 31.98 | 1008 | Reading 8
9 | 33.47 | 1009 | Reading 9
10 | 35.22 | 1010 | Reading 10
============== GNU build TAP test results =============
t/035_standby_logical_decoding.pl ..... skipped: Injection points not supported
by this build
t/036_truncated_dropped.pl ............ ok
t/037_invalid_database.pl ............. ok
t/038_save_logical_slots_shutdown.pl .. ok
t/039_end_of_wal.pl ................... ok
t/040_standby_failover_slots_sync.pl .. ok
t/041_checkpoint_at_promote.pl ........ skipped: Injection points not supported
by this build
t/042_low_level_backup.pl ............. ok
t/043_no_contrecord_switch.pl ......... ok
t/044_invalidate_inactive_slots.pl .... skipped: Injection points not supported
by this build
t/045_archive_restartpoint.pl ......... ok
t/046_checkpoint_logical_slot.pl ...... skipped: Injection points not supported
by this build
t/047_checkpoint_physical_slot.pl ..... skipped: Injection points not supported
by this build
t/048_vacuum_horizon_floor.pl ......... ok
t/049_wait_for_lsn.pl ................. ok
t/050_redo_segment_missing.pl ......... skipped: Injection points not supported
by this build
t/051_effective_wal_level.pl .......... ok
All tests successful.
Files=50, Tests=584, 328 wallclock secs ( 0.11 usr 0.04 sys + 11.20 cusr 16.44
csys = 27.79 CPU)
Result: PASS
============ Meson test TAP results ====================
355/361 postgresql:pg_basebackup / pg_basebackup/040_pg_createsubscriber
OK 74.88s 54 subtests passed
356/361 postgresql:recovery / recovery/027_stream_regress
OK 111.07s 11 subtests passed
357/361 postgresql:pg_upgrade / pg_upgrade/006_transfer_modes
OK 114.24s 40 subtests passed
358/361 postgresql:pg_verifybackup / pg_verifybackup/003_corruption
OK 70.04s 92 subtests passed
359/361 postgresql:subscription / subscription/100_bugs
OK 27.44s 17 subtests passed
360/361 postgresql:pg_upgrade / pg_upgrade/002_pg_upgrade
OK 115.77s 19 subtests passed
361/361 postgresql:pg_basebackup / pg_basebackup/010_pg_basebackup
OK 86.86s 200 subtests passed
Ok: 329
Expected Fail: 0
Fail: 0
Unexpected Pass: 0
Skipped: 32
Timeout: 0
Full log written to /home/buildusr/postgres/build/meson-logs/testlog.txt
===============
Have a nice day ahead.
Thanks and regards,
Aditya.