Re: [GENERAL] PITR - warm standby switchover question

2009-04-15 Thread Fujii Masao
Hi, On Wed, Apr 15, 2009 at 9:23 AM, Dan Hayes wrote: > Excellent!  Thanks.  One other quick question...  What would happen if I > didn't delete the recovery.conf file?  Is that step just to prevent > accidentally restarting the server with it there? recovery.conf is automatically renamed recove

[GENERAL] (P)SQL for a sum with constraints

2009-04-15 Thread Shug Boabby
Hello all, I have a table with 2 bigint columns, let's call them A and B. I need a query that will allow me to return A alongside the sum of Bs from rows where A is less than or equal to this row's A. It is best described with some example data, consider the following: A B 1 0 2 1 3 0 4 2 5 1 I

[GENERAL] pg_reorg -> Anyone has any experience with it?

2009-04-15 Thread Ow Mun Heng
I was trying to clean up my database and after 2 days of vacuum full on a 20GB table, I gave up and used pg_reorg which is seriously fast. However, now I'm not sure if it is the cause of my unstable DB (8.2.13) I can connect, initiate a simple query and the DB will do down logs says : The post

Re: [GENERAL] (P)SQL for a sum with constraints

2009-04-15 Thread hubert depesz lubaczewski
On Wed, Apr 15, 2009 at 11:09:49AM +0100, Shug Boabby wrote: > Anyone have any ideas how to do this? I'm able to do it > programmatically, but it's slow. Optimally I'd like to be able to do > this in the DB. As you can see, it's a little trickier that the usual > aggregate function with a GROUP BY

Re: [GENERAL] (P)SQL for a sum with constraints

2009-04-15 Thread A. Kretschmer
In response to Shug Boabby : > Hello all, > > I have a table with 2 bigint columns, let's call them A and B. I need > a query that will allow me to return A alongside the sum of Bs from > rows where A is less than or equal to this row's A. It is best > described with some example data, consider th

Re: [GENERAL] Disconnected editing - versioning of databases

2009-04-15 Thread Dimitri Fontaine
Le Wednesday 15 April 2009, Greg Smith a écrit : > On Tue, 14 Apr 2009, William Temperley wrote: > > I could potentially run a database in each of these countries and > > provide 100% uptime, obviously raising the issue of version conflicts > > that would require hand-merging. Can you partition da

[GENERAL] need information

2009-04-15 Thread Peeyush
Hey guys, I need some information on 1. What are the best features of Npgsql product as compare to other commercial .net data providers? 2. If you have encountered any major problems, bugs or performance issue etc... With this product? Thanks in advance, Peeyush Jain| Software Engineer

[GENERAL] Performance of full outer join in 8.3

2009-04-15 Thread Christian Schröder
Hi list, we have just migrated one of our databases from 8.2.12 to 8.3.7. We now experience a strange problem: A query that was really fast on the 8.2 server is now much slower on the 8.3 server (1 ms vs. 60 sec). I had a look at the query plan and it is completely different. Both servers run

[GENERAL] how to escape back-slash mark.

2009-04-15 Thread Quan Zongliang
hi, all The PostgreSQL has a option: backslash_quote. It can be on, off or safe_encoding. How to set it to ingore back-slash check? The command: INSERT INTO table_name VALUES(..., '\\', ...); always get a warning message whatever it is. If use E'\\', value will be saved as '\' in database. Has a

Re: [GENERAL] Performance of full outer join in 8.3

2009-04-15 Thread Grzegorz Jaśkiewicz
set work_mem=24000; before running the query. postgres is doing merge and sort on disc, that's always slow. is there an index on column isin ? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-gen

Re: [GENERAL] Performance of full outer join in 8.3

2009-04-15 Thread Christian Schröder
Grzegorz Jaśkiewicz wrote: set work_mem=24000; before running the query. postgres is doing merge and sort on disc, that's always slow. Ok, but why is the plan different in 8.2? As you can see the same query is really fast in 8.2, but slow in 8.3. is there an index on column isin ? There

Re: [GENERAL] Performance of full outer join in 8.3

2009-04-15 Thread Grzegorz Jaśkiewicz
2009/4/15 Christian Schröder : > Grzegorz Jaśkiewicz wrote: >> >> set work_mem=24000; before running the query. >> >> postgres is doing merge and sort on disc, that's always slow. >> > > Ok, but why is the plan different in 8.2? As you can see the same query is > really fast in 8.2, but slow in 8.3

Re: [GENERAL] Performance of full outer join in 8.3

2009-04-15 Thread Simon Riggs
On Wed, 2009-04-15 at 14:04 +0200, Christian Schröder wrote: > Grzegorz Jaśkiewicz wrote: > > set work_mem=24000; before running the query. > > > > postgres is doing merge and sort on disc, that's always slow. > > > Ok, but why is the plan different in 8.2? As you can see the same query > is r

Re: [GENERAL] Performance of full outer join in 8.3

2009-04-15 Thread Grzegorz Jaśkiewicz
On Wed, Apr 15, 2009 at 1:25 PM, Simon Riggs wrote: > The cost of the query seems accurate, so the absence of > attachment_isins_attachment_idx on the 8.3 plan looks to be the reason. > There's no way it would choose to scan 8115133 rows on the pkey if the > other index was available and usable.

Re: [GENERAL] Disconnected editing - versioning of databases

2009-04-15 Thread William Temperley
On Wed, Apr 15, 2009 at 9:34 AM, Dimitri Fontaine wrote: >> On Tue, 14 Apr 2009, William Temperley wrote: >> > I could potentially run a database in each of these countries and >> > provide 100% uptime, obviously raising the issue of version conflicts >> > that would require hand-merging. > > Can

[GENERAL] a question about postgresql server connection

2009-04-15 Thread SongDongyan
Hi all, I installed postgresql and when I typed ./createdb mydb, it gave error message: * createdb: could not connect to database postgres: could not connect to server: No such

Re: [GENERAL] a question about postgresql server connection

2009-04-15 Thread Adrian Klaver
On Wednesday 15 April 2009 5:30:29 am SongDongyan wrote: > Hi all, > > I installed postgresql and when I typed ./createdb mydb, it gave error > message: > *** >** createdb: could not

Re: [GENERAL] PITR - warm standby switchover question

2009-04-15 Thread Chander Ganesan
Fujii Masao wrote: Hi, On Wed, Apr 15, 2009 at 9:23 AM, Dan Hayes wrote: Excellent! Thanks. One other quick question... What would happen if I didn't delete the recovery.conf file? Is that step just to prevent accidentally restarting the server with it there? recovery.conf is aut

Re: [GENERAL] backup getting larger and larger

2009-04-15 Thread Chander Ganesan
Steve Crawford wrote: Ivan Sergio Borgonovo wrote: I still have to investigate if the tables are getting really larger... but at a first guess there shouldn't be any good reason to see tables getting so large so fast... so I was wondering if anything could contribute to make a backup much larger

Re: [GENERAL] (P)SQL for a sum with constraints

2009-04-15 Thread Shug Boabby
I simplified my problem a little too much and now I'm stuck trying to use cumulative_sum(). My schema is not only A, B but also has a C A B C 1 0 1 2 1 1 3 0 1 4 2 1 5 1 1 1 0 2 2 1 2 3 0 2 4 2 2 5 1 2 and I want to be able to do the cumulative sum only when C is the same. E.g. A funkySumB C 1 0

Re: [GENERAL] a question about postgresql server connection

2009-04-15 Thread Tom Lane
Adrian Klaver writes: > On Wednesday 15 April 2009 5:30:29 am SongDongyan wrote: >> FATAL: could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission >> denied > First are you trying to connect to a local server or a remote server? > Second what is listen_addresses in postgresql.conf set to?

Re: [GENERAL] how to escape back-slash mark.

2009-04-15 Thread Tom Lane
Quan Zongliang writes: > Has a approach to let PostgreSQL conside back-slash as common char? I think you're looking for the "standard_conforming_strings" parameter. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes t

Re: [GENERAL] need information

2009-04-15 Thread Albe Laurenz
Peeyush wrote: > I need some information on > > 1. What are the best features of Npgsql product as compare to > other commercial .net data providers? > > 2. If you have encountered any major problems, bugs or > performance issue etc... With this product? You sent this to way too many lists, a

[GENERAL] Trigger error

2009-04-15 Thread sub_woofer
Hi All Its been some time since I did any work using triggers/pgsql and when I did, it was pretty much basic stuff. Ive now returned to developing apps using postgres and have run into an error when using a trigger that I wrote a few years back (which worked fine then) but doesnt seem to work any

[GENERAL] Problem with invalid byte sequence and log_min_error_statement

2009-04-15 Thread Janning Vygen
Hi, i run the greatest database ever, postgresql-8.3, on debian etch I am investigating some error messages in my log file: Apr 15 08:04:34 postgres[20686]: [4-1] 2009-04-15 08:04:34 CEST ERROR: invalid byte sequence for encoding "UTF8": 0x81 Apr 15 08:04:34 postgres[20686]: [4-2] 2009-04-15 0

Re: [GENERAL] Performance of full outer join in 8.3

2009-04-15 Thread Tom Lane
=?ISO-8859-1?Q?Christian_Schr=F6der?= writes: > This is the query: > select isin from ts_frontend.attachment_isins full OUTER JOIN > ts_frontend.rec_isins using (attachment,isin) WHERE attachment=2698120 > GROUP BY isin limit 1000; Hmm. It seems 8.3 is failing to push the attachment=2698120

Re: [GENERAL] Trigger error

2009-04-15 Thread Tom Lane
sub_woofer writes: > IF (((TG_OP = 'INSERT') AND (new.subjects=TRUE)) OR ((TG_OP='UPDATE') AND > (new.subjects=TRUE) AND (old.subjects=FALSE))) THEN You can't do that. Split the IF apart so that you don't touch NEW or OLD in the same if-test that tries to determine if they're safe to touch.

Re: [GENERAL] Problem with invalid byte sequence and log_min_error_statement

2009-04-15 Thread Tom Lane
Janning Vygen writes: > I am investigating some error messages in my log file: > Apr 15 08:04:34 postgres[20686]: [4-1] 2009-04-15 08:04:34 CEST ERROR: > invalid byte sequence for encoding "UTF8": 0x81 > Apr 15 08:04:34 postgres[20686]: [4-2] 2009-04-15 08:04:34 CEST HINT: This > error can al

Re: [GENERAL] Trigger error

2009-04-15 Thread Adrian Klaver
- "sub_woofer" wrote: > Hi All > > Its been some time since I did any work using triggers/pgsql and when > I did, > it was pretty much basic stuff. Ive now returned to developing apps > using > postgres and have run into an error when using a trigger that I wrote > a few > years back (wh

Re: [GENERAL] backup getting larger and larger

2009-04-15 Thread Steve Crawford
Chander Ganesan wrote: Steve Crawford wrote: Ivan Sergio Borgonovo wrote: I still have to investigate if the tables are getting really larger... Can we assume that by backup you mean pg_dump/pg_dumpall? If so, then the change is likely due to increasing data in the database. I have a daily

Re: [GENERAL] need information

2009-04-15 Thread Joshua D. Drake
On Wed, 2009-04-15 at 17:15 +0200, Albe Laurenz wrote: > As to your questions: > > Question 1 is wrong, because Npgsql is no commercial .NET data provider. > That's the main advantage: it is open source. This is actually a misconception. Open Source doesn't disqualify it as commercial. It disqua

Re: [GENERAL] Problem with invalid byte sequence and log_min_error_statement

2009-04-15 Thread Janning Vygen
Hi, Thank you for this great and ultra-fast support! One more question: On Wednesday 15 April 2009 17:38:51 you wrote: > Janning Vygen writes: > > I am investigating some error messages in my log file: > > > > Apr 15 08:04:34 postgres[20686]: [4-1] 2009-04-15 08:04:34 CEST ERROR: > > invalid byt

Re: [GENERAL] Problem with invalid byte sequence and log_min_error_statement

2009-04-15 Thread Tom Lane
Janning Vygen writes: > Now i see that the errors occur _exactly_ every 4000 seconds (1 hour, 6 > minutes and 40 seconds). I have no clue as i only have one cronjob at night > concerning postgresql. I have no autovacuum running (only manual at night). > my > application cronjobs are only runni

[GENERAL] Standards for Postgres Installation Question?

2009-04-15 Thread DM
Hi All, Is there any standards for installing postgres in a certain directory? or What is the standard installation path to install postgres. If I have to run two different versions of postgres on the same machine, how should I install postgres? What is the standards for this? By using RPM it alw

Re: [GENERAL] [ADMIN] Standards for Postgres Installation Question?

2009-04-15 Thread Scott Marlowe
On Wed, Apr 15, 2009 at 11:29 AM, DM wrote: > Hi All, > > Is there any standards for installing postgres in a certain directory? or > What is the standard installation path to install postgres. > > If I have to run two different versions of postgres on the same machine, how > should I install post

Re: [GENERAL] need information

2009-04-15 Thread Francisco Figueiredo Jr.
On Wed, Apr 15, 2009 at 07:57, Peeyush wrote: > Hey guys, > > > Hi, Peeyush! > I need some information on > > 1. What are the best features of Npgsql product as compare to other > commercial .net data providers? > Well, the first one is that it is opensource. :) We are working actively on it

[GENERAL] PgAdmin & PosgreSQL Plus Setup

2009-04-15 Thread mrLami
I have PostgreSQL Plus setup on windows 2008 running on a vmware virtual machine on my Vista box. How can I connect to it from PgAdmin from my Vista box? http://www.nabble.com/file/p23064663/err-postgres-pgadmin1.png err-postgres-pgadmin1.png http://www.nabble.com/file/p23064663/err-postgres-pg

Re: [GENERAL] PgAdmin & PosgreSQL Plus Setup

2009-04-15 Thread Raymond O'Donnell
On 15/04/2009 19:44, mrLami wrote: > http://www.nabble.com/file/p23064663/err-postgres-pgadmin1.png > err-postgres-pgadmin1.png > http://www.nabble.com/file/p23064663/err-postgres-pgadmin2.png > err-postgres-pgadmin2.png The second image says there's a problem with your pg_hba.conf. What does i

Re: [GENERAL] Part way there, how do I complete it

2009-04-15 Thread ray
On Apr 15, 3:15 pm, ray wrote: > I have just installed pgsql on a Windows XP from my administrator > 1)  The encoding is win1252, I wanted to make it unicode but I missed > where to make that happen.  Can I change it for those things already > built and for things in the future?   I found that I

[GENERAL] Part way there, how do I complete it

2009-04-15 Thread ray
I have just installed pgsql on a Windows XP from my administrator account 'rj'. I had created a power user account postgres but I did not see where to invoke this. It seems to be running under this admin account but maybe that is because this is a corporate machine and the admin account isn't rea

Re: [GENERAL] PITR - warm standby switchover question

2009-04-15 Thread Erik Jones
On Apr 15, 2009, at 12:42 AM, Fujii Masao wrote: Hi, On Wed, Apr 15, 2009 at 9:23 AM, Dan Hayes wrote: Excellent! Thanks. One other quick question... What would happen if I didn't delete the recovery.conf file? Is that step just to prevent accidentally restarting the server with it t

Re: [GENERAL] Part way there, how do I complete it

2009-04-15 Thread ray
On Apr 15, 4:17 pm, ray wrote: > On Apr 15, 3:15 pm, ray wrote: > > > I have just installed pgsql on a Windows XP from my administrator > I closed down everything and tried to start back up and failed. From pgAdmin, there is a red 'x' in the icon for my new server. When I try to connect to th

Re: [GENERAL] how to escape back-slash mark.

2009-04-15 Thread Quan Zongliang
> I think you're looking for the "standard_conforming_strings" parameter. Yes, it is. Thanks -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] PgAdmin & PosgreSQL Plus Setup

2009-04-15 Thread mrLami
Find server log message below http://www.nabble.com/file/p23069775/pglog.txt pglog.txt - mrLami... Raymond O'Donnell wrote: > > On 15/04/2009 19:44, mrLami wrote: > >> http://www.nabble.com/file/p23064663/err-postgres-pgadmin1.png >> err-postgres-pgadmin1.png >> http://www.nabble.com/file/

Re: [GENERAL] existence of column name

2009-04-15 Thread Eric Smith
Tried this out, and got a very familiar error that I don't know what to do with : "Error: expected just one rule action". I'm using 8.3.5, and see this error quite a bit. Anyone know what's behind this error? Thanks, Eric On Apr 8, 2009, at 8:54 PM, John R Pierce wrote: Eric Smith wrot

Re: [GENERAL] existence of column name

2009-04-15 Thread Tom Lane
Eric Smith writes: > Tried this out, and got a very familiar error that I don't know what > to do with : "Error: expected just one rule action". Er, tried *what* out? That's supposed to be a can't-happen case, so I'd like to see just what you did to trigger it. regard

Re: [GENERAL] need information

2009-04-15 Thread Peeyush
Thanks a lot for kind information. Currently I am investigating on Npgsql and dotConnect .. because we have feature list of dotConnect I attached the same for your quick reference but we don't have in Npgsql. If you can help me in this then it will be greatful for me. Thanks & regards, Pee

Re: [GENERAL] (P)SQL for a sum with constraints

2009-04-15 Thread Michal Politowski
On Wed, 15 Apr 2009 15:32:42 +0100, Shug Boabby wrote: > I simplified my problem a little too much and now I'm stuck trying to > use cumulative_sum(). My schema is not only A, B but also has a C > > A B C > 1 0 1 > 2 1 1 > 3 0 1 > 4 2 1 > 5 1 1 > 1 0 2 > 2 1 2 > 3 0 2 > 4 2 2 > 5 1 2 > > and I wa