Re: [GENERAL] Monitoring tools for Postgresql

2009-07-28 Thread Christophe Pettus
On Jul 28, 2009, at 11:24 PM, mukeshp wrote: Can anyone suggest me tools for monitoring postgresql server. ? As it happens, there was a talk about that very topic on PG day: Check Please! What Your Postgres Databases Wishes You Would Monitor / Robert Treat / OmniTI http://media.postgresq

Re: [GENERAL] Monitoring tools for Postgresql

2009-07-28 Thread Greg Smith
On Tue, 28 Jul 2009, mukeshp wrote: Can anyone suggest me tools for monitoring postgresql server. ? An idea what operating system you're running the server on would help here. -- * Greg Smith gsm...@gregsmith.com http://www.gregsmith.com Baltimore, MD -- Sent via pgsql-general mailing list

Re: [GENERAL] Field name problem

2009-07-28 Thread Alan Chandler
Tim Landscheidt wrote: b) Restore the backup to an SQL file, load it into a suit- able editor, change (very carefully) "over" to the new attribute name and restore that file to a new server. Thats what I had hoped to be able to do (I've got to search several backups for the one with th

[GENERAL] Monitoring tools for Postgresql

2009-07-28 Thread mukeshp
Hello Can anyone suggest me tools for monitoring postgresql server. ? -- View this message in context: http://www.nabble.com/Monitoring-tools-for-Postgresql-tp24713155p24713155.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list

Re: [GENERAL] split string by special characters

2009-07-28 Thread Jan-Erik
Current design of function ---text_to_array( sen text, col collection )--- DECLARE delimiter_pos int[] := '{}'; return_val text[] := '{}'; delimiters_chr RECORD; remaining_text text; delimiter_curr text; i int := 0; j int := 0; prev_pos int := 1; curr_pos int := 0; delimiter_len

Re: [GENERAL] synchronous_commit=off doesn't always return immediately

2009-07-28 Thread tomrevam
Alvaro Herrera-7 wrote: > > tomrevam wrote: > > This is why Tom was suggesting you to increase wal_buffers. Did > you try that? > > Increasing the wal_buffers improved the performance. Is there a limit on how big I can raise them? Is there anything that would work worse with bigger wal_buf

Re: [GENERAL] Idle processes chewing up CPU?

2009-07-28 Thread Scott Marlowe
On Tue, Jul 28, 2009 at 7:17 PM, Brendan Hill wrote: > Hi Tom, > > Given it's on Windows, any suggestion for how I would get hold of this? > (Process Monitor tool perhaps?) I'd bet there's a windows faq somewhere on system monitoring (googles) Is this at all helpful, or is this problem beyond: htt

Re: [GENERAL] Idle processes chewing up CPU?

2009-07-28 Thread Brendan Hill
Hi Tom, Given it's on Windows, any suggestion for how I would get hold of this? (Process Monitor tool perhaps?) Regards, -Brendan -Original Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: Wednesday, 29 July 2009 4:13 AM To: Brendan Hill Cc: pgsql-general@postgresql.org Subject

Re: [GENERAL] A question about the permissions

2009-07-28 Thread Tim Uckun
> On lots of systems, giving group permissions is nearly as bad as giving > world permissions (eg, all the users might be in a "users" group). > So we don't do it by default.  If you want to poke holes in the security > of your own installation, go right ahead. I decided to see if I could do it wi

Re: [GENERAL] Video available for PGDay SJC '09

2009-07-28 Thread David Fetter
On Tue, Jul 28, 2009 at 11:34:24AM +0200, Andreas Wenk wrote: > Christophe Pettus schrieb: >> Greetings, >> >> The video recordings of the sessions for PG Day SJC '09 are now available: > > [snip] > >> Many thanks to Steve Crawford for the audio system and assistance with >> setup, tear-down, and

Re: [GENERAL] Field name problem

2009-07-28 Thread Tim Landscheidt
Alan Chandler wrote: > [...] > So I tried to load the same database on my home machine > using pg_restore. This runs version 8.4.0, and it failed > loading the restore with and error at this field "over" > because, I presume, its a reserved word in SQL. > Is there anyway, I can access any of my

Re: [GENERAL] Video available for PGDay SJC '09

2009-07-28 Thread Greg Stark
On Wed, Jul 29, 2009 at 12:10 AM, John R Pierce wrote: > Greg Stark wrote: >> >> I think I'm scarred from Quicktime files because they often were >> encoded with codecs like Sorensen which produced proprietary formats. >> >> > > agreed, and the quicktime installer dragging in itunes if you don't re

Re: [GENERAL] Video available for PGDay SJC '09

2009-07-28 Thread John R Pierce
Greg Stark wrote: I think I'm scarred from Quicktime files because they often were encoded with codecs like Sorensen which produced proprietary formats. agreed, and the quicktime installer dragging in itunes if you don't remember to uncheck all the right boxes, and quicktime nagging you to

Re: [GENERAL] Video available for PGDay SJC '09

2009-07-28 Thread Christophe Pettus
On Jul 28, 2009, at 3:55 PM, Greg Stark wrote: In reality I would be pretty happy with any page that had a link at the bottom to download an mpeg format file with H.264 data in it that mplayer can play. Well, mplayer claims it can play MOV, and the files are H.264, so assuming the mplayer do

Re: [GENERAL] Video available for PGDay SJC '09

2009-07-28 Thread Greg Stark
On Tue, Jul 28, 2009 at 3:38 PM, Christophe Pettus wrote: > > Historically, MOV has been the least-bad container format; Flash support on > anything besides Windows has, traditionally, been very spotty.  The files > themselves are pretty much the same size; FLV is (as noted) a container > format, n

Re: [GENERAL] general question on two-partition table

2009-07-28 Thread Stephen Frost
* Janet Jacobsen (jsjacob...@lbl.gov) wrote: > I looked at the documentation for partitions - it is the case, right, that I > have to create the master table and the two partition tables (depending > on the value of rbscore) and then copy the records from the existing > table into the two partition

[GENERAL] Field name problem

2009-07-28 Thread Alan Chandler
I built an application last year which used the name "over" as the name of a boolean field in one of the tables. It was in regular use last year and worked fine. I have been regularly taking backups with of this database with the following command pg_dump -Fc melindas_ball | gzip -9 > ball.s

Re: [GENERAL] general question on two-partition table

2009-07-28 Thread Janet Jacobsen
Hi. Thanks for your reply. I looked at the documentation for partitions - it is the case, right, that I have to create the master table and the two partition tables (depending on the value of rbscore) and then copy the records from the existing table into the two partitions? Stephen Frost wrot

Re: [GENERAL] Idle processes chewing up CPU?

2009-07-28 Thread Tom Lane
"Brendan Hill" writes: > Using the Process Explorer tool, I've noticed that a child postgres.exe is > chewing up 25% of the CPU usage each (we have two dual-core CPUs, presumably > it's chewing up one core). Using SELECT * FROM pg_stat_activity, I located > the process id (#3884), and it showed: >

Re: [GENERAL] Moving from Windows to Ubuntu - Have a couple of questions

2009-07-28 Thread Richard Huxton
Jennifer Trey wrote: Thanks, I got help from a friend and got it to work. I think postgre was running already but not sure what else he did.. i think that he altered the password among other things. It might well have been the case that the "postgres" user didn't have a password. Unix-based sy

Re: [GENERAL] Calculating the difference between timetz values

2009-07-28 Thread Alvaro Herrera
Tom Lane wrote: > Alexey Klyukin writes: > > On Jul 27, 2009, at 6:52 PM, Michael Glaesemann wrote: > >> I don't have a solution, but am curious what your use case is for > >> timetz (as opposed to timestamptz). > > > I'm writing a custom trigger function that has to compare values of > > tim

Re: [GENERAL] Moving from Windows to Ubuntu - Have a couple of questions

2009-07-28 Thread Jennifer Trey
Thanks, I got help from a friend and got it to work. I think postgre was running already but not sure what else he did.. i think that he altered the password among other things. How should one port the config file from windows to linux? I am guessing replacing the .conf file is not an option :O ..

Re: [GENERAL] Availability of postgres-devel

2009-07-28 Thread Scott Mead
On Tue, Jul 28, 2009 at 12:08 PM, Graeme Gemmill wrote: > If I download the source of postgreSQL8.4.0, will the -devel header stuff > be included? I need it for > compilation of C code and other stuff. Yes, all the includes are there. Depending on what you're doing, you may need to build it fir

Re: [GENERAL] Video available for PGDay SJC '09

2009-07-28 Thread Andreas Wenk
Christophe Pettus schrieb: On Jul 28, 2009, at 8:35 AM, Andreas Wenk wrote: uh - HTML 5 is supported by the browser when? Currently, the tag is supported by Firefox 3.5, Safari 3 and 4, Chrome 3 (in alpha, I believe), iPhone 3. That being said, we can do a fallback to Quicktime, then to a

Re: [GENERAL] Video available for PGDay SJC '09

2009-07-28 Thread Christophe Pettus
On Jul 28, 2009, at 8:35 AM, Andreas Wenk wrote: uh - HTML 5 is supported by the browser when? Currently, the tag is supported by Firefox 3.5, Safari 3 and 4, Chrome 3 (in alpha, I believe), iPhone 3. That being said, we can do a fallback to Quicktime, then to a Flash client, all the wa

[GENERAL] Availability of postgres-devel

2009-07-28 Thread Graeme Gemmill
If I download the source of postgreSQL8.4.0, will the -devel header stuff be included? I need it for compilation of C code and other stuff. Thanks Graeme -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref

Re: [GENERAL] Relational Algebra and Aggregate Functions

2009-07-28 Thread Sam Mason
On Tue, Jul 28, 2009 at 11:26:01AM -0400, Robert James wrote: > On Tue, Jul 28, 2009 at 9:47 AM, Sam Mason wrote: > > On Tue, Jul 28, 2009 at 09:14:38AM -0400, Robert James wrote: > > > Many wrote that the functional programming 'fold' is a good model for > > > relational aggregate functions. I h

Re: [GENERAL] Video available for PGDay SJC '09

2009-07-28 Thread Andreas Wenk
Christophe Pettus schrieb: Historically, MOV has been the least-bad container format; Flash support on anything besides Windows has, traditionally, been very spotty. The files themselves are pretty much the same size; FLV is (as noted) a container format, not a codec, and the video is H.264

Re: [GENERAL] Relational Algebra and Aggregate Functions

2009-07-28 Thread Robert James
On Tue, Jul 28, 2009 at 9:47 AM, Sam Mason wrote: > On Tue, Jul 28, 2009 at 09:14:38AM -0400, Robert James wrote: > > Many wrote that the functional programming 'fold' is a good model for > > relational aggregate functions. I have a few difficulties with this: > > 1. fold doesn't offer any type

Re: [GENERAL] Relational Algebra and Aggregate Functions

2009-07-28 Thread Robert James
Thanks! "SQL and Relational Theory: How to Write Accurate SQL Code" looks like the best pick of the bunch. On Tue, Jul 28, 2009 at 10:08 AM, Michael Glaesemann wrote: > > On Jul 27, 2009, at 21:05 , Robert James wrote: > > 2) Database in Depth: Relational Theory for Practitioners >> >> http://ww

Re: [GENERAL] Moving from Windows to Ubuntu - Have a couple of questions

2009-07-28 Thread Andreas Wenk
Jennifer Trey schrieb: I am in the process of switching to Ubuntu, and I have a couple of question to get started. I installed pgadmin and postgre through the Synaptic Package Manager. I am unfamiliar with the console so I prefer to use pgAdmin to set things up. congratulations for switching

Re: [GENERAL] Video available for PGDay SJC '09

2009-07-28 Thread Christophe Pettus
On Jul 28, 2009, at 7:17 AM, Andreas Wenk wrote: another good approach. I understand the point of view. But this menas to download the files anyway because playing mpeg files in the browser is the same as with mov files - I think. Historically, MOV has been the least-bad container format; F

Re: [GENERAL] Video available for PGDay SJC '09

2009-07-28 Thread Andreas Wenk
Greg Stark schrieb: On Tue, Jul 28, 2009 at 1:41 PM, Andreas Wenk wrote: Why not use a standardized openly documented container format like mpeg4 with mpeg4 part 2 compression instead of one controlled by a single company like flv or quicktime? That would let people play it using any of various o

[GENERAL] Idle processes chewing up CPU?

2009-07-28 Thread Brendan Hill
I recently migrated from MSSQL2000 to Postgres 8.3 for Windows, and overall it's running great. Using the Process Explorer tool, I've noticed that a child postgres.exe is chewing up 25% of the CPU usage each (we have two dual-core CPUs, presumably it's chewing up one core). Using SELECT * FROM

Re: [GENERAL] Relational Algebra and Aggregate Functions

2009-07-28 Thread Michael Glaesemann
On Jul 27, 2009, at 21:05 , Robert James wrote: 2) Database in Depth: Relational Theory for Practitioners http://www.amazon.com/Database-Depth-Relational-Theory-Practitioners/dp/0596100124/ref=sr_1_7?ie=UTF8&s=books&qid=1248742811&sr=1-7 "Database in Depth" is good, though he's effectively re

Re: [GENERAL] For production: 8.4 or 8.3?

2009-07-28 Thread Tom Lane
Magnus Hagander writes: > Personally, I'm still doubtful about using pg_migrator on any large > scale 8.3->8.4 migration. Well, I don't trust it much either, so the RPM documentation will carry a lot of bright red warnings. But how will you be able to trust it any more for 8.5 if people don't te

[GENERAL] Moving from Windows to Ubuntu - Have a couple of questions

2009-07-28 Thread Jennifer Trey
Hi, I have been running PostgreSQL 8.3 for a while now and was installed through the standard Windows installer and everything has been working great :) I am in the process of switching to Ubuntu, and I have a couple of question to get started. I installed pgadmin and postgre through the Synaptic

Re: [GENERAL] Relational Algebra and Aggregate Functions

2009-07-28 Thread Sam Mason
On Tue, Jul 28, 2009 at 09:14:38AM -0400, Robert James wrote: > Many wrote that the functional programming 'fold' is a good model for > relational aggregate functions. I have a few difficulties with this: > 1. fold doesn't offer any type of GROUP BY, which is an essential component > of aggregatio

Re: [GENERAL] Video available for PGDay SJC '09

2009-07-28 Thread Greg Stark
On Tue, Jul 28, 2009 at 1:41 PM, Andreas Wenk wrote: > Bill Moran schrieb: >  > While I've no objection to someone helping out by converting files, I >> >> find it odd that flv is suggested.  I've yet to find anything that can >> play flv files on my FreeBSD desktop machine.  I'm pretty sure mplaye

Re: [GENERAL] Clients disconnect but query still runs

2009-07-28 Thread Robert James
I see - thanks, Tom, for the informative explanation. In my experience admining high volume servers, I found this to a major failure pattern: Client tries query which seems to go on forever (either do to contention or resource exhaustion or some other problem), client gives up / fails / gets shut d

Re: [GENERAL] selecting all columns but one

2009-07-28 Thread A. Kretschmer
In response to blackwater dev : > I have a table with a lot of columns.  One of the columns I want to alias so > have a query of: > > select *, column as newname from mytable. > > The problem is I now have column and newname in the results.  I don't want to > select column by column.  How can I d

Re: [GENERAL] Upgrading from 8.3 to 8.4 and Integer datatimes?

2009-07-28 Thread Michael Glaesemann
On Jul 28, 2009, at 8:48 , Bjørn T Johansen wrote: Will a dump and restore take care of this change or do I have to do some manual converting when upgrading? Dump and reload should be fine. While the binary format of the timestamp values is different in the *database*, the text output of

Re: [GENERAL] selecting all columns but one

2009-07-28 Thread Thomas Kellerer
blackwater dev, 28.07.2009 15:12: I have a table with a lot of columns. One of the columns I want to alias so have a query of: select *, column as newname from mytable. The problem is I now have column and newname in the results. I don't want to select column by column. How can I do a sele

Re: [GENERAL] selecting all columns but one

2009-07-28 Thread Merlin Moncure
On Tue, Jul 28, 2009 at 9:12 AM, blackwater dev wrote: > I have a table with a lot of columns.  One of the columns I want to alias so > have a query of: > select *, column as newname from mytable. > The problem is I now have column and newname in the results.  I don't want > to select column by col

Re: [GENERAL] Relational Algebra and Aggregate Functions

2009-07-28 Thread Robert James
Many wrote that the functional programming 'fold' is a good model for relational aggregate functions. I have a few difficulties with this: 1. fold doesn't offer any type of GROUP BY, which is an essential component of aggregation. 2. I don't believe fold can handle things like AVG() or STDDEV().

[GENERAL] selecting all columns but one

2009-07-28 Thread blackwater dev
I have a table with a lot of columns. One of the columns I want to alias so have a query of: select *, column as newname from mytable. The problem is I now have column and newname in the results. I don't want to select column by column. How can I do a select * but omit one? Thanks!

[GENERAL] Upgrading from 8.3 to 8.4 and Integer datatimes?

2009-07-28 Thread Bjørn T Johansen
Will a dump and restore take care of this change or do I have to do some manual converting when upgrading? Regards, BTJ -- --- Bjørn T Johansen b...@havleik.no

Re: [GENERAL] Video available for PGDay SJC '09

2009-07-28 Thread Andreas Wenk
Bill Moran schrieb: > While I've no objection to someone helping out by converting files, I find it odd that flv is suggested. I've yet to find anything that can play flv files on my FreeBSD desktop machine. I'm pretty sure mplayer can play mov files ... I guess I'll find out this evening when

Re: [GENERAL] Video available for PGDay SJC '09

2009-07-28 Thread Bill Moran
In response to Andreas Wenk : > Christophe Pettus schrieb: > > Greetings, > > > > The video recordings of the sessions for PG Day SJC '09 are now available: > > [snip] > > Just a quick question. Wouldn't it be better to provide the videos in flv > format in a > player in this page. Since I ha

Re: [GENERAL] count of query results in for loop

2009-07-28 Thread Albe Laurenz
Sim Zacks wrote: > Is there any way to (without a separate count query first) to know the > number of rows returned in a: > > for x in select ... Loop > > ... > > End Loop > > structure? No. Not before you exit the loop. Yours, Laurenz Albe -- Sent via pgsql-general mailing list

Re: [GENERAL] C Function Question

2009-07-28 Thread Terry Lee Tucker
On Tuesday 28 July 2009 03:22, Albe Laurenz wrote: > Terry Lee Tucker wrote: > > Does anyone know if a function written in C and linked into the backend > > in a shared library with a statically declared structure, maintain that > > data for the life of the backend process such that, when the funct

Re: [GENERAL] Video available for PGDay SJC '09

2009-07-28 Thread Andreas Wenk
Christophe Pettus schrieb: Greetings, The video recordings of the sessions for PG Day SJC '09 are now available: [snip] Many thanks to Steve Crawford for the audio system and assistance with setup, tear-down, and coordination during the event. -- -- Christophe Pettus x...@thebuild.com H

Re: [GENERAL] For production: 8.4 or 8.3?

2009-07-28 Thread Grzegorz Jaśkiewicz
I used pg_migrator to migrate my rather large production databases (couple hundreds GBs). Schemas are easy, as I keep datetimes as bigints myself (for various reasons) I won't get the float/int problem. But I do understand, that keeping dates as floats might cause grief (unless you create operator

[GENERAL] count of query results in for loop

2009-07-28 Thread Sim Zacks
Is there any way to (without a separate count query first) to know the number of rows returned in a: for x in select ... Loop ... End Loop structure? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql

Re: [GENERAL] For production: 8.4 or 8.3?

2009-07-28 Thread Magnus Hagander
2009/7/28 Devrim GÜNDÜZ : > On Mon, 2009-07-27 at 19:44 -0400, Tom Lane wrote: >> >> > I thought they would get around to changing it now. >> >> "They" is me, and it's not changing.  I'm not blowing a chance at >> in-place upgrade to switch the integer-timestamp default. > > FWIW, to follow Postgre

Re: [GENERAL] For production: 8.4 or 8.3?

2009-07-28 Thread Devrim GÜNDÜZ
On Tue, 2009-07-28 at 16:07 +0800, Phoenix Kiula wrote: > > Ok this discussion became too complex for me. :-) > I am a simple guy with a simple question: will my old data from 8.2.9, > which does have some date/time indexes, will also work in production > version of 8.3.7? Correct? Basically:

Re: [GENERAL] For production: 8.4 or 8.3?

2009-07-28 Thread Phoenix Kiula
> FWIW, to follow PostgreSQL defaults, I changed PGDG rpms to use it by > default. I think this will be the first time that we break compatibility Ok this discussion became too complex for me. I am a simple guy with a simple question: will my old data from 8.2.9, which does have some date/time i

Re: [GENERAL] For production: 8.4 or 8.3?

2009-07-28 Thread Devrim GÜNDÜZ
On Mon, 2009-07-27 at 19:44 -0400, Tom Lane wrote: > > > I thought they would get around to changing it now. > > "They" is me, and it's not changing. I'm not blowing a chance at > in-place upgrade to switch the integer-timestamp default. FWIW, to follow PostgreSQL defaults, I changed PGDG rpms

Re: [GENERAL] Join tables by nearest date?

2009-07-28 Thread A. Kretschmer
In response to Sam Mason : > On Mon, Jul 27, 2009 at 10:51:00PM -0700, Nick wrote: > > Is it possible to join two tables by the nearest date? For example how > > could I find out where the user was on their birthday? > > DISTINCT ON[1] is normally the easiest way: > > SELECT DISTINCT ON (u.id)

Re: [GENERAL] Postgres 8.2 database recovery Could not create relation Invalid Argument

2009-07-28 Thread Magnus Hagander
On Tuesday, July 28, 2009, Justin Alston wrote: > Novice here :). I have PostgreSQL 8.2 installed on a single board computer > running Windows XP Embedded on a Compact Flash drive - 2 databases with no > more than 2000 ro. After 10 power cycles spaced 6 mins apart, I noticed the > postgres.exe

Re: [GENERAL] C Function Question

2009-07-28 Thread Albe Laurenz
Terry Lee Tucker wrote: > Does anyone know if a function written in C and linked into the backend in a > shared library with a statically declared structure, maintain that data for > the life of the backend process such that, when the function is called again, > the structure data is intact? >