Re: [GENERAL] warm standby - apply wal archives

2011-09-06 Thread MirrorX
The network bandwidth between the servers is definitely not an issue. What is bothering me is the big size of the wal archives, which goes up to 200GB per day and if the standby server will be able to replay all these files. The argument that; since the master can do it and also do various other

Re: [GENERAL] Query runs in 335ms; function in 100,239ms : date problem?

2011-09-06 Thread Torsten Zühlsdorff
Rory Campbell-Lange schrieb: Try to run it as a prepared query - I guess you'll get about the same run time as with the function (i.e. over 100 seconds). The prepared query runs in almost exactly the same time as the function, but thanks for the suggestion. A very useful aspect of it is that I

Re: [GENERAL] warm standby - apply wal archives

2011-09-06 Thread Venkat Balaji
Considering the size of WAL archives = 200GB Compressing them using gzip (you can use this command in a shell script and place it in archive_command as well) would possibly reduce the size to as low as 10 - 20 GB. Please let us know the results. Thanks Venkat On Tue, Sep 6, 2011 at 1:03 PM,

Re: [GENERAL] warm standby - apply wal archives

2011-09-06 Thread MirrorX
the network transfer does not bother me for now. i will first try to do the whole procedure without compression, so as not to waste any cpu util and time for compressing and decompressing. through the 4Gbps ethernet, the 200GB of the day can be transferred in a matter of minutes. so i will try it

Re: [GENERAL] [pgadmin-support] Help for Migration

2011-09-06 Thread Mamatha_Kagathi_Chan
Hi, I am trying to migrate a very small MS SQL Server Database (with 200 records max, 20 tables, 10 stored procedures) to PostgreSQL. I tried browsing through internet to find technical steps but I found some blogs with vague discussion for same. Kindly let me know where to look for the

Re: [GENERAL] [pgadmin-support] Help for Migration

2011-09-06 Thread David Fetter
On Tue, Sep 06, 2011 at 12:17:28PM +, mamatha_kagathi_c...@dell.com wrote: Hi, I am trying to migrate a very small MS SQL Server Database (with 200 records max, 20 tables, 10 stored procedures) to PostgreSQL. I tried browsing through internet to find technical steps but I found some

Re: [GENERAL] UPDATE using query; per-row function calling problem

2011-09-06 Thread David Johnston
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Rory Campbell-Lange Sent: Monday, September 05, 2011 4:55 PM To: David Johnston Cc: Tom Lane; pgsql-general@postgresql.org Subject: Re: [GENERAL] UPDATE using query; per-row

Re: [GENERAL] Query runs in 335ms; function in 100,239ms : date problem?

2011-09-06 Thread Tom Lane
Tomas Vondra t...@fuzzy.cz writes: On 6 Září 2011, 0:27, Rory Campbell-Lange wrote: The prepared query runs in almost exactly the same time as the function, but thanks for the suggestion. A very useful aspect of it is that I was able to get the EXPLAIN output which I guess gives a fairly

[GENERAL] Demoting master to slave without an rsync...is it safe?

2011-09-06 Thread Chris Redekop
I have a master+slave set up using asynchronous streaming replication. If I do a graceful (-fast) shutdown of the master, and then promote the slave to master, my understanding is that I should not have any data loss. At that point in order to bring the old master back up as a slave the docs say

[GENERAL] Backend process that won't die

2011-09-06 Thread Susan Cassidy
I have a couple of backend processes that are stuck, and do not respond to a pg_cancel_backend. This is PostgreSQL 8.3.5. The pg_cancel_backend returns true, but the process keeps running. I have also done a kill 12345 from the command-line, with no effect. The processes are running a

Re: [GENERAL] Demoting master to slave without an rsync...is it safe?

2011-09-06 Thread Alex Lai
Chris Redekop wrote: I have a master+slave set up using asynchronous streaming replication. If I do a graceful (-fast) shutdown of the master, and then promote the slave to master, my understanding is that I should not have any data loss. At that point in order to bring the old master back

Re: [GENERAL] Backend process that won't die

2011-09-06 Thread Tom Lane
Susan Cassidy scass...@edgewave.com writes: I have a couple of backend processes that are stuck, and do not respond to a pg_cancel_backend. This is PostgreSQL 8.3.5. The pg_cancel_backend returns true, but the process keeps running. I have also done a kill 12345 from the command-line,

Re: [GENERAL] Backend process that won't die

2011-09-06 Thread Susan Cassidy
-Original Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: Tuesday, September 06, 2011 9:57 AM To: Susan Cassidy Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Backend process that won't die Susan Cassidy scass...@edgewave.com writes: I have a couple of backend

[GENERAL] Deleting one of 2 identical records

2011-09-06 Thread Gauthier, Dave
Hi: If I have a table that has 2 records which are identical with regard to all their column values, is there a way to delete one of them, leaving one remaining? Is there some unique record_id key of some sort I can use for somethign like this? Thanks in Advance!

Re: [GENERAL] Deleting one of 2 identical records

2011-09-06 Thread Thom Brown
On 6 September 2011 18:39, Gauthier, Dave dave.gauth...@intel.com wrote: Hi: ** ** If I have a table that has 2 records which are identical with regard to all their column values, is there a way to delete one of them, leaving one remaining? Is there some unique record_id key of some

Re: [GENERAL] Deleting one of 2 identical records

2011-09-06 Thread Andy Colson
On 9/6/2011 12:39 PM, Gauthier, Dave wrote: Hi: If I have a table that has 2 records which are identical with regard to all their column values, is there a way to delete one of them, leaving one remaining? Is there some unique record_id key of some sort I can use for somethign like this?

Re: [GENERAL] Deleting one of 2 identical records

2011-09-06 Thread Andy Colson
On 9/6/2011 12:44 PM, Thom Brown wrote: On 6 September 2011 18:39, Gauthier, Dave dave.gauth...@intel.com mailto:dave.gauth...@intel.com wrote: Hi: __ __ If I have a table that has 2 records which are identical with regard to all their column values, is there a way to

Re: [GENERAL] Deleting one of 2 identical records

2011-09-06 Thread Andreas Kretschmer
Gauthier, Dave dave.gauth...@intel.com wrote: Hi: If I have a table that has 2 records which are identical with regard to all their column values, is there a way to delete one of them, leaving one remaining? Is there some unique record_id key of some sort I can use for somethign like

Re: [GENERAL] Deleting one of 2 identical records

2011-09-06 Thread Gauthier, Dave
The identification and deleting of the records using ctids seems to have worked fine. Thanks ! -Original Message- From: Andy Colson [mailto:a...@squeakycode.net] Sent: Tuesday, September 06, 2011 1:55 PM To: Thom Brown Cc: Gauthier, Dave; pgsql-general@postgresql.org Subject: Re:

[GENERAL] Which perl works with pg9.1

2011-09-06 Thread pasman pasmański
Hi. I have installed activeperl 5.10. It works with pg8.4, but not with 9.1rc1 (win32 installer). Do this version need perl 5.12? -- pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] Which perl works with pg9.1

2011-09-06 Thread Bruce Momjian
pasman pasma?ski wrote: Hi. I have installed activeperl 5.10. It works with pg8.4, but not with 9.1rc1 (win32 installer). Do this version need perl 5.12? Odd, the source code only requires Perl 5.8. Not sure why win32 would need a later version. What error are you seeing? -- Bruce

Re: [GENERAL] conditional insert

2011-09-06 Thread Lincoln Yeoh
At 07:02 PM 9/5/2011, J. Hondius wrote: I agree that there are better ways to do this. But for me this works. (legacy driven situation) INSERT INTO tbinitialisatie (col1, col2) SELECT 'x', 'y' FROM tbinitialisatie WHERE not exists (select * from tbinitialisatie where col1 = 'x' and col2 =

[GENERAL] Advice on HA option

2011-09-06 Thread hyelluas
Hello, I need to implement HA for the appliance that is sold to the customer - our application has no DBA and must be very stable and self recoverable. We are running PostgreSQL 8.4. Is the warm standby a good solution for us? Thank you for all the suggestions. Helen -- View this

Re: [GENERAL] conditional insert

2011-09-06 Thread Merlin Moncure
On Tue, Sep 6, 2011 at 1:50 PM, Lincoln Yeoh ly...@pop.jaring.my wrote: At 07:02 PM 9/5/2011, J. Hondius wrote: I agree that there are better ways to do this. But for me this works. (legacy driven situation) INSERT INTO tbinitialisatie (col1, col2)  SELECT 'x', 'y'  FROM tbinitialisatie  

Re: [GENERAL] Advice on HA option

2011-09-06 Thread Merlin Moncure
On Tue, Sep 6, 2011 at 2:06 PM, hyelluas helen_yell...@mcafee.com wrote: Hello, I need to implement HA for the appliance that is sold to the customer  - our application has no DBA and must be very stable and self  recoverable. We are running PostgreSQL 8.4. Is the warm standby a good

Re: [GENERAL] Demoting master to slave without an rsync...is it safe?

2011-09-06 Thread Chris Redekop
I have two questions: (1) Did you set recovery_target_timeline='**latest' in both master and slave? Yesbut it's in recovery.conf so it only really applies to whichever server is currently the slave... (2) Did you make any changes after promote the slave to be master? Yes,

Re: [GENERAL] conditional insert

2011-09-06 Thread Merlin Moncure
On Tue, Sep 6, 2011 at 3:45 PM, Merlin Moncure mmonc...@gmail.com wrote: On Tue, Sep 6, 2011 at 1:50 PM, Lincoln Yeoh ly...@pop.jaring.my wrote: At 07:02 PM 9/5/2011, J. Hondius wrote: I agree that there are better ways to do this. But for me this works. (legacy driven situation) INSERT

Re: [GENERAL] Deleting one of 2 identical records

2011-09-06 Thread David Johnston
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Andy Colson Sent: Tuesday, September 06, 2011 1:55 PM To: Thom Brown Cc: Gauthier, Dave; pgsql-general@postgresql.org Subject: Re: [GENERAL] Deleting one of 2 identical

[GENERAL] Complex query question

2011-09-06 Thread Mike Orr
I have a complex query question whose answer I think would help me to understand subselects and aggregates better. I have a table with four columns of interest: id (int primary key), loc_title (varchar null), loc_value (float null), loc_unit (varchar null) I want the output columns to be: (1)

Re: [GENERAL] Deleting one of 2 identical records

2011-09-06 Thread Thom Brown
On 6 September 2011 19:00, Gauthier, Dave dave.gauth...@intel.com wrote: The identification and deleting of the records using ctids seems to have worked fine. Thanks ! Alternative you could do something like this: WITH keep AS ( SELECT my_table AS duplicate_row,

Re: [GENERAL] Deleting one of 2 identical records

2011-09-06 Thread salah jubeh
Hello Thom. what is the meaning of   select table_name from table_name    Also is this a common behavior of all Databases i.e. oracle , Microsoft ,...etc  . i.e is this is the standard behavior  I think this is a good way to find duplicates in general, I will write a routine to compare all

Re: [GENERAL] Deleting one of 2 identical records

2011-09-06 Thread Thom Brown
On 7 September 2011 00:55, salah jubeh s_ju...@yahoo.com wrote: Hello Thom. what is the meaning of select table_name from table_name Also is this a common behavior of all Databases i.e. oracle , Microsoft ,...etc . i.e is this is the standard behavior I think this is a good way to

Re: [GENERAL] Which perl works with pg9.1

2011-09-06 Thread Craig Ringer
On 7/09/2011 3:00 AM, Bruce Momjian wrote: pasman pasma�ski wrote: Hi. I have installed activeperl 5.10. It works with pg8.4, but not with 9.1rc1 (win32 installer). Do this version need perl 5.12? Odd, the source code only requires Perl 5.8. Not sure why win32 would need a later version.

Re: [GENERAL] Which perl works with pg9.1

2011-09-06 Thread Bruce Momjian
Craig Ringer wrote: On 7/09/2011 3:00 AM, Bruce Momjian wrote: pasman pasma?ski wrote: Hi. I have installed activeperl 5.10. It works with pg8.4, but not with 9.1rc1 (win32 installer). Do this version need perl 5.12? Odd, the source code only requires Perl 5.8. Not sure why win32

[GENERAL] Disconnecting and cancelling a statement

2011-09-06 Thread Jeff Davis
I'm looking for a reliable way for a client to disconnect from a backend such that any running query is terminated. Right now, PostgreSQL doesn't seem to make an effort to detect a client cancellation. For instance, if you do a select pg_sleep(1000) and then kill -9 the client, the SELECT will