Re: Problems with upgrade from 9.6 to 10 or 11 (column pg_stat_replication.sent_location does not exist)

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Dirk Krautschick <Dirk(dot)Krautschick(at)trivadis(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Problems with upgrade from 9.6 to 10 or 11 (column pg_stat_replication.sent_location does not exist)
Date: 2021-11-15 10:29:39
Message-ID: CAECtzeW-sVk7h2r-o1W81NTp0x3gTxKmpu8gjxNAKH841EAHpA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,

Le lun. 15 nov. 2021 à 11:18, Dirk Krautschick <
Dirk(dot)Krautschick(at)trivadis(dot)com> a écrit :

> Hello,
>
>
>
> while trying an upgrade from 9.6 to 10 (or 11, same issue) we got errors
> about missing columns
>
> in the pg_stat_replication view.
>
>
>
> …
>
> pg_restore: [archiver (db)] Error while PROCESSING TOC:
>
> pg_restore: [archiver (db)] Error from TOC entry 205; 1259 32960 VIEW
> pg_stat_replication ggdbpadm
>
> pg_restore: [archiver (db)] could not execute query: ERROR: column
> pg_stat_replication.sent_location does not exist
>
> LINE 24: "pg_stat_replication"."sent_location",
>
> …
>
>
>
> Is that somehow a (probably known) but? I have no really explanation for
> this.
>
>
>

This isn't a PostgreSQL bug. It looks like you have a postgres_exporter
schema which contains a pg_stat_replication view, which uses the
pg_stat_replication view from PostgreSQL, though it tries to look for a
sent_location column which doesn't exist. It has been renamed sent_lsn
since release 10. Fix your view, and it should work better.

>

--
Guillaume.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jayson Hreczuck 2021-11-19 16:10:21 Logical replication stuck
Previous Message Dirk Krautschick 2021-11-15 10:18:08 Problems with upgrade from 9.6 to 10 or 11 (column pg_stat_replication.sent_location does not exist)