search_path in pg_dump output. - Mailing list pgsql-general

From NEERAJ BANSAL
Subject search_path in pg_dump output.
Date
Msg-id DM6PR18MB31131286C2E701139F53AD6C897E9@DM6PR18MB3113.namprd18.prod.outlook.com
Whole thread Raw
Responses Re: search_path in pg_dump output.  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general

Hi,

we are using pg_dump output to compare the schema consistency. But after upgrade to postgres 11.5 we are seeing different behavior of pg_dump intermittently.  As per the https://github.com/postgres/postgres/commit/582edc369cdbd348d68441fc50fa26a84afd0c1a pg_dump should reset the schema path to empty and generate fully qualified table names which is not happening in intermittent case.  Same can be seen on multiple different servers and many users are impacted due to this. Please help me to understand this behavior difference. Also, If possible please let me know if it is bug or some configuration issue.


we have default search_path value in postgresql.conf file.
issue appear 1/5
Command used to dump schema:
pg_dump.exe --file=D:\ schmdmp_tmp --no-owner --no-tablespaces --schema=hpdpidb_app --schema-only --password --username=xyz --port=xxxx --host=localhost db_xyz

In normal cases:

-- Dumped from database version 11.5

-- Dumped by pg_dump version 11.5

 

SET statement_timeout = 0;

SET lock_timeout = 0;

SET idle_in_transaction_session_timeout = 0;

SET client_encoding = 'UTF8';

SET standard_conforming_strings = on;

SELECT pg_catalog.set_config('search_path', '', false);


CREATE VIEW hpdpidb_app.dp_cartridges AS

SELECT crt.uuid

   FROM hpdpidb_app.dp_medmng_cartridge crt;

 

Intermittently:

-- Dumped from database version 11.5

-- Dumped by pg_dump version 11.5

 

SET statement_timeout = 0;

SET lock_timeout = 0;

SET idle_in_transaction_session_timeout = 0;

SET client_encoding = 'UTF8';

SET standard_conforming_strings = on;

SELECT pg_catalog.set_config('search_path', 'hpdpidb_app', false);


CREATE VIEW hpdpidb_app.dp_cartridges AS

SELECT crt.uuid

   FROM dp_medmng_cartridge crt;

Thanks,

Neeraj

pgsql-general by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: ERROR: could not start WAL streaming: ERROR: replication slot "XXX" does not exist
Next
From: Luca Ferrari
Date:
Subject: Re: questions about wraparound