Re: Copy entire schema A to a different schema B

2019-02-22 Thread Tiffany Thang
Hi Melvin, Unfortunately I was not able to use it because I was not able to access pg_authid in RDS. Thanks. Tiff On Thu, Feb 21, 2019 at 6:09 PM Melvin Davidson wrote: > Tiffany, have you tried the clone_schema function? It seems to me it does > exactly what you need, no dumping or

Re: Copy entire schema A to a different schema B

2019-02-21 Thread Melvin Davidson
Tiffany, have you tried the clone_schema function? It seems to me it does exactly what you need, no dumping or restoring. There is even an option to copy the data or not. Default is not. On Thu, Feb 21, 2019 at 3:23 PM Adrian Klaver wrote: > On 2/21/19 11:52 AM, Tiffany Thang wrote: > > Thanks

Re: Copy entire schema A to a different schema B

2019-02-21 Thread Adrian Klaver
On 2/21/19 11:52 AM, Tiffany Thang wrote: Thanks everyone. Unfortunately the schema rename would not work since the source database will be our production system. We have not gone live yet but the system is expected to be constantly used. I have multiple tables that I need to export ranging

Re: Copy entire schema A to a different schema B

2019-02-21 Thread Tiffany Thang
Thanks everyone. Unfortunately the schema rename would not work since the source database will be our production system. We have not gone live yet but the system is expected to be constantly used. I have multiple tables that I need to export ranging from 20GB to 60GB each. The parallel will not

Re: Copy entire schema A to a different schema B

2019-02-20 Thread Jiří Fejfar
Hi Tiffany, Isn't it possible for you to do: 1) rename temporarily schema testuser1 to testuser2 2) dump that schema into binary format 3 rename back schema testuser2 to testuser1 4 restore backup to testuser2 schema on other DB? Jura. On Wed, 20 Feb 2019 at 23:23, Tiffany Thang wrote: > > Hi

Re: Copy entire schema A to a different schema B

2019-02-20 Thread Ron
On 2/20/19 6:16 PM, Adrian Klaver wrote: On 2/20/19 2:22 PM, Tiffany Thang wrote: Hi Adrian, I managed to backup my table in parallel using -Fd but I'm back to my original issue where I could not restore the table to a different schema. For example, I would like to backup testuser1.mytable

Re: Copy entire schema A to a different schema B

2019-02-20 Thread Adrian Klaver
On 2/20/19 2:22 PM, Tiffany Thang wrote: Hi Adrian, I managed to backup my table in parallel using -Fd but I'm back to my original issue where I could not restore the table to a different schema. For example, I would like to backup testuser1.mytable and restore it to testuser2.mytable.

Re: Copy entire schema A to a different schema B

2019-02-20 Thread Rob Sargent
On 2/20/19 4:21 PM, Tiffany Thang wrote: Hi Ron, How would that work if I'm only interested in importing/refreshing a single table in a target schema that contains several other tables? Thanks. Tiff On Wed, Feb 20, 2019 at 5:36 PM Rob Sargent > wrote:

Re: Copy entire schema A to a different schema B

2019-02-20 Thread Tiffany Thang
Hi Ron, How would that work if I'm only interested in importing/refreshing a single table in a target schema that contains several other tables? Thanks. Tiff On Wed, Feb 20, 2019 at 5:36 PM Rob Sargent wrote: > > On 2/20/19 3:22 PM, Tiffany Thang wrote: > > Hi Adrian, > I managed to backup my

Re: Copy entire schema A to a different schema B

2019-02-20 Thread Rob Sargent
On 2/20/19 3:22 PM, Tiffany Thang wrote: Hi Adrian, I managed to backup my table in parallel using -Fd but I'm back to my original issue where I could not restore the table to a different schema. For example, I would like to backup testuser1.mytable and restore it to testuser2.mytable.

Re: Copy entire schema A to a different schema B

2019-02-20 Thread Tiffany Thang
Hi Adrian, I managed to backup my table in parallel using -Fd but I'm back to my original issue where I could not restore the table to a different schema. For example, I would like to backup testuser1.mytable and restore it to testuser2.mytable. pg_dump -U testuser1 -Fd -f c:\temp\testuser1 -j 8

Re: Copy entire schema A to a different schema B

2019-02-12 Thread Tiffany Thang
Thanks Adrian! Tiff On Mon, Feb 11, 2019 at 11:53 AM Adrian Klaver wrote: > On 2/11/19 8:30 AM, Tiffany Thang wrote: > > Thanks Adrian and Ron. Sorry, I was not clear. What I'm trying to > > achieve was to dump the schema quickly and be able to restore a single > > or subset of objects from

Re: Copy entire schema A to a different schema B

2019-02-11 Thread Adrian Klaver
On 2/11/19 8:30 AM, Tiffany Thang wrote: Thanks Adrian and Ron. Sorry, I was not clear. What I'm trying to achieve was to dump the schema quickly and be able to restore a single or subset of objects from the dump. As far as I understand, the only way of achieving that is to use the custom

Re: Copy entire schema A to a different schema B

2019-02-11 Thread Tiffany Thang
Thanks Adrian and Ron. Sorry, I was not clear. What I'm trying to achieve was to dump the schema quickly and be able to restore a single or subset of objects from the dump. As far as I understand, the only way of achieving that is to use the custom format and the -j option. Is that correct? Are

Re: Copy entire schema A to a different schema B

2019-02-11 Thread Ron
On 2/11/19 10:00 AM, Tiffany Thang wrote: Hi, To copy the source schema A to target schema B in the same database in PG10.3, I use psql to dump schema A and manually removes anything specific to the schema in the text dump file before importing into schema B. How do I achieve the same

Re: Copy entire schema A to a different schema B

2019-02-11 Thread Adrian Klaver
On 2/11/19 8:00 AM, Tiffany Thang wrote: Hi, To copy the source schema A to target schema B in the same database in PG10.3, I use psql to dump schema A and manually removes anything specific to the schema in the text dump file before importing into schema B. How do I achieve the same

Copy entire schema A to a different schema B

2019-02-11 Thread Tiffany Thang
Hi, To copy the source schema A to target schema B in the same database in PG10.3, I use psql to dump schema A and manually removes anything specific to the schema in the text dump file before importing into schema B. How do I achieve the same exporting from Schema A and importing into schema B