pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #16214: Settings is not copy
2+ messages / 2 participants
[nested] [flat]

* BUG #16214: Settings is not copy
@ 2020-01-17 04:23 PG Bug reporting form <noreply@postgresql.org>
  2020-01-17 05:37 ` Re: BUG #16214: Settings is not copy Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2020-01-17 04:23 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: shurutov@gmail.com

The following bug has been logged on the website:

Bug reference:      16214
Logged by:          Michail Shurutov
Email address:      shurutov@gmail.com
PostgreSQL version: 11.6
Operating system:   Gentoo, RHEL
Description:        

I downloaded and ulpoaded into local PostgreSQL instance demo database from
Postgres Professional: https://postgrespro.ru/education/demodb
Than I made copy as "CREATE DATABASE demo_small template demo", after this I
noticed:
postgres=# \c demo                                                          
   
You are now connected to database "demo" as user "postgres".                
   
demo=# select name,setting from pg_settings where name = 'search_path';     
   
    name     |     setting                                                  
   
-------------+------------------                                            
   
 search_path | bookings, public                                             
   
(1 row)                                                                     
   
                                                                            
   
demo=# \c demo_small                                                        
   
You are now connected to database "demo_small" as user "postgres".          
   
demo_small=# select name,setting from pg_settings where name =
'search_path';   
    name     |     setting                                                  
   
-------------+-----------------                                             
   
 search_path | "$user", public                                              
   
(1 row)                                                                     
   
                                                                            
   
demo_small=# \q

Parameter "search_path" was not copied.

And command "ALTER DATABASE" was not in included into dump made by
pg_dump:
mshurutov@desktop fromarch $ sudo -u postgres pg_dump -C demo_small >
/var/tmp/demo_small.sql
mshurutov@desktop fromarch $ grep "ALTER DATABASE" demo-small-20170815.sql
ALTER DATABASE demo SET search_path = bookings, public;
ALTER DATABASE demo SET bookings.lang = ru;
mshurutov@desktop fromarch $ grep "ALTER DATABASE" /var/tmp/demo_small.sql

ALTER DATABASE demo_small OWNER TO postgres;
mshurutov@desktop fromarch $



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

* Re: BUG #16214: Settings is not copy
  2020-01-17 04:23 BUG #16214: Settings is not copy PG Bug reporting form <noreply@postgresql.org>
@ 2020-01-17 05:37 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2020-01-17 05:37 UTC (permalink / raw)
  To: shurutov@gmail.com; +Cc: pgsql-bugs@lists.postgresql.org

PG Bug reporting form <noreply@postgresql.org> writes:
> Than I made copy as "CREATE DATABASE demo_small template demo", after this I
> noticed:
> ...
> Parameter "search_path" was not copied.

CREATE DATABASE is not defined to copy database-level properties,
only the contents of the database.  As it says in the manual,
this is not really intended as a general-purpose database copying
command in the first place.  For its intended purpose, copying
database-level properties wouldn't be particularly desirable.
Certainly you wouldn't want it to clone the database's ownership
or ACL.

			regards, tom lane





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


end of thread, other threads:[~2020-01-17 05:37 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-01-17 04:23 BUG #16214: Settings is not copy PG Bug reporting form <noreply@postgresql.org>
2020-01-17 05:37 ` Tom Lane <tgl@sss.pgh.pa.us>

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