pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Error while upgrading from 9.5 to 10
3+ messages / 3 participants
[nested] [flat]

* Error while upgrading from 9.5 to 10
@ 2018-11-21 04:59  Srinivas Reddy <srinivasreddyga@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Srinivas Reddy @ 2018-11-21 04:59 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

Hi

Trying to upgrade major vesion from 9.5 to 10 using pg_ugrade, but getting
below error,

pg_restore: connecting to database for restore
pg_restore: creating pg_largeobject "pg_largeobject"
pg_restore: creating pg_largeobject_metadata "pg_largeobject_metadata"
pg_restore: creating COMMENT "DATABASE "postgres""
pg_restore: creating SCHEMA "postgres_exporter"
pg_restore: creating SCHEMA "public"
pg_restore: creating COMMENT "SCHEMA "public""
pg_restore: creating VIEW "postgres_exporter.pg_stat_activity"
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 182; 1259 17640 VIEW
pg_stat_activity postgres
pg_restore: [archiver (db)] could not execute query: ERROR:  column
pg_stat_activity.waiting does not exist
LINE 27:     "pg_stat_activity"."waiting",
             ^
    Command was:
-- For binary upgrade, must preserve pg_type oid
SELECT
pg_catalog.binary_upgrade_set_next_pg_type_oid('17642'::pg_catalog.oid);


-- For binary upgrade, must preserve pg_type array oid
SELECT
pg_catalog.binary_upgrade_set_next_array_pg_type_oid('17641'::pg_catalog.oid);


-- For binary upgrade, must preserve pg_class oids
SELECT
pg_catalog.binary_upgrade_set_next_heap_pg_class_oid('17640'::pg_catalog.oid);

CREATE VIEW "postgres_exporter"."pg_stat_activity" AS
 SELECT "pg_stat_activity"."datid",
    "pg_stat_activity"."datname",
    "pg_stat_activity"."pid",
    "pg_stat_activity"."usesysid",
    "pg_stat_activity"."usename",
    "pg_stat_activity"."application_name",
    "pg_stat_activity"."client_addr",
    "pg_stat_activity"."client_hostname",
    "pg_stat_activity"."client_port",
    "pg_stat_activity"."backend_start",
    "pg_stat_activity"."xact_start",
    "pg_stat_activity"."query_start",
    "pg_stat_activity"."state_change",
    "pg_stat_activity"."waiting",
    "pg_stat_activity"."state",
    "pg_stat_activity"."backend_xid",
    "pg_stat_activity"."backend_xmin",
    "pg_stat_activity"."query"
   FROM "pg_stat_activity";

how to resolve this issue?

-- 
*THANKS AND REGARDS*
*SRINIVAS REDDY G A*

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Error while upgrading from 9.5 to 10
@ 2018-11-21 10:00  Achilleas Mantzios <achill@matrix.gatewaynet.com>
  parent: Srinivas Reddy <srinivasreddyga@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Achilleas Mantzios @ 2018-11-21 10:00 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

On 21/11/18 6:59 π.μ., Srinivas Reddy wrote:
> Hi
>
> Trying to upgrade major vesion from 9.5 to 10 using pg_ugrade, but getting below error,
>
> pg_restore: connecting to database for restore
> pg_restore: creating pg_largeobject "pg_largeobject"
> pg_restore: creating pg_largeobject_metadata "pg_largeobject_metadata"
> pg_restore: creating COMMENT "DATABASE "postgres""
> pg_restore: creating SCHEMA "postgres_exporter"
> pg_restore: creating SCHEMA "public"
> pg_restore: creating COMMENT "SCHEMA "public""
> pg_restore: creating VIEW "postgres_exporter.pg_stat_activity"

What is this schema : postgres_exporter ?
I'd suggest taking a back up of the objects in this schema, den DROP everything in there and retry.

> pg_restore: [archiver (db)] Error while PROCESSING TOC:
> pg_restore: [archiver (db)] Error from TOC entry 182; 1259 17640 VIEW pg_stat_activity postgres
> pg_restore: [archiver (db)] could not execute query: ERROR: column pg_stat_activity.waiting does not exist
> LINE 27:     "pg_stat_activity"."waiting",
>              ^
>     Command was:
> -- For binary upgrade, must preserve pg_type oid
> SELECT pg_catalog.binary_upgrade_set_next_pg_type_oid('17642'::pg_catalog.oid);
>
>
> -- For binary upgrade, must preserve pg_type array oid
> SELECT pg_catalog.binary_upgrade_set_next_array_pg_type_oid('17641'::pg_catalog.oid);
>
>
> -- For binary upgrade, must preserve pg_class oids
> SELECT pg_catalog.binary_upgrade_set_next_heap_pg_class_oid('17640'::pg_catalog.oid);
>
> CREATE VIEW "postgres_exporter"."pg_stat_activity" AS
>  SELECT "pg_stat_activity"."datid",
>     "pg_stat_activity"."datname",
>     "pg_stat_activity"."pid",
>     "pg_stat_activity"."usesysid",
>     "pg_stat_activity"."usename",
>     "pg_stat_activity"."application_name",
>     "pg_stat_activity"."client_addr",
>     "pg_stat_activity"."client_hostname",
>     "pg_stat_activity"."client_port",
>     "pg_stat_activity"."backend_start",
>     "pg_stat_activity"."xact_start",
>     "pg_stat_activity"."query_start",
>     "pg_stat_activity"."state_change",
>     "pg_stat_activity"."waiting",
>     "pg_stat_activity"."state",
>     "pg_stat_activity"."backend_xid",
>     "pg_stat_activity"."backend_xmin",
>     "pg_stat_activity"."query"
>    FROM "pg_stat_activity";
>
> how to resolve this issue?
>
> -- 
> _THANKS AND REGARDS_
> /SRINIVAS REDDY G A/


-- 
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Error while upgrading from 9.5 to 10
@ 2018-11-21 10:23  Thomas Poty <thomas.poty@gmail.com>
  parent: Achilleas Mantzios <achill@matrix.gatewaynet.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Thomas Poty @ 2018-11-21 10:23 UTC (permalink / raw)
  To: achill@matrix.gatewaynet.com; +Cc: pgsql-admin@lists.postgresql.org

i think postgres_exporter is used for prometheus...

in v 9.6 and v10 "pg_catalog.pg_stat_activity.waiting" doesn't exist
anymore.
So you have to correct your view  "postgres_exporter.pg_stat_activity"

Le mer. 21 nov. 2018 à 11:00, Achilleas Mantzios <
achill@matrix.gatewaynet.com> a écrit :

> On 21/11/18 6:59 π.μ., Srinivas Reddy wrote:
>
> Hi
>
> Trying to upgrade major vesion from 9.5 to 10 using pg_ugrade, but getting
> below error,
>
> pg_restore: connecting to database for restore
> pg_restore: creating pg_largeobject "pg_largeobject"
> pg_restore: creating pg_largeobject_metadata "pg_largeobject_metadata"
> pg_restore: creating COMMENT "DATABASE "postgres""
> pg_restore: creating SCHEMA "postgres_exporter"
> pg_restore: creating SCHEMA "public"
> pg_restore: creating COMMENT "SCHEMA "public""
> pg_restore: creating VIEW "postgres_exporter.pg_stat_activity"
>
>
> What is this schema : postgres_exporter ?
> I'd suggest taking a back up of the objects in this schema, den DROP
> everything in there and retry.
>
> pg_restore: [archiver (db)] Error while PROCESSING TOC:
> pg_restore: [archiver (db)] Error from TOC entry 182; 1259 17640 VIEW
> pg_stat_activity postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  column
> pg_stat_activity.waiting does not exist
> LINE 27:     "pg_stat_activity"."waiting",
>              ^
>     Command was:
> -- For binary upgrade, must preserve pg_type oid
> SELECT
> pg_catalog.binary_upgrade_set_next_pg_type_oid('17642'::pg_catalog.oid);
>
>
> -- For binary upgrade, must preserve pg_type array oid
> SELECT
> pg_catalog.binary_upgrade_set_next_array_pg_type_oid('17641'::pg_catalog.oid);
>
>
> -- For binary upgrade, must preserve pg_class oids
> SELECT
> pg_catalog.binary_upgrade_set_next_heap_pg_class_oid('17640'::pg_catalog.oid);
>
> CREATE VIEW "postgres_exporter"."pg_stat_activity" AS
>  SELECT "pg_stat_activity"."datid",
>     "pg_stat_activity"."datname",
>     "pg_stat_activity"."pid",
>     "pg_stat_activity"."usesysid",
>     "pg_stat_activity"."usename",
>     "pg_stat_activity"."application_name",
>     "pg_stat_activity"."client_addr",
>     "pg_stat_activity"."client_hostname",
>     "pg_stat_activity"."client_port",
>     "pg_stat_activity"."backend_start",
>     "pg_stat_activity"."xact_start",
>     "pg_stat_activity"."query_start",
>     "pg_stat_activity"."state_change",
>     "pg_stat_activity"."waiting",
>     "pg_stat_activity"."state",
>     "pg_stat_activity"."backend_xid",
>     "pg_stat_activity"."backend_xmin",
>     "pg_stat_activity"."query"
>    FROM "pg_stat_activity";
>
> how to resolve this issue?
>
> --
> *THANKS AND REGARDS*
> *SRINIVAS REDDY G A*
>
>
>
> --
> Achilleas Mantzios
> IT DEV Lead
> IT DEPT
> Dynacom Tankers Mgmt
>
>

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2018-11-21 10:23 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-11-21 04:59 Error while upgrading from 9.5 to 10 Srinivas Reddy <srinivasreddyga@gmail.com>
2018-11-21 10:00 ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
2018-11-21 10:23   ` Thomas Poty <thomas.poty@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox