Hi,
We’re facing a problem when doing the upgrade to postgres v14 on apigee 4.52 upgrade. It fails when doing the update of the postgres master server at the point where it does the dump of de DB schemas.
Copying the previous version config file to /opt/apigee/data/apigee-postgresql/pgdata-10.old
Modifying /opt/apigee/data/apigee-postgresql/pgdata/postgresql.conf file with custom setting
Performing Consistency Checks
-----------------------------
Checking cluster versions ok
Checking database user is the install user ok
Checking database connection settings ok
Checking for prepared transactions ok
Checking for system-defined composite types in user tables ok
Checking for reg* data types in user tables ok
Checking for contrib/isn with bigint-passing mismatch ok
Checking for user-defined encoding conversions ok
Checking for user-defined postfix operators ok
Checking for incompatible polymorphic functions ok
Checking for tables WITH OIDS ok
Checking for invalid "sql_identifier" user columns ok
Creating dump of global objects ok
Creating dump of database schemas
apigee
*failure*
Consult the last few lines of "pg_upgrade_dump_16400.log" for
the probable cause of the failure.
The error log is the following:
command: "/usr/pgsql-14/bin/pg_dump" --host /opt/apigee/data/apigee-postgresql/pgdata-10.old --port 50432 --username apigee --schema-only --quote-all-identifiers --binary-upgrade --format=custom --file="pg_upgrade_dump_16400.custom" 'dbname=apigee' >> "pg_upgrade_dump_16400.log" 2>&1
pg_dump: error: query failed: ERROR: out of shared memory
HINT: You might need to increase max_locks_per_transaction.
pg_dump: error: query was: LOCK TABLE "analytics"."noah.live.fact" IN ACCESS SHARE MODE
command: "/usr/pgsql-14/bin/pg_dump" --host /opt/apigee/data/apigee-postgresql/pgdata-10.old --port 50432 --username apigee --schema-only --quote-all-identifiers --binary-upgrade --format=custom --file="pg_upgrade_dump_16400.custom" 'dbname=apigee' >> "pg_upgrade_dump_16400.log" 2>&1
pg_dump: error: query failed: ERROR: out of shared memory
HINT: You might need to increase max_locks_per_transaction.
pg_dump: error: query was: LOCK TABLE "analytics"."noah.live.fact" IN ACCESS SHARE MODE
It seems that we don’t have enough shared memory for table locking. We tried to adjust the limit of “max_locks_per_transaction” by editig the file “/opt/apigee/customer/application/postgresql.properties”:
conf_postgresql_effective_cache_size = 4096MB
conf_postgresql_shared_buffers = 8192MB
conf_postgresql_work_mem = 2048MB
conf_postgresql_max_locks_per_transaction=150000
But still doesn’t work. Any idea of how to solve the problem?
Thank you!