Thread: Assistance Needed: PostgreSQL Migration Errors 13.2 to 15

Assistance Needed: PostgreSQL Migration Errors 13.2 to 15

From
Charan K
Date:

Hi Team,

I hope this email finds you well. We are currently in the process of migrating from PostgreSQL 13.2 to PostgreSQL 15, and we've encountered some issues during the restoration process.

Error Details:

  1. pg_restore: error: could not execute query: ERROR: column reference "wal_records" is ambiguous
  2. pg_restore: error: could not execute query: ERROR: relation "metric_helpers.pg_stat_statements" does not exist

Extensions Used:

  • pg_stat_kcache | 2.2.0 | public | Kernel statistics gathering
  • pg_stat_statements | 1.8 | public | Track planning and execution statistics of all SQL statements executed
  • pg_trgm | 1.5 | public | Text similarity measurement and index searching based on trigrams
  • plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
  • set_user | 2.0 | public | Similar to SET ROLE but with added logging
  • timescaledb | 2.2.1 | public | Enables scalable inserts and complex queries for time-series data
  • uuid-ossp | 1.1 | public | Generate universally unique identifiers (UUIDs)
  • pg_cron | 1.3 | public | Job scheduler for PostgreSQL

Commands Used:

  1. kubectl exec basebackup-qa-cluster-1 -n cnpg-test -c postgres -- pg_dump -Fc -d eksqademo > eksqademo.dump
  2. kubectl exec -i qa-test-cluster-1 -c postgres -n demo -- pg_restore --no-owner -d eksqademo --verbose < eksqademo.dump

Could you please provide some guidance on why these errors are occurring and how we can resolve them? Any help would be greatly appreciated.

Thank you,

-charan

Re: Assistance Needed: PostgreSQL Migration Errors 13.2 to 15

From
Tom Lane
Date:
Charan K <charank9223@gmail.com> writes:
> I hope this email finds you well. We are currently in the process of
> migrating from PostgreSQL 13.2 to PostgreSQL 15, and we've encountered some
> issues during the restoration process.

> Error Details:

>    1. pg_restore: error: could not execute query: ERROR: column reference
>    "wal_records" is ambiguous

Could you show us the statement causing this error?

>    2. pg_restore: error: could not execute query: ERROR: relation
>    "metric_helpers.pg_stat_statements" does not exist

Presumably this is just cascading from the first error.

            regards, tom lane