[GENERAL] pg_dumpall custom format?

2009-03-05 Thread Thom Brown
Hi, I noticed that while pg_dump can output a custom format, effectively compressing the output, pg_dumpall doesn't. Is there a reason for this? And is there a way to get pg_dumpall to compress it's output? Thanks Thom

Re: [GENERAL] pg_dumpall custom format?

2009-03-05 Thread Thom Brown
Thanks for the suggestion Marc. It would still be nice to have the custom format included as an option though with pg_restore supporting it, just for consistency. I will, however, follow your recommendation. Thom 2009/3/5 Marc Mamin m.ma...@intershop.de Hello, you can first pipe the

Re: [GENERAL] pg_dumpall custom format?

2009-03-05 Thread Marc Mamin
Hello, you can first pipe the output of pg_dump to a compression tool: pg_dump. | gzip file. instead of gzip, I'm using pigz which is faster thanks multithreading. HTH, Marc Mamin From: pgsql-general-ow...@postgresql.org

[GENERAL] PostgreSQL template for cacti

2009-03-05 Thread Ashish Karalkar
Hello list, I was wondering is there any postgresql template for cacti to monitor PostgreSQL server. can anybody plz point me to the same? Thanks in advance --Ashish -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] PostgreSQL template for cacti

2009-03-05 Thread Ashish Karalkar
Ashish Karalkar wrote: Hello list, I was wondering is there any postgresql template for cacti to monitor PostgreSQL server. can anybody plz point me to the same? Thanks in advance --Ashish That worked from google, sorry for making noise... http://forums.cacti.net/about23300.html

[GENERAL] idle users

2009-03-05 Thread paulo matadr
I need to procedure to kill users in idle,anybody have this made? thanks Paulo Moraes Veja quais são os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com

Re: [GENERAL] pgsql announce now on twitter

2009-03-05 Thread Douglas J Hunley
On Wednesday 04 March 2009 15:39:36 Mark Styles wrote: On Tue, Mar 03, 2009 at 09:38:39PM -0500, Douglas J Hunley wrote: I really wanted to let everyone know that I've created @PGSQL_Announce on Twitter and setup a cron job to parse the feed and post it to Twitter. It's been working for a

[GENERAL] Problem with SSL: could not accept SSL connection: EOF detected

2009-03-05 Thread Pat Maddox
I have an ubuntu intrepid server running postgres 8.3.6. The server is able to accept connections via SSL. We have another host that is unable to connect via ssl for some reason. Trying to connect results in psql: and quitting. The server log says could not accept SSL connection: EOF detected

[GENERAL] After Upgrade from 8.2.6 to 8.3.6: function to_timestamp does not exist

2009-03-05 Thread Nico Grubert
Dear list members I have upgraded my PostgreSQL 8.2.6 to 8.3.6 and I am having trouble with calling to_timestamp function. Here is the query I use: SELECT a.* FROM tblevent a WHERE to_timestamp(a.from_datetime,'/MM/DD') = to_timestamp( NOW(),'/MM/DD' ) ORDER BY

Re: [GENERAL] idle users

2009-03-05 Thread Joshua Tolley
On Thu, Mar 05, 2009 at 04:50:09AM -0800, paulo matadr wrote: I need to procedure to kill users in idle,anybody have this made? thanks See pg_cancel_backend. http://www.postgresql.org/docs/8.3/static/functions-admin.html - Josh / eggyknap signature.asc Description: Digital signature

Re: [GENERAL] Postgres Cookbook

2009-03-05 Thread Stefan Kaltenbrunner
Tino Wildenhain wrote: Greg Smith wrote: On Wed, 4 Mar 2009, Artacus wrote: So it looks like at one time we had a cookbook. But the links are dead now. I'm not sure why Roberto Mello stopped hosting that, but you can see the last content posted there at

Re: [GENERAL] encoding of PostgreSQL messages

2009-03-05 Thread Hiroshi Saito
Hi. Karsten-san. Yeah, It was a problem unsolvable by the driver to relay. although perseverance keeping without giving up! -- arigatougozaimasu:-) Regards, Hiroshi Saito - Original Message - From: Karsten Hilbert karsten.hilb...@gmx.net On Tue, Mar 03, 2009 at 12:35:37AM

[GENERAL] repeated log $libdir/plugins/plugin_debugger.dll

2009-03-05 Thread Sabin Coanda
Hi there, I have PostgreSQL 8.3.5, compiled by Visual C++ build 1400 installed on Windows XP. The log files contain the following repeated message: db=, user= LOG: loaded library $libdir/plugins/plugin_debugger.dll Unfortunately it fills a lot of my log file. Please tell me how to remove it

[GENERAL] Postgres with phpScheduleIt

2009-03-05 Thread Stuart Luppescu
Hello, I'm trying to install phpScheduleIt (an on-line calendaring application) on my system that has postgres 8.0.15 running. I have to admit upfront that I have very little idea how postgres works; my small-business accounting system uses it, but it's sort of like a black box to me.

Re: [GENERAL] Problem with SSL: could not accept SSL connection: EOF detected

2009-03-05 Thread Tom Lane
Pat Maddox pat.mad...@gmail.com writes: I have an ubuntu intrepid server running postgres 8.3.6. The server is able to accept connections via SSL. We have another host that is unable to connect via ssl for some reason. Trying to connect results in psql: and quitting. The server log says

Re: [GENERAL] After Upgrade from 8.2.6 to 8.3.6: function to_timestamp does not exist

2009-03-05 Thread Tom Lane
Nico Grubert nicogrub...@gmail.com writes: SELECT a.* FROM tblevent a WHERE to_timestamp(a.from_datetime,'/MM/DD') = to_timestamp( NOW(),'/MM/DD' ) ORDER BY a.from_datetime In PostgreSQL 8.2.6 everything works fine. In PostgreSQL 8.3.6 I get the following error:

Re: [GENERAL] Problem with SSL: could not accept SSL connection: EOF detected

2009-03-05 Thread Pat Maddox
On Thu, Mar 5, 2009 at 10:34 AM, Tom Lane t...@sss.pgh.pa.us wrote: Pat Maddox pat.mad...@gmail.com writes: I have an ubuntu intrepid server running postgres 8.3.6.  The server is able to accept connections via SSL. We have another host that is unable to connect via ssl for some reason.  

[GENERAL] converting older databases

2009-03-05 Thread Heine Ferreira
Hi When you install a newer version of Postgres how do you upgrade your database to the new format? Apparantly you can't just backup the old database and restore it on the new software. How do you do this on Windows? Thanks H.F.

Re: [GENERAL] After Upgrade from 8.2.6 to 8.3.6: function to_timestamp does not exist

2009-03-05 Thread Scott Marlowe
On Thu, Mar 5, 2009 at 9:48 AM, Nico Grubert nicogrub...@gmail.com wrote: Dear list members I have upgraded my PostgreSQL 8.2.6 to 8.3.6 and I am having trouble with calling to_timestamp function. Here is the query I use:  SELECT a.*  FROM tblevent a  WHERE

Re: [GENERAL] Problem with SSL: could not accept SSL connection: EOF detected

2009-03-05 Thread Tom Lane
Pat Maddox pat.mad...@gmail.com writes: On Thu, Mar 5, 2009 at 10:34 AM, Tom Lane t...@sss.pgh.pa.us wrote: Odd.  Try strace'ing the failing psql session, and send us the last few dozen lines of the output. http://pastie.org/private/y7cbpuamemxawmhh8hdna is the strace output So the relevant

Re: [GENERAL] Custom datestyle for timestamps

2009-03-05 Thread Peter Eisentraut
On Thursday 05 March 2009 00:19:02 Daniel Verite wrote: SET DATESTYLE takes predefined keywords such as ISO or US as arguments, but I can't find a way to specify a custom format string for timestamps. There is no support for that. What I'd like to find is an equivalent to Oracle's ALTER

Re: [GENERAL] converting older databases

2009-03-05 Thread John R Pierce
Heine Ferreira wrote: Hi When you install a newer version of Postgres how do you upgrade your database to the new format? Apparantly you can't just backup the old database and restore it on the new software. How do you do this on Windows? you pg_dump dumpfile.sql the old one, psql -f

Re: [GENERAL] Postgres with phpScheduleIt

2009-03-05 Thread Peter Eisentraut
On Thursday 05 March 2009 18:39:11 Stuart Luppescu wrote: Hello, I'm trying to install phpScheduleIt (an on-line calendaring application) on my system that has postgres 8.0.15 running. I have to admit upfront that I have very little idea how postgres works; my small-business accounting system

Re: [GENERAL] Postgres with phpScheduleIt

2009-03-05 Thread Tom Lane
Stuart Luppescu s...@ccsr.uchicago.edu writes: phpScheduleIt uses mySQL by default, but they claim is should work with postgres. The setup uses a script that starts like this: # phpScheduleIt 1.2.0 # drop database if exists phpScheduleIt; create database phpScheduleIt; use phpScheduleIt;

Re: [GENERAL] Postgres with phpScheduleIt

2009-03-05 Thread Joshua D. Drake
On Thu, 2009-03-05 at 14:08 -0500, Tom Lane wrote: Stuart Luppescu s...@ccsr.uchicago.edu writes: phpScheduleIt uses mySQL by default, but they claim is should work with postgres. The setup uses a script that starts like this: # phpScheduleIt 1.2.0 # drop database if exists

[GENERAL] not quite a cross tab query...

2009-03-05 Thread Richard Greenwood
Hello pgsql listers, I've got a problem that is similar to, but I don't think identical to, a cross tab query. My data looks like: ID | CAT 1 | A 1 | B 2 | A 2 | C So for each ID there may be many CAT (categories). The client wants it to look like: ID | CATS 1 | A,B

Re: [GENERAL] Postgres Cookbook

2009-03-05 Thread A. Kretschmer
In response to Stefan Kaltenbrunner : Tino Wildenhain wrote: Greg Smith wrote: On Wed, 4 Mar 2009, Artacus wrote: So it looks like at one time we had a cookbook. But the links are dead now. I'm not sure why Roberto Mello stopped hosting that, but you can see the last content posted

Re: [GENERAL] not quite a cross tab query...

2009-03-05 Thread Steve Atkins
On Mar 5, 2009, at 11:17 AM, Richard Greenwood wrote: Hello pgsql listers, I've got a problem that is similar to, but I don't think identical to, a cross tab query. My data looks like: ID | CAT 1 | A 1 | B 2 | A 2 | C So for each ID there may be many CAT (categories). The

Re: [GENERAL] converting older databases

2009-03-05 Thread Sathish Duraiswamy
hai Recently we migrated our database from 8.2.4 to 8.2.12 , went through manuals and followed the below steps 1.pg_dumpall to take data dump of current database 2.stopped database 3.moved the pgsql to backup folder 4.downloaded 8.2.12 , configured - gmake - gmake install 5.recreated cluster

Re: [GENERAL] idle users

2009-03-05 Thread Sathish Duraiswamy
Can we automate this process , maintained by postmaster itself Regards Sathish On Thu, Mar 5, 2009 at 10:01 PM, Joshua Tolley eggyk...@gmail.com wrote: On Thu, Mar 05, 2009 at 04:50:09AM -0800, paulo matadr wrote: I need to procedure to kill users in idle,anybody have this made?

Re: [GENERAL] not quite a cross tab query...

2009-03-05 Thread darren
Have you tried using group by? Hello pgsql listers, I've got a problem that is similar to, but I don't think identical to, a cross tab query. My data looks like: ID | CAT 1 | A 1 | B 2 | A 2 | C So for each ID there may be many CAT (categories). The client wants

Re: [GENERAL] idle users

2009-03-05 Thread Joshua D. Drake
On Fri, 2009-03-06 at 01:09 +0530, Sathish Duraiswamy wrote: Can we automate this process , maintained by postmaster itself No and that would be a bad idea. There has been discussion in the past of having an IDLE in TRANSACTION timeout but that is a different thing. Joshua D. Drake --

Re: [GENERAL] converting older databases

2009-03-05 Thread John R Pierce
Sathish Duraiswamy wrote: hai Recently we migrated our database from 8.2.4 to 8.2.12 , went through manuals and followed the below steps 1.pg_dumpall to take data dump of current database 2.stopped database 3.moved the pgsql to backup folder 4.downloaded 8.2.12 , configured - gmake - gmake

[GENERAL] BufferSync() performance

2009-03-05 Thread Guido Ostkamp
Hello, Bruce Momjian is with us for some training sessions this week and has asked me to post the following question to the mailing list (I have chosen this list as it was suggested not to post directly to hackers list): When looking at function BufferSync() in

Re: [GENERAL] not quite a cross tab query...

2009-03-05 Thread Richard Greenwood
On Thu, Mar 5, 2009 at 12:27 PM, dar...@ontrenet.com wrote: Have you tried using group by? Thanks, but that doesn't do it. If I group by ID I loose the CAT, group by CAT I loose the ID, group by bith and that's just the base table. Am I missing something? Regards, Rich Hello pgsql listers,

Re: [GENERAL] not quite a cross tab query...

2009-03-05 Thread Richard Greenwood
On Thu, Mar 5, 2009 at 12:29 PM, Steve Atkins st...@blighty.com wrote: On Mar 5, 2009, at 11:17 AM, Richard Greenwood wrote: Hello pgsql listers, I've got a problem that is similar to, but I don't think identical to, a cross tab query. My data looks like:  ID | CAT  1  |   A  1  |   B  

Re: [GENERAL] BufferSync() performance

2009-03-05 Thread Tom Lane
Guido Ostkamp postgre...@ostkamp.fastmail.fm writes: Would this work or is there a special reason why the original check was done with lock held? This will fail, very nastily, on multiple-CPU machines with weak memory ordering guarantees. You can't assume you are seeing an up-to-date value of

Re: [GENERAL] BufferSync() performance

2009-03-05 Thread Greg Smith
On Thu, 5 Mar 2009, Guido Ostkamp wrote: Would this work or is there a special reason why the original check was done with lock held? http://en.wikipedia.org/wiki/Race_condition Until you have a lock on a buffer header, you can't trust that you're even seeing consistent information about

[GENERAL] Keeping only one postgres.exe instance running

2009-03-05 Thread Pierre Racine
Hi, Is there a way to tell PostgreSQL to keep only one instance of postgres.exe running? Thanks, Pierre -- 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] Keeping only one postgres.exe instance running

2009-03-05 Thread Scott Marlowe
On Thu, Mar 5, 2009 at 2:52 PM, Pierre Racine pierre.rac...@sbf.ulaval.ca wrote: Hi, Is there a way to tell PostgreSQL to keep only one instance of postgres.exe running? Running it in single user non-server mode? Is there some reason you're looking to do this? -- Sent via pgsql-general

Re: [GENERAL] Keeping only one postgres.exe instance running

2009-03-05 Thread John R Pierce
Pierre Racine wrote: Hi, Is there a way to tell PostgreSQL to keep only one instance of postgres.exe running? you couldn't use it if that was the case. at a minimum, there is the postmaster process, the postgres writer, the postgres logger, the postgres stats collector, and the

Re: [GENERAL] converting older databases

2009-03-05 Thread Sathish Duraiswamy
Thanks for ur reply John For information , We have Novell SuSe 11.0 server ON x86_32 and we have installed from source code Regards sathish On Fri, Mar 6, 2009 at 1:46 AM, John R Pierce pie...@hogranch.com wrote: Sathish Duraiswamy wrote: hai Recently we migrated our database from 8.2.4

Re: [GENERAL] idle users

2009-03-05 Thread Sathish Duraiswamy
Thanks for your reply. Can we have script in cron jobs to do this step periodically If possible , can anyone help for cron script to do this job . Regards sathish On Fri, Mar 6, 2009 at 1:21 AM, Joshua D. Drake j...@commandprompt.comwrote: On Fri, 2009-03-06 at 01:09 +0530, Sathish

Re: [pgsql-advocacy] [GENERAL] pgsql announce now on twitter

2009-03-05 Thread Dan Langille
Mark Styles wrote: On Tue, Mar 03, 2009 at 09:38:39PM -0500, Douglas J Hunley wrote: I really wanted to let everyone know that I've created @PGSQL_Announce on Twitter and setup a cron job to parse the feed and post it to Twitter. It's been working for a little while now and I think it's stable

Re: [GENERAL] pgsql announce now on twitter

2009-03-05 Thread Mark Styles
On Thu, Mar 05, 2009 at 09:44:58AM -0500, Douglas J Hunley wrote: On Wednesday 04 March 2009 15:39:36 Mark Styles wrote: On Tue, Mar 03, 2009 at 09:38:39PM -0500, Douglas J Hunley wrote: I really wanted to let everyone know that I've created @PGSQL_Announce on Twitter and setup a cron job

Re: [GENERAL] idle users

2009-03-05 Thread Scott Marlowe
On Thu, Mar 5, 2009 at 9:31 AM, Joshua Tolley eggyk...@gmail.com wrote: On Thu, Mar 05, 2009 at 04:50:09AM -0800, paulo matadr wrote:    I need to procedure to kill users in idle,anybody have this made?    thanks See pg_cancel_backend.

Re: [GENERAL] Hiding row counts in psql

2009-03-05 Thread Lubomir Petrov
Hi, Use \pset footer [on|off]. test=# select 1 as Col1; Col1 -- 1 (1 row) test=# test=# \pset footer Default footer is off. test=# test=# select 1 as Col1; Col1 -- 1 test=# \pset footer Default footer is on. test=# test=# test=# select 1 as Col1; Col1 -- 1 (1 row)

Re: [GENERAL] idle users

2009-03-05 Thread Scott Marlowe
On Thu, Mar 5, 2009 at 5:50 AM, paulo matadr saddon...@yahoo.com.br wrote: I need to procedure to kill users in idle,anybody have this made? thanks Paulo Moraes Here's a really primitive bash script to kill off all idle connections. Run it as postgres: #!/bin/bash for i in `psql -U postgres

Re: [GENERAL] converting older databases

2009-03-05 Thread Scott Marlowe
On Thu, Mar 5, 2009 at 5:56 PM, Sathish Duraiswamy sath...@leatherlink.net wrote: Thanks for ur reply John For information , We have Novell SuSe 11.0 server ON x86_32 and we have installed from source code Then all you need to do is run ./configure with the same --prefix switch as you did

[GENERAL] Performance of subselects

2009-03-05 Thread Christian Schröder
Hi list, if I want to find all records from a table that don't have a matching record in another table there are at least two ways to do it: Using a left outer join or using a subselect. I always thought that the planner would create identical plans for both approaches, but actually they are

[GENERAL] merging 2 databases

2009-03-05 Thread Ivan Sergio Borgonovo
I've 2 installation of the same application. Each one has it's own DB with the same structure and different data. create table A (); create table B (); create table C (); Now for each DB I'm going to move most of the tables in a different schema: DB1 alter table A set schema XXX; alter table B

Re: [GENERAL] After Upgrade from 8.2.6 to 8.3.6: function to_timestamp does not exist

2009-03-05 Thread Nico Grubert
This query makes little sense. Why are you trying to convert a timestamp to a timestamp? Is this a bizarre substitute for date_trunc()? The from_datetime column is of type timestamp but I want to check only the date, not the time. In this example I want to retrieve all records whose

Re: [GENERAL] After Upgrade from 8.2.6 to 8.3.6: function to_timestamp does not exist

2009-03-05 Thread Scott Marlowe
On Thu, Mar 5, 2009 at 11:53 PM, Nico Grubert nicogrub...@gmail.com wrote: This query makes little sense.  Why are you trying to convert a timestamp to a timestamp?  Is this a bizarre substitute for date_trunc()? The from_datetime column is of type timestamp but I want to check only the

Re: [GENERAL] After Upgrade from 8.2.6 to 8.3.6: function to_timestamp does not exist

2009-03-05 Thread Nico Grubert
This query makes little sense. Why are you trying to convert a timestamp to a timestamp? Is this a bizarre substitute for date_trunc()? Got it: Thanks for the date_trunc tip. This query works fine: date_trunc('day', a.from_datetime) = date_trunc('day', NOW()) -- Sent via pgsql-general

Re: [GENERAL] After Upgrade from 8.2.6 to 8.3.6: function to_timestamp does not exist

2009-03-05 Thread Scott Marlowe
Or use date_trunc: select * from sometable where timestampfield = date_trunc('day',now()); -- 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] After Upgrade from 8.2.6 to 8.3.6: function to_timestamp does not exist

2009-03-05 Thread Nico Grubert
OK, so you want to see if a timestamp is greater than now()? Why not just compare them? where a.from_datetime = now() No, not the whole timestamp. I dont want to check the time. So I had to truncate the datetime with: date_trunc('day', a.from_datetime) = date_trunc('day', NOW()) -- Sent

Re: [GENERAL] After Upgrade from 8.2.6 to 8.3.6: function to_timestamp does not exist

2009-03-05 Thread Scott Marlowe
On Thu, Mar 5, 2009 at 11:58 PM, Nico Grubert nicogrub...@gmail.com wrote: This query makes little sense.  Why are you trying to convert a timestamp to a timestamp?  Is this a bizarre substitute for date_trunc()? Got it: Thanks for the date_trunc tip. This query works fine:

Re: [GENERAL] After Upgrade from 8.2.6 to 8.3.6: function to_timestamp does not exist

2009-03-05 Thread Scott Marlowe
On Thu, Mar 5, 2009 at 11:59 PM, Nico Grubert nicogrub...@gmail.com wrote: OK, so you want to see if a timestamp is greater than now()?  Why not just compare them? where a.from_datetime = now() No, not the whole timestamp. I dont want to check the time. So I had to truncate the datetime

Re: [GENERAL] After Upgrade from 8.2.6 to 8.3.6: function to_timestamp does not exist

2009-03-05 Thread Adam Rich
OK, so you want to see if a timestamp is greater than now()? Why not just compare them? where a.from_datetime = now() No, not the whole timestamp. I dont want to check the time. So I had to truncate the datetime with: date_trunc('day', a.from_datetime) = date_trunc('day',

Re: [GENERAL] After Upgrade from 8.2.6 to 8.3.6: function to_timestamp does not exist

2009-03-05 Thread Adam Rich
This query makes little sense. Why are you trying to convert a timestamp to a timestamp? Is this a bizarre substitute for date_trunc()? The from_datetime column is of type timestamp but I want to check only the date, not the time. In this example I want to retrieve all records

Re: [GENERAL] After Upgrade from 8.2.6 to 8.3.6: function to_timestamp does not exist

2009-03-05 Thread Nico Grubert
If you're going to truncate the NOW(), just go with CURRENT_DATE instead. Thanks for the CURRENT_DATE tip, Adam. Works fine! -- 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] Performance of subselects

2009-03-05 Thread Scott Marlowe
On Thu, Mar 5, 2009 at 11:25 PM, Christian Schröder c...@deriva.de wrote: Hi list, if I want to find all records from a table that don't have a matching record in another table there are at least two ways to do it: Using a left outer join or using a subselect. I always thought that the planner