[GENERAL] pg_restore without dropping db/table

2016-03-10 Thread anj patnaik
Hello, I've a database/table already with existing records. I will then create a dump via pg_dump from another database and want to restore into this first database. I just want to update the existing db with any new rows. Does pg_restore only add new rows if I restore without deleting old db? P

[GENERAL] how to create dump of selected rows from a table

2015-12-18 Thread anj patnaik
Currently, I am running pg_dump on an entire table of a database by doing: PGPASSWORD=$PGPASSWORDB /opt/data/PostgreSQL/9.4/bin/pg_dump -t RECORDER -Fc $i -U pguser -Z0 | xz -9 > "$backup_dir/$i-$timeslot-database" However, this table has a lot of rows. Is there a way I could do pg_dump on a su

[GENERAL] error on pg_restore

2015-12-08 Thread anj patnaik
I created a user pguser and gave it all the privileges on database RIC. CREATE USER pguser WITH PASSWORD 'xyz123!'; GRANT ALL PRIVILEGES ON DATABASE "RIC" to pguser; The database RIC was created by user postgres earlier. Now, when I run the pg_restore I get an error: xzcat "postgres-0712152

Re: [GENERAL] 2 questions

2015-12-02 Thread anj patnaik
database. I would like to setup a primary and secondary as cold standby. I am fairly new to PG so asking these questions. Please advise. Thank you. On Tue, Dec 1, 2015 at 11:26 AM, Scott Mead wrote: > > > On Nov 30, 2015, at 12:54, anj patnaik wrote: > > 1) directory listing:

Re: [GENERAL] 2 questions

2015-12-01 Thread anj patnaik
wrote: > On 11/27/2015 01:17 PM, anj patnaik wrote: > >> Hello, >> Yes, postgres is currently installed on a nfs mounted file system. So >> when graphical installer runs, there is a form which asks location for >> installation. I specified this path /opt/nfsDir/Postgres

Re: [GENERAL] 2 questions

2015-12-01 Thread anj patnaik
Thank you! ap On Fri, Nov 27, 2015 at 10:19 AM, Adrian Klaver wrote: > On 11/25/2015 10:28 AM, anj patnaik wrote: > >> Hello all, >> I've got 2 more questions. The cron job is now setup and email gets >> generated with proper body. >> >> I've one se

[GENERAL] 2 questions

2015-11-26 Thread anj patnaik
Hello all, I've got 2 more questions. The cron job is now setup and email gets generated with proper body. I've one setup with NFS which appears to work smoothly. Now soon, I will be given a Linux VM on a different physical server, but will retain my NFS mount. I've installed Postgres 9.4 using th

Re: [GENERAL] error messages not getting logged when running script from cron

2015-11-24 Thread anj patnaik
d also try tweaking the following attached backup script. > Caution, I wrote this quickly from a skeleton script and has not been > tested. > > On Mon, Nov 23, 2015 at 3:21 PM, Tom Lane wrote: > >> anj patnaik writes: >> > My cron tab entry: >> >> > 0 20 *

[GENERAL] error messages not getting logged when running script from cron

2015-11-23 Thread anj patnaik
I have a cron script that does the following: PGPASSWORD=$PGPASSWORD /opt/PostgreSQL/9.4/bin/pg_dump -t RECORDER -Fc $i -U postgres -Z0 | xz -9 > "$backup_dir/$i-$timeslot-database" xzcat "$backup_dir/$i-$timeslot-database" | /opt/PostgreSQL/9.4/bin/pg_restore -h $backupHost -U postgres -d backup

[GENERAL] duplicate key errors in log file

2015-11-18 Thread anj patnaik
The pg log files apparently log error lines every time a user inserts a duplicate. I implemented a composite primary key and then when I see the exception in my client app I update the row with the recent data. however, I don't want the log file to fill out with these error messages since it's han

Re: [GENERAL] can postgres run well on NFS mounted partitions?

2015-11-15 Thread anj patnaik
haven't done power failure test since I'm remote and the systems are UPS'd. Let me know how to detect corruption. Thank you all. On Thu, Nov 12, 2015 at 1:50 PM, Scott Marlowe wrote: > On Thu, Nov 12, 2015 at 11:49 AM, Scott Marlowe > wrote: > > On Thu, Nov 12, 2015 at 1

Re: [GENERAL] can postgres run well on NFS mounted partitions?

2015-11-12 Thread anj patnaik
erver would I be able to test this accurately? Folks in the other teams believe NFS should work fine for us so I need to check it out. Your ideas are highly appreciated! On Tue, Nov 10, 2015 at 9:59 PM, Scott Marlowe wrote: > On Tue, Nov 10, 2015 at 4:26 PM, anj patnaik wrote: > >

[GENERAL] get this warning from pgAdmin

2015-11-12 Thread anj patnaik
I get this warning when trying to fetch data for a postgres db. Does this indicate a real issue? Thanks Running VACUUM recommended The estimated rowcount on the table "recorder" deviates significantly from the actual rowcount. You should run VACUUM ANALYZE on this table.

Re: [GENERAL] can postgres run well on NFS mounted partitions?

2015-11-10 Thread anj patnaik
fine. Thanks for any feedback. On Tue, Nov 10, 2015 at 4:29 AM, Albe Laurenz wrote: > anj patnaik wrote: > > Can anyone advise if there are problems running postgres over NFS > mounted partitions? > > > > I do need reliability and high speed. > > I have got th

Re: [GENERAL] run 2 instances of postgres 9.4 on same linux VM

2015-11-10 Thread anj patnaik
Yes, the instance already running is live in that users are indirectly querying/writing to it. I just need to launch a 2nd instance. On Mon, Nov 9, 2015 at 9:57 PM, Adrian Klaver wrote: > On 11/09/2015 06:03 PM, anj patnaik wrote: > > CCing list > >> I used the graphical insta

Re: [GENERAL] run 2 instances of postgres 9.4 on same linux VM

2015-11-10 Thread anj patnaik
-postgresql-9-2-instances-on-one-server-in-centos-6rhel-6fedora/ On Mon, Nov 9, 2015 at 4:30 PM, Adrian Klaver wrote: > On 11/09/2015 11:40 AM, anj patnaik wrote: > >> I have a linux 6.5 RHEL VM in which I am running an instance of PG 9.4. >> In order to test NFS, I want to run a second i

[GENERAL] run 2 instances of postgres 9.4 on same linux VM

2015-11-09 Thread anj patnaik
I have a linux 6.5 RHEL VM in which I am running an instance of PG 9.4. In order to test NFS, I want to run a second instance on same VM but different file system. Has anyone done this and is it possible with no issues? Or is it better to run different versions of PG on same server? Please advis

[GENERAL] can postgres run well on NFS mounted partitions?

2015-11-09 Thread anj patnaik
Can anyone advise if there are problems running postgres over NFS mounted partitions? I do need reliability and high speed. Thank you.

Re: [GENERAL] does pg_dump get delayed if I have a loop that does continuous insertions

2015-10-28 Thread anj patnaik
2015 04:10 PM, anj patnaik wrote: > >> I am running pg_dump on a database while on another machine running a >> loop to do insertions. >> >> Does pg_dump wait for idle activity before it completes or how does it >> determine when it has all the records needed for archiv

[GENERAL] does pg_dump get delayed if I have a loop that does continuous insertions

2015-10-27 Thread anj patnaik
I am running pg_dump on a database while on another machine running a loop to do insertions. Does pg_dump wait for idle activity before it completes or how does it determine when it has all the records needed for archiving? I am using the compressed mode and also using xz. Thanks, ap

Re: [GENERAL] question

2015-10-26 Thread anj patnaik
as root. xzcat dump_xz |/opt/PostgreSQL/9.4/bin/psql -h mymachine.com postgres Password: Thank you! On Sat, Oct 17, 2015 at 7:42 AM, Francisco Olarte wrote: > Hi Anj: > > On Sat, Oct 17, 2015 at 3:11 AM, anj patnaik wrote: > > My question is for Francisco who replied regarding

Re: [GENERAL] question

2015-10-26 Thread anj patnaik
mycomp.com postgres -U postgres Thanks. On Fri, Oct 23, 2015 at 6:07 PM, anj patnaik wrote: > Thanks Adrian. I've got postgres 9.4 running on a second RHEL 6.5 machine. > This is the machine I want to restore the pg_dump to. > > Last week, I ran this command on the main

Fwd: [GENERAL] trouble downloading postgres 9.4 for RHEL 6.x

2015-10-23 Thread anj patnaik
l-9.4 restart Stopping postgresql-9.4 service: [ OK ] Starting postgresql-9.4 service: [FAILED] -bash-4.1$ vi /var/lib/pgsql/9.4/pgstartup.log On Thu, Oct 22, 2015 at 4:11 PM, Adrian Klaver wrote: > On 10/22/2015 01:05 PM, anj patnaik wrote: &

Re: [GENERAL] trouble downloading postgres 9.4 for RHEL 6.x

2015-10-22 Thread anj patnaik
likely due to an incomplete or corrupt downloaded file On Wed, Oct 21, 2015 at 12:28 PM, Adrian Klaver wrote: > On 10/21/2015 09:14 AM, anj patnaik wrote: > >> Ok, i am trying to determine why I am getting errors. Is it possible >> that my browser is corrupting the transfer? >

Re: [GENERAL] trouble downloading postgres 9.4 for RHEL 6.x

2015-10-21 Thread anj patnaik
With the graphical installer, I had a way to create a user. Does it create postgres user by default? Let me know. Thx On Wed, Oct 21, 2015 at 1:43 PM, Scott Mead wrote: > > > On Oct 21, 2015, at 12:28, Adrian Klaver > wrote: > > > >> On 10/21/2015 09:14 AM, anj p

Re: [GENERAL] trouble downloading postgres 9.4 for RHEL 6.x

2015-10-21 Thread anj patnaik
er to download. is there a way to use yum to get the same installer program that goes through all the steps? Please advise. thanks On Wed, Oct 21, 2015 at 9:08 AM, Adrian Klaver wrote: > On 10/20/2015 05:48 PM, anj patnaik wrote: > >> Several weeks ago, I successfully >> downloaded p

[GENERAL] trouble downloading postgres 9.4 for RHEL 6.x

2015-10-20 Thread anj patnaik
Several weeks ago, I successfully downloaded postgresql-9.4.4-3-linux-x64.run on a Linux server. Today, I attempted to download from the site. I notice 9.5 is there, but getting lots of errors: 1) when downloading and running latest rchive: /home/apatnaik/Downloads/postgresql-9.4.5-1-windows-x6

Re: [GENERAL] question

2015-10-17 Thread anj patnaik
My question is for Francisco who replied regarding xz. I was curious what options he used. Thanks. On Fri, Oct 16, 2015 at 3:14 PM, Adrian Klaver wrote: > On 10/16/2015 12:10 PM, anj patnaik wrote: > >> Thanks. what is the recommended command/options for backup and how to >>

Re: [GENERAL] question

2015-10-17 Thread anj patnaik
15 at 8:27 AM, Guillaume Lelarge > wrote: > > 2015-10-15 23:05 GMT+02:00 Adrian Klaver : > >> On 10/15/2015 01:35 PM, anj patnaik wrote: > ... > >>> ./pg_dump -t RECORDER -Fc postgres | gzip > /tmp/dump > >>> Are there any other options for large tables

Re: [GENERAL] question

2015-10-16 Thread anj patnaik
, please point them to me. Thanks!! On Thu, Oct 15, 2015 at 3:59 PM, Scott Mead wrote: > > On Thu, Oct 15, 2015 at 3:55 PM, Guillaume Lelarge > wrote: > >> 2015-10-15 20:40 GMT+02:00 anj patnaik : >> >>> It's a Linux machine with 8 CPUs. I don't have

Re: [GENERAL] question

2015-10-15 Thread anj patnaik
ur hard disk configuration? > What other applications are running simultaneously with pg_dump? > What is the value of shared_memory & maintenance_work_mem in > postgresql.conf? > > On Thu, Oct 15, 2015 at 11:04 AM, Adrian Klaver > wrote: > >> On 10/14/2015 06:39 PM,

[GENERAL] question

2015-10-15 Thread anj patnaik
Hello, I recently downloaded postgres 9.4 and I have a client application that runs in Tcl that inserts to the db and fetches records. For the majority of the time, the app will connect to the server to do insert/fetch. For occasional use, we want to remove the requirement to have a server db an