Re: [GENERAL] PGPASSWORD - More than one in a bash script

2016-08-17 Thread Adrian Klaver
On 08/17/2016 09:01 PM, Patrick B wrote: Hi guys, I'm writing a bash script to dump and restore (pg_dump + pg_restore) a test database. However, the username to access the pg_dump server is different of the one to access pg_restore. I'm using the PGPASSWORD parameter on the script, but can I

[GENERAL] PGPASSWORD - More than one in a bash script

2016-08-17 Thread Patrick B
Hi guys, I'm writing a bash script to dump and restore (pg_dump + pg_restore) a test database. However, the username to access the pg_dump server is different of the one to access pg_restore. I'm using the PGPASSWORD parameter on the script, but can I put two of that? like: > PGPASSWORD >

Re: [GENERAL] Critical failure of standby

2016-08-17 Thread James Sewell
Hi, No, this was a one off in a network split situation. I'll check the startup when I get a chance - thanks for the help. Cheers, James Sewell, Solutions Architect Suite 112, Jones Bay Wharf, 26-32 Pirrama Road, Pyrmont NSW 2009 *P *(+61) 2 8099 9000 <(+61)%202%208099%209000> *W*

Re: [GENERAL] Permissions pg_dump / import

2016-08-17 Thread Patrick B
2016-08-18 10:30 GMT+12:00 Ilya Kazakevich : > >> Owned by: public.accounts.id > > This is not owner but table this sequence depends on. See > http://stackoverflow.com/questions/6941043/get-table- > and-column-owning-a-sequence > > > > Use query provided on SO to

Re: [GENERAL] Re: Easiest way to compare the results of two queries row by row and column by column

2016-08-17 Thread Branden Visser
On Wed, Aug 17, 2016 at 4:58 AM, gilad905 wrote: > Vik, note that your new suggestion for a query might be more > readable/efficient than Jeff's, but IT STILL DOESN'T SOLVE THE PROBLEM OF > DETECTING DUPLICATE ROWS. > I've done this in the past and in my use-case it was easy

Re: [GENERAL] Permissions pg_dump / import

2016-08-17 Thread Ilya Kazakevich
>> Owned by: public.accounts.id This is not owner but table this sequence depends on. See http://stackoverflow.com/questions/6941043/get-table-and-column-owning-a-sequence Use query provided on SO to get real owner Ilya Kazakevich JetBrains http://www.jetbrains.com

Re: [GENERAL] Permissions pg_dump / import

2016-08-17 Thread Steve Crawford
Check out the --no-owner and/or --no-acl flags when performing the dump. These eliminate the statements that set and/or alter ownership of database objects. For use in a test server where the username of the test-server database is different than the username on the production server *and* where

[GENERAL] Permissions pg_dump / import

2016-08-17 Thread Patrick B
Hi guys, I'm running a pg_dump and then importing the dump into a test server. I'm using PostgreSQL 9.5. *pg_dump:* > pg_dump --dbname=prod1 --host= servername --port=5432 --username=user1 -v > -f test1_NEW.sql *Steps into the new database (test1):* > CREATE SCHEMA public; > GRANT ALL ON

[GENERAL] Re: Easiest way to compare the results of two queries row by row and column by column

2016-08-17 Thread gilad905
Vik, note that your new suggestion for a query might be more readable/efficient than Jeff's, but IT STILL DOESN'T SOLVE THE PROBLEM OF DETECTING DUPLICATE ROWS. -- View this message in context:

Re: [GENERAL] pgbasebackup is failing after truncate

2016-08-17 Thread Yelai, Ramkumar
Hi, I have only one database and I ran query with superuser privilege. Seems this issue is related to BUG 14243. Regards, Ramkumar. -Original Message- From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] Sent: Friday, August 12, 2016 7:37 PM To: Yelai, Ramkumar (CT DD DS AA DF-PD FH

Re: [GENERAL] pgbasebackup is failing after truncate

2016-08-17 Thread Yelai, Ramkumar
HI, Thanks for helpful information. Even if there is no way to fix then please let me know how long that file ( pending for deletion ) will be present in that directory. I observe like 1 or 2 hr after it will be deleted. But I am wondering, who is deleting that file. Regards, Ramkumar

Re: [GENERAL] regexp_replace double quote

2016-08-17 Thread Михаил
Thank you! 2016-08-15 18:36 GMT+05:00, hubert depesz lubaczewski : > On Mon, Aug 15, 2016 at 06:27:06PM +0500, Михаил wrote: >> I need to escape double quotes only: >> test=# select regexp_replace('"""{Performer,"Boomwacker ""a"" >> Recording""}"""', '([^"])"{2}([^"])',

Re: [GENERAL] 9.2 to 9.5 pg_upgrade losing data

2016-08-17 Thread Pete Fuller
We first noticed the issue after running the generated analyze script, in subsequent tests it shows up before the analyze though. Ran thru the process as a test monday night and it worked. This time however, I deleted the complete 9.2 data directory before running our rsync scripts that