[GENERAL] Too many postgres instances

2009-06-18 Thread Sam Wun
Hi, Can anyone explain to me why my system is spawn so many postgress instances? System: FreeBSD 7.2 Stable I386 RAM: 1GB Here is the output of the top command: Mem: 457M Active, 92M Inact, 150M Wired, 23M Cache, 85M Buf, 18M Free Swap: 999M Total, 150M Used, 849M Free, 14% Inuse Here is a

Re: [GENERAL] Too many postgres instances

2009-06-18 Thread Bill Moran
Sam Wun swun2...@gmail.com wrote: Can anyone explain to me why my system is spawn so many postgress instances? Postgres starts a dedicated process for each connection. If you have too many processes, then either you're allowing too many connections, or you failed to size your server properly

[GENERAL] connecting to a remote pq always require a password

2009-06-18 Thread David Shen
Hi, I am trying to use the libpq to connect to my postgresql 8.3 server. If I use dbname = mydb, the connection made successfully because I am using a socket connection. But if I use host = 127.0.0.1 dbname = mydb, the error message is no password supplied. In the pg_hba.conf file, I even change

Re: [GENERAL] connecting to a remote pq always require a password

2009-06-18 Thread John DeSoi
On Jun 18, 2009, at 8:11 AM, David Shen wrote: In the pg_hba.conf file, I even change the host access control to this: hostall all 127.0.0.1/32 trust but it still does not work. What I missed? Did you reload the configuration (or restart the sever) after

[GENERAL] postgres -- monitor and suggestions

2009-06-18 Thread Sim Zacks
Is there a tool that can monitor my postgresql and recommend configuration changes based on actual use? For example, when I run VACUUM ANALYZE it tells me that I should consider increasing the max_fsm_relations. After monitoring for a period of time, I would like to know if my shared buffers are

Re: [GENERAL] postgres -- monitor and suggestions

2009-06-18 Thread Grzegorz Jaśkiewicz
2009/6/18 Sim Zacks s...@compulab.co.il: Is there a tool that can monitor my postgresql and recommend configuration changes based on actual use? For example, when I run VACUUM ANALYZE it tells me that I should consider increasing the max_fsm_relations. After monitoring for a period of time,

Re: [GENERAL] connecting to a remote pq always require a password

2009-06-18 Thread Lennin Caro
--- On Thu, 6/18/09, David Shen davidshe...@googlemail.com wrote: From: David Shen davidshe...@googlemail.com Subject: [GENERAL] connecting to a remote pq always require a password To: pgsql-general@postgresql.org Date: Thursday, June 18, 2009, 12:11 PM Hi, I am trying to use the libpq

[GENERAL] SET TIMEZONE doesn't affect to SELECT statement

2009-06-18 Thread POST
Title: SET TIMEZONE doesn't affect to SELECT statement Hello; by tutorial I have tried the example: set timezone to 'Europe/London'; select '2008-01-01 12:00:00 GMT+2'::timestamptz; Result: 2008-01-01 15:00:00 set timezone to 'Europe/Moscow'; select '2008-01-01 12:00:00

Re: [GENERAL] SET TIMEZONE doesn't affect to SELECT statement

2009-06-18 Thread Mike Christensen
Strange, maybe there's some server setting because I get different results on mine.. set timezone to 'Europe/London'; select '2008-01-01 12:00:00 GMT+2'::timestamptz; Result: '2008-01-01 14:00:00+00' set timezone to 'Europe/Moscow'; select '2008-01-01 12:00:00 GMT+2'::timestamptz; Result:

[GENERAL] Question re 2 aggregates from 1 query

2009-06-18 Thread Scott Ribe
Assume a simple many-to-one between 2 tables: create table docs (id int8 primary key, timestamp imported_when); create table pages (id int8 primary key, doc_id int8 not null references docs); It's easy to get a count of docs imported by date: select imported_when::date, count(1) from docs

Re: [GENERAL] Question re 2 aggregates from 1 query

2009-06-18 Thread Scott Ribe
Yes, obviously that should have been sum(numpgs) in the select list of the last query... Question remains the same... -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] FYI: Load times for a largish DB in 8.2 vs. 8.3 vs. 8.4

2009-06-18 Thread Vick Khera
On Wed, Jun 17, 2009 at 10:50 AM, Todd A. Cooktc...@blackducksoftware.com wrote: The loads were all done on the same machine, with the DB going on a pair of SATA drives in a RAID-0 stripe.  The machine has 2 non-HT Xeons and 8GB RAM.  maintenance_work_mem was set to 512MB in all three cases.

Re: [GENERAL] Question re 2 aggregates from 1 query

2009-06-18 Thread Chris Spotts
Is there any way to get count of docs pages imported by date without resorting to selecting from a select: [Spotts, Christopher] If I understand you correctly..? create table docs (id int8 primary key, imported_when timestamp ); create table pages (id int8 primary key, doc_id int8 not

Re: [GENERAL] FYI: Load times for a largish DB in 8.2 vs. 8.3 vs. 8.4

2009-06-18 Thread Alan McKay
There was an interesting presentation at PG Con from a guy at Sun who did a series of load tests on 8.3 vs 8.4 http://www.pgcon.org/2009/schedule/events/124.en.html There is a link to the video from that page so you can watch it. But he found a strange corner case where 8.4 performed way worse.

Re: [GENERAL] FYI: Load times for a largish DB in 8.2 vs. 8.3 vs. 8.4

2009-06-18 Thread Todd A. Cook
Vick Khera wrote: On Wed, Jun 17, 2009 at 10:50 AM, Todd A. Cooktc...@blackducksoftware.com wrote: The loads were all done on the same machine, with the DB going on a pair of SATA drives in a RAID-0 stripe. The machine has 2 non-HT Xeons and 8GB RAM. maintenance_work_mem was set to 512MB in

Re: [GENERAL] Question re 2 aggregates from 1 query

2009-06-18 Thread Scott Ribe
If I understand you correctly..? Yes, exactly! I think I was suffering from a flashback to a very old DBMS that didn't support that use of distinct... -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice -- Sent via pgsql-general mailing list

Re: [GENERAL] Could not reattach to shared memory

2009-06-18 Thread Bruce Momjian
Tuan Hoang Anh wrote: I am running postgres 8.3.7 on windows server 2008 SP1. But this error alway occur : FATAL: could not reattach to shared memory (key=260, addr=0240): 487 .Here is my log 2009-06-17 20:45:18 ICT LOG: database system was shut down at 2009-06-17 17:42:45 ICT

Re: [GENERAL] running pg_dump from python

2009-06-18 Thread Erik Jones
On Jun 15, 2009, at 5:17 AM, Jasen Betts wrote: On 2009-06-14, Garry Saddington ga...@schoolteachers.co.uk wrote: I ahve the following python file that I am running as an external method in Zope. def backup(): import os os.popen(c:/scholarpack/postgres/bin/pg_dump scholarpack

Re: [GENERAL] FYI: Load times for a largish DB in 8.2 vs. 8.3 vs. 8.4

2009-06-18 Thread Tom Lane
Todd A. Cook tc...@blackducksoftware.com writes: First, the numbers: PG VersionLoad time pg_database_size autovac -- 8.2.13179 min 92,807,992,820on 8.3.7 180 min 84,048,744,044

[GENERAL] postgresql-8.3.7 unexpected connection closures

2009-06-18 Thread Andrew Maclean
I posted this a while back but got no useful responses. I have the following error message: Error connecting to the server: server closed the connection unexpectedly. This probably means that the server terminated abnormally before or while processing the request. It happens intermittently

Re: [GENERAL] postgresql-8.3.7 unexpected connection closures

2009-06-18 Thread Craig Ringer
On Fri, 2009-06-19 at 09:12 +1000, Andrew Maclean wrote: I posted this a while back but got no useful responses. I have the following error message: Error connecting to the server: server closed the connection unexpectedly. This probably means that the server terminated abnormally before

Re: [GENERAL] postgresql-8.3.7 unexpected connection closures

2009-06-18 Thread Andrew Maclean
Thanks for the quick response, the log shows the following: 2009-06-19 07:51:47 EST LOG: database system was interrupted; last known up at 2009-06-18 19:14:37 EST 2009-06-19 07:51:47 EST LOG: database system was not properly shut down; automatic recovery in progress 2009-06-19 07:51:47 EST LOG:

Re: [GENERAL] postgresql-8.3.7 unexpected connection closures

2009-06-18 Thread Craig Ringer
On Fri, 2009-06-19 at 10:50 +1000, Andrew Maclean wrote: 2009-06-19 07:54:51 EST LOG: could not receive data from client: Unknown winsock error 10061 Winsock error 10061 is WSAECONNREFUSED (10061) Connection Refused. I presume that means the client has sent an RST packet, but ... wtf? Why?

[GENERAL] Invalid statement name (null) in line ## - what am I doing wrong ?

2009-06-18 Thread leif
Hi, I have a problem when upgrading from 8.2.4 to 8.3/8.4 using ecpg with a prepare statement: EXEC SQL PREPARE execquery FROM :stmt; line = __LINE__; EXEC SQL AT :_thisDbConn DECLARE execcurs CURSOR FOR execquery; line = __LINE__; EXEC SQL AT :_thisDbConn OPEN execcurs; line = __LINE__;

Re: [GENERAL] postgresql-8.3.7 unexpected connection closures

2009-06-18 Thread Andrew Maclean
One is running McAfee and the other is running Symantec Endpoint. It does not matter whether the firewalls are on or off. One thing I have noticed it that if I stop and restart the service everything seems to work Ok. Andrew On Fri, Jun 19, 2009 at 11:18 AM, Craig

Re: [GENERAL] postgresql-8.3.7 unexpected connection closures

2009-06-18 Thread Craig Ringer
On Fri, 2009-06-19 at 11:30 +1000, Andrew Maclean wrote: One is running McAfee and the other is running Symantec Endpoint. It does not matter whether the firewalls are on or off. I increasingly wonder if Symantec or McAfee can be persuaded to offer a buildfarm machine with their software to

Re: [GENERAL] Invalid statement name (null) in line ## - what am I doing wrong ?

2009-06-18 Thread Martin Gainty
can we see the original statement ? can you combine the 2 statements to produce the necessary cursor OPEN curs1 FOR EXECUTE 'SELECT * FROM ' || quote_ident($1);http://www.postgresql.org/docs/8.1/interactive/plpgsql-cursors.html takk Martin __

[GENERAL] Maintaining user roles and permissions in Postgres - general question

2009-06-18 Thread Postgres User
Does anyone have a recommendation for maintaining user permissions on a changing database? The lack of an option to grant specific rights to all objects of a given type within a Postgres db obviously places the burden on the administrator to keep roles updated as objects are added and dropped

Re: [GENERAL] Invalid statement name (null) in line ## - what am I doing wrong ?

2009-06-18 Thread leif
Oops, forgot to include that, sorry. This is from a log output since it is dynamically generated: stmt= SELECT groupid, dg.ctrlid, userid, description, phoneno, ipaddr, online, active, dt.typename, null FROM devicegroup dg, device d, devtype dt WHERE userid = 23 AND typename = 'adm' AND

Re: [GENERAL] Maintaining user roles and permissions in Postgres - general question

2009-06-18 Thread John R Pierce
Postgres User wrote: Does anyone have a recommendation for maintaining user permissions on a changing database? The lack of an option to grant specific rights to all objects of a given type within a Postgres db obviously places the burden on the administrator to keep roles updated as objects

Re: [GENERAL] Maintaining user roles and permissions in Postgres - general question

2009-06-18 Thread Scott Marlowe
On Thu, Jun 18, 2009 at 8:03 PM, Postgres Userpostgres.develo...@gmail.com wrote: Does anyone have a recommendation for maintaining user permissions on a changing database?  The lack of an option to grant specific rights to all objects of a given type within a Postgres db obviously places the

Re: [GENERAL] postgresql-8.3.7 unexpected connection closures

2009-06-18 Thread Tom Lane
Craig Ringer cr...@postnewspapers.com.au writes: I increasingly wonder if Symantec or McAfee can be persuaded to offer a buildfarm machine with their software to PostgreSQL. Virus scanners on servers are an (IMO nearly insane) fact of life on Windows, apparently, and certainly on Windows

Re: [GENERAL] postgresql-8.3.7 unexpected connection closures

2009-06-18 Thread Craig Ringer
On Fri, 2009-06-19 at 01:03 -0400, Tom Lane wrote: Craig Ringer cr...@postnewspapers.com.au writes: I increasingly wonder if Symantec or McAfee can be persuaded to offer a buildfarm machine with their software to PostgreSQL. Virus scanners on servers are an (IMO nearly insane) fact of life