Skip to content

Unable to change pg_pathman schema from public #149

Open
@p2p-mdurbha

Description

@p2p-mdurbha

Problem description

Hello, I am trying to refresh a prod database to test using pg_dump/pg_restore. Unfortunately, my pg_restore fails with "...already exists" error for pg_pathman objects. So I am trying to move the pg_pathman extension from public to a different schema (so that I can exclude it in the pg_dump).
However, my query fails with the error below -

postgres@mdtest2=# alter extension pg_pathman set schema extensions;
ERROR: extension "pg_pathman" does not support SET SCHEMA

How can I accomplish this? I am concerned about dropping and re-creating pg_pathman extension, as I have several partitioned tables in this Production environment.

Can you please help?

  1. Is there an easier way to exclude pg_pathman objects from pg_dump or pg_restore?
  2. If not, how can I safely move pg_pathman to a different schema, so that I can exclude that schema from pg_dump?

Thanks

Environment

emr_prod=# select * from pg_extension;
extname | extowner | extnamespace | extrelocatable | extversion | extconfig | extcondition
--------------------+----------+--------------+----------------+------------+-------------------+--------------
plpgsql | 10 | 11 | f | 1.0 | |
adminpack | 10 | 11 | f | 1.0 | |
ltree | 10 | 2200 | t | 1.0 | |
pg_buffercache | 10 | 2200 | t | 1.1 | |
pg_pathman | 10 | 2200 | f | 1.4 | {8738685,8738694} | {"",""}
pg_stat_statements | 10 | 2200 | t | 1.3 | |
pg_trgm | 10 | 2200 | t | 1.1 | |
pgcrypto | 10 | 2200 | t | 1.2 | |
(8 rows)

emr_prod=# select version();
version

PostgreSQL 9.6.7 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16), 64-bit

emr_prod=# SELECT pgpro_version();
ERROR: function pgpro_version() does not exist

emr_prod=# SELECT get_pathman_lib_version();
get_pathman_lib_version

10409
(1 row)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions