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

From Guillaume Lelarge
Subject Re: Problems with upgrade from 9.6 to 10 or 11 (column pg_stat_replication.sent_location does not exist)
Date
Msg-id CAECtzeW-sVk7h2r-o1W81NTp0x3gTxKmpu8gjxNAKH841EAHpA@mail.gmail.com
Whole thread Raw
In response to Problems with upgrade from 9.6 to 10 or 11 (column pg_stat_replication.sent_location does not exist)  (Dirk Krautschick <Dirk.Krautschick@trivadis.com>)
List pgsql-admin
Hi,

Le lun. 15 nov. 2021 à 11:18, Dirk Krautschick <Dirk.Krautschick@trivadis.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.

pgsql-admin by date:

Previous
From: Dirk Krautschick
Date:
Subject: Problems with upgrade from 9.6 to 10 or 11 (column pg_stat_replication.sent_location does not exist)
Next
From: Jayson Hreczuck
Date:
Subject: Logical replication stuck