pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: NEERAJ BANSAL <neeraj.bansal@microfocus.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: search_path in pg_dump output.
Date: Mon, 29 Mar 2021 07:59:11 -0700
Message-ID: <72a0339c-a4aa-1be0-84fc-53566b5761ec@aklaver.com> (raw)
In-Reply-To: <DM6PR18MB31131286C2E701139F53AD6C897E9@DM6PR18MB3113.namprd18.prod.outlook.com>
References: <DM6PR18MB31131286C2E701139F53AD6C897E9@DM6PR18MB3113.namprd18.prod.outlook.com>

On 3/28/21 11:00 PM, NEERAJ BANSAL wrote:
> 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 
> <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.

First, the current version of 11 is 11.11. In a quick search of the 
release notes from 11.6 --> 11.11 I don't see anything obviously on 
point, still it would worth it to try the latest version.

Second, where is the Postgres code/package coming from?

> 
> 
> 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
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (2+ messages)

Message-ID: <72a0339c-a4aa-1be0-84fc-53566b5761ec@aklaver.com>
Permalink:  ../72a0339c-a4aa-1be0-84fc-53566b5761ec@aklaver.com/
Also on:    postgresql.org/message-id/72a0339c-a4aa-1be0-84fc-53566b5761ec@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, neeraj.bansal@microfocus.com
  Subject: Re: search_path in pg_dump output.
  In-Reply-To: <72a0339c-a4aa-1be0-84fc-53566b5761ec@aklaver.com>
  References: <DM6PR18MB31131286C2E701139F53AD6C897E9@DM6PR18MB3113.namprd18.prod.outlook.com> <72a0339c-a4aa-1be0-84fc-53566b5761ec@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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