2ndQuadrant / pglogical

Logical Replication extension for PostgreSQL 17, 16, 15, 14, 13, 12, 11, 10, 9.6, 9.5, 9.4 (Postgres), providing much faster replication than Slony, Bucardo or Londiste, as well as cross-version upgrades.
http://2ndquadrant.com/en/resources/pglogical/
Other
1.01k stars 153 forks source link

ERROR relation "pglogical.replication_set_relation" does not exist after extention update #19

Closed lefan closed 8 years ago

lefan commented 8 years ago

After updating extention from 1.0.1 to 1.1.2 and restarting of provider db see repeated errors:

< 2016-06-23 10:00:01.856 MSK >LOG:  connection authorized: user=xdray database=xdray
< 2016-06-23 10:01:04.359 MSK >LOG:  connection received: host=172.21.206.240 port=56735
< 2016-06-23 10:01:04.364 MSK >LOG:  replication connection authorized: user=xdray
< 2016-06-23 10:01:04.367 MSK >LOG:  starting logical decoding for slot "pgl_xdray_msk_xdray_1_transactions_msk"
< 2016-06-23 10:01:04.367 MSK >DETAIL:  streaming transactions committing after 18/EC0F0B8, reading WAL from 18/EC0F0B8
< 2016-06-23 10:01:04.387 MSK >LOG:  logical decoding found consistent point at 18/EC0F0B8
< 2016-06-23 10:01:04.387 MSK >DETAIL:  Logical decoding will begin using saved snapshot.
< 2016-06-23 10:01:04.388 MSK >ERROR:  relation "pglogical.replication_set_relation" does not exist
< 2016-06-23 10:01:04.388 MSK >CONTEXT:  slot "pgl_xdray_msk_xdray_1_transactions_msk", output plugin "pglogical_output", in the change callback, associated LSN 18/EC5E908

The provider DB under was under load (inserts and updates).

psql (9.5.2)
Type "help" for help.

xdray=# \dx pglogical
                   List of installed extensions
   Name    | Version |  Schema   |          Description
-----------+---------+-----------+--------------------------------
 pglogical | 1.1.2   | pglogical | PostgreSQL Logical Replication
(1 row)

xdray=# \dt pglogical.replication_set_relation
                    List of relations
  Schema   |           Name           | Type  |  Owner
-----------+--------------------------+-------+----------
 pglogical | replication_set_relation | table | postgres
(1 row)
carbonin commented 8 years ago

@lefan What steps did you take when upgrading the extension? I'm about to attempt an upgrade and there doesn't seem to be any explicit instructions in any of the documentation.

If I see something similar, I'll try to help in debugging.

carbonin commented 8 years ago

Ah just saw https://github.com/2ndQuadrant/pglogical/issues/17. If a server restart is required that makes things a bit simpler. Sorry for the noise.

ringerc commented 8 years ago

We should be clearer about documenting this though. Or maybe add a guard in the extension scripts that checks the version of the running pglogical extension and refuses to run the extension upgrade script until the running extension version matches.​