Re: Postgresql upgrade to 9.5.12/10.3 changes pg_dump format for cloning schemas

2018-03-13 Thread Melvin Davidson
On Tue, Mar 13, 2018 at 1:47 PM, Melvin Davidson wrote: > > > >> Thank you Melvin, I forgot to mention I've already found your script >> before I asked here, but I didn’t think it was robust enough (please don't >> offend :-). Particularly, it didn't work well on PostgreSQL

Re: Postgresql upgrade to 9.5.12/10.3 changes pg_dump format for cloning schemas

2018-03-13 Thread Melvin Davidson
> Thank you Melvin, I forgot to mention I've already found your script > before I asked here, but I didn’t think it was robust enough (please don't > offend :-). Particularly, it didn't work well on PostgreSQL 10. > > Aldrin, I apologize. I just tested and found that the reason it is failing is

Re: Postgresql upgrade to 9.5.12/10.3 changes pg_dump format for cloning schemas

2018-03-13 Thread Aldrin Martoq Ahumada
> On Mar 9, 2018, at 12:15 PM, Melvin Davidson wrote: > On Fri, Mar 9, 2018 at 10:00 AM, Aldrin Martoq Ahumada > > wrote: > Yes, here is the issue: https://github.com/influitive/apartment/issues/532 >

Re: Postgresql upgrade to 9.5.12/10.3 changes pg_dump format for cloning schemas

2018-03-09 Thread Melvin Davidson
On Fri, Mar 9, 2018 at 10:00 AM, Aldrin Martoq Ahumada < aldrin.mar...@gmail.com> wrote: > Hi Andre, > > Yes, here is the issue: https://github.com/influitive/apartment/issues/532 > > It happens if you configured apartment with use_sql=true, which means it > clones the schema from pg_dump. My

Re: Postgresql upgrade to 9.5.12/10.3 changes pg_dump format for cloning schemas

2018-03-09 Thread Aldrin Martoq Ahumada
Hi Andre, Yes, here is the issue: https://github.com/influitive/apartment/issues/532 It happens if you configured apartment with use_sql=true, which means it clones the schema from pg_dump. My first attempt was to “fix” the script generated

Re: Postgresql upgrade to 9.5.12/10.3 changes pg_dump format for cloning schemas

2018-03-09 Thread Andre Oliveira Freitas
Hello Aldrin, I'm also using apartment with postgresql 9.6.6, and I don't see any issue with it. Are you using Apartment::Tenant.create? 2018-03-09 10:26 GMT-03:00 Aldrin Martoq Ahumada : > Hi, > > For a multi tenant system, we are using the following command to blindly

Re: Postgresql upgrade to 9.5.12/10.3 changes pg_dump format for cloning schemas

2018-03-09 Thread David G. Johnston
On Fri, Mar 9, 2018 at 6:26 AM, Aldrin Martoq Ahumada < aldrin.mar...@gmail.com> wrote: > Thinking in the long term, how could be the best way to clone a schema > into another? > Depends on why you are cloning schemas. Generally not cloning is the best bet - instead place the reference schema

Postgresql upgrade to 9.5.12/10.3 changes pg_dump format for cloning schemas

2018-03-09 Thread Aldrin Martoq Ahumada
Hi, For a multi tenant system, we are using the following command to blindly clone a schema into another: pg_dump -s -x -O -n #{default_tenant} #{dbname} This is done for us by a rails gem, which then feeds that script into the new created schema for the new tenant.