Re: [GENERAL] Server move using rsync

2011-10-27 Thread Scott Marlowe
On Thu, Oct 27, 2011 at 7:37 PM, Stephen Denne wrote: > We're intending to move a 470GB PostgreSQL 8.3.13 database using the > following technique from > http://www.postgresql.org/docs/8.3/interactive/backup-file.html > > "Another option is to use rsync to perform a file system backup. This is d

Re: [GENERAL] pglesslog for Postgres 9.1.1

2011-10-27 Thread Satoshi Nagayasu
Hi Louis, 2011/10/27 19:49, mailtolouis2020-postg...@yahoo.com wrote: Hi, I'm sorry I'm not good in C, anyone can help to put a patch or release a new version for that? Regards Louis --

Re: [GENERAL] JDBC connections very occasionally hang

2011-10-27 Thread Tom Lane
Karl Wright writes: > ... By the end of that time I usually see between one and three "stuck" > threads, all waiting inside the JDBC driver for a response from the > postgresql server. I can provide a stack trace if requested. How about a stack trace from the connected backend? And what is its

[GENERAL] JDBC connections very occasionally hang

2011-10-27 Thread Karl Wright
Hi folks, I'm seeing something that on the face of it sounds very similar to the issue reported at http://archives.postgresql.org/pgsql-general/2011-10/msg00570.php. I am using Postgresql 8.4, and the problem occurs with both the 8.4 JDBC type-3 driver and the 9.1 JDBC type-3 driver. The test I

[GENERAL] Server move using rsync

2011-10-27 Thread Stephen Denne
We're intending to move a 470GB PostgreSQL 8.3.13 database using the following technique from http://www.postgresql.org/docs/8.3/interactive/backup-file.html   "Another option is to use rsync to perform a file system backup. This is done by first running rsync while the database server is running

Re: [GENERAL] User feedback requested on temp tables usage for Hot Standby

2011-10-27 Thread Ben Chobot
On Oct 27, 2011, at 5:13 PM, Simon Riggs wrote: > Some people have asked for the ability to create temp tables on a Hot > Standby server. > > I've got a rough implementation plan but it would have some > restrictions, so I would like to check my understanding of the use > case for this feature so

Re: [GENERAL] PostGIS in a commercial project

2011-10-27 Thread Joshua D. Drake
On 10/27/2011 04:24 PM, Chris Travers wrote: On Thu, Oct 27, 2011 at 9:44 AM, Martijn van Oosterhout wrote: I note in the OPs case they are relying on the customer to install PostGIS. The GPL only applies to *redistribution* not usage. So if you're not supplying your customers with PostGI

Re: [GENERAL] PostGIS in a commercial project

2011-10-27 Thread Chris Travers
On Thu, Oct 27, 2011 at 9:44 AM, Martijn van Oosterhout wrote: > I note in the OPs case they are relying on the customer to install > PostGIS.  The GPL only applies to *redistribution* not usage.  So if > you're not supplying your customers with PostGIS then the fact that > it's GPL seems complet

[GENERAL] User feedback requested on temp tables usage for Hot Standby

2011-10-27 Thread Simon Riggs
Some people have asked for the ability to create temp tables on a Hot Standby server. I've got a rough implementation plan but it would have some restrictions, so I would like to check my understanding of the use case for this feature so I don't waste time implementing something nobody actually fi

Re: [GENERAL] Server hitting 100% CPU usage, system comes to a crawl.

2011-10-27 Thread Alan Hodgson
On October 27, 2011 01:09:51 PM Brian Fehrle wrote: > We've restarted the postgresql cluster, so the issue is not happening at > this moment. but running a vmstat 10 had my 'cs' average at 3K and 'in' > averaging around 9.5K. Random thought, is there any chance the server is physically overheating

Re: [GENERAL] Custom data type in C with one fixed and one variable attribute

2011-10-27 Thread Tom Lane
Adrian Schreyer writes: > The data type I have is > typedef struct { > int4 length; > uint32 foo; > char bar[1]; > } oefp; Seems reasonable enough. > mydatatype *dt = (mydatatype*) palloc(VARHDRSZ + sizeof(uint32) + > strlen(buffer)); > SET_VARSIZE(dt, V

Re: [GENERAL] Server hitting 100% CPU usage, system comes to a crawl.

2011-10-27 Thread Brian Fehrle
On 10/27/2011 01:48 PM, Scott Marlowe wrote: On Thu, Oct 27, 2011 at 12:39 PM, Brian Fehrle wrote: Looking at top, I see no SWAP usage, very little IOWait, and there are a large number of postmaster processes at 100% cpu usage (makes sense, at this point there are 150 or so queries currently e

[GENERAL] PostgreSQL at LISA in Boston: Dec. 7-8

2011-10-27 Thread Josh Berkus
All, We are going to be doing a booth at Usenix LISA[1] conference in Boston from December 7-8. If you live in Boston and are a PostgreSQL enthusiast, or if you plan to attend LISA, I want your help! I need booth volunteers to help me work the booth. All you need is some general knowledge of ho

Re: [GENERAL] Server hitting 100% CPU usage, system comes to a crawl.

2011-10-27 Thread Brian Fehrle
Also, I'm not having any issue with the database restarting itself, simply becoming unresponsive / slow to respond, to the point where just sshing to the box takes about 30 seconds if not longer. Performing a pg_ctl restart on the cluster resolves the issue. I looked through the logs for any s

Re: [GENERAL] Server hitting 100% CPU usage, system comes to a crawl.

2011-10-27 Thread Tom Lane
Brian Fehrle writes: > Hi all, need some help/clues on tracking down a performance issue. > PostgreSQL version: 8.3.11 > I've got a system that has 32 cores and 128 gigs of ram. We have > connection pooling set up, with about 100 - 200 persistent connections > open to the database. Our applicat

Re: [GENERAL] Getting X coordinate from a point(lseg), btw i read the man page about points.

2011-10-27 Thread Tom Lane
"Ing.Edmundo.Robles.Lopez" writes: > Hi in the main page about geometric operations said: > It is possible to access the two component numbers of a point as though it > were an array with indices 0 and 1. For example, if t.p is a point column > then SELECT p[0] FROM t retrieves the X coo

Re: [GENERAL] Server hitting 100% CPU usage, system comes to a crawl.

2011-10-27 Thread Brian Fehrle
On 10/27/2011 02:27 PM, Scott Mead wrote: On Thu, Oct 27, 2011 at 2:39 PM, Brian Fehrle mailto:bri...@consistentstate.com>> wrote: Hi all, need some help/clues on tracking down a performance issue. PostgreSQL version: 8.3.11 I've got a system that has 32 cores and 128 gigs of r

[GENERAL] Custom data type in C with one fixed and one variable attribute

2011-10-27 Thread Adrian Schreyer
Hi, I am trying to create a custom data type in C that has a fixed size and a variable size attribute - is that actually possible? The documentation mentions only one or the other but a struct in the pg_trgm extension (TRGM) seems to have that. The data type I have is typedef struct { in

Re: [GENERAL] Server hitting 100% CPU usage, system comes to a crawl.

2011-10-27 Thread Scott Mead
On Thu, Oct 27, 2011 at 2:39 PM, Brian Fehrle wrote: > Hi all, need some help/clues on tracking down a performance issue. > > PostgreSQL version: 8.3.11 > > I've got a system that has 32 cores and 128 gigs of ram. We have connection > pooling set up, with about 100 - 200 persistent connections ope

Re: [GENERAL] Server hitting 100% CPU usage, system comes to a crawl.

2011-10-27 Thread Brian Fehrle
On 10/27/2011 02:50 PM, Tom Lane wrote: Brian Fehrle writes: Hi all, need some help/clues on tracking down a performance issue. PostgreSQL version: 8.3.11 I've got a system that has 32 cores and 128 gigs of ram. We have connection pooling set up, with about 100 - 200 persistent connections open

Re: [GENERAL] Server hitting 100% CPU usage, system comes to a crawl.

2011-10-27 Thread Scott Marlowe
On Thu, Oct 27, 2011 at 1:52 PM, Scott Marlowe wrote: > On Thu, Oct 27, 2011 at 1:48 PM, Scott Marlowe > wrote: >> OK, a few points.  1: You've got a zombie process.  Find out what's > > To expand on the zombie thing, it's quite possible that you're > managing to make a pg backend process crasho

Re: [GENERAL] Server hitting 100% CPU usage, system comes to a crawl.

2011-10-27 Thread Scott Marlowe
On Thu, Oct 27, 2011 at 1:48 PM, Scott Marlowe wrote: > OK, a few points.  1: You've got a zombie process.  Find out what's To expand on the zombie thing, it's quite possible that you're managing to make a pg backend process crashout, which would cause the db to restart midday, which is bad (TM)

Re: [GENERAL] Server hitting 100% CPU usage, system comes to a crawl.

2011-10-27 Thread Scott Marlowe
On Thu, Oct 27, 2011 at 12:39 PM, Brian Fehrle wrote: > Looking at top, I see no SWAP usage, very little IOWait, and there are a > large number of postmaster processes at 100% cpu usage (makes sense, at this > point there are 150 or so queries currently executing on the database). > >  Tasks: 713

Re: [GENERAL] Server hitting 100% CPU usage, system comes to a crawl.

2011-10-27 Thread John R Pierce
On 10/27/11 11:39 AM, Brian Fehrle wrote: I've got a system that has 32 cores and 128 gigs of ram. We have connection pooling set up, with about 100 - 200 persistent connections open to the database. Our applications then use these connections to query the database constantly, but when a conn

[GENERAL] Server hitting 100% CPU usage, system comes to a crawl.

2011-10-27 Thread Brian Fehrle
Hi all, need some help/clues on tracking down a performance issue. PostgreSQL version: 8.3.11 I've got a system that has 32 cores and 128 gigs of ram. We have connection pooling set up, with about 100 - 200 persistent connections open to the database. Our applications then use these connection

Re: [GENERAL] PostGIS in a commercial project

2011-10-27 Thread Martijn van Oosterhout
On Tue, Oct 25, 2011 at 01:41:17PM +0200, Thomas Kellerer wrote: > Thank you very much for the detailed explanation. > > I always have a hard time to understand the GPL especially the > dividing line between "using", "linkin" and creating a derived work. That because the GPL does not get to defin

Re: [GENERAL] Are pg_xlog/* fiels necessary for PITR?

2011-10-27 Thread Venkat Balaji
On Thu, Oct 27, 2011 at 7:57 PM, rihad wrote: > Hi, I'm backing up the entire server directory from time to time. pg_xlog/ > directory containing WAL files is pretty heavy (wal_level=archive). Can I > exclude it from the regular tar archive? > The best would be to perform "pg_switch_xlog()" and

Re: [GENERAL] matching against a list of regexp?

2011-10-27 Thread Richard Broersma
On Thu, Oct 27, 2011 at 9:18 AM, Gauthier, Dave wrote: > I need to be able to select all records with a col value that matches any of > a list of regexp.  Sort of like... > > select a,b,c from foo where d ~ ('^xyz','blah','shrug$'); WHERE d ~ '^xyz|blah|shrug$' -- Regards, Richard Broersma Jr.

[GENERAL] matching against a list of regexp?

2011-10-27 Thread Gauthier, Dave
Hi: I need to be able to select all records with a col value that matches any of a list of regexp. Sort of like... select a,b,c from foo where d ~ ('^xyz','blah','shrug$'); Does anyone know the right syntax for this? Thanks!

Re: [GENERAL] WAL file size vs. data file size

2011-10-27 Thread Ben Chobot
On Oct 27, 2011, at 8:44 AM, Tom Lane wrote: > Ben Chobot writes: >> Today I tried to restore a 70GB database with the standard "pg_dump -h >> old_server <∑> | psql -h new_server <∑>" method. I had 100GB set aside for >> WAL files, which I figured surely would be enough, because all of the data

Re: [GENERAL] WAL file size vs. data file size

2011-10-27 Thread Tom Lane
Ben Chobot writes: > Today I tried to restore a 70GB database with the standard "pg_dump -h > old_server <…> | psql -h new_server <…>" method. I had 100GB set aside for > WAL files, which I figured surely would be enough, because all of the data, > including indices, is only 70GB. So I was a bi

[GENERAL] Are pg_xlog/* fiels necessary for PITR?

2011-10-27 Thread rihad
Hi, I'm backing up the entire server directory from time to time. pg_xlog/ directory containing WAL files is pretty heavy (wal_level=archive). Can I exclude it from the regular tar archive? #!/bin/sh renice 20 $$ 2>/dev/null pgsql -U pgsql -q -c "CHECKPOINT" postgres # speed up pg_start_backu

[GENERAL] Getting X coordinate from a point(lseg), btw i read the man page about points.

2011-10-27 Thread Ing.Edmundo.Robles.Lopez
Hi in the main page about geometric operations said: It is possible to access the two component numbers of a point as though it were an array with indices 0 and 1. For example, if t.p is a point column then SELECT p[0] FROM t retrieves the X coordinate and UPDATE t SET p[1] = ... cha

[GENERAL] How are PGRES_FATAL_ERROR raised?????

2011-10-27 Thread Ing.Edmundo.Robles.Lopez
Hi! I would like toknow the conditionsorreasons where postgressends aPGRES_FATAL_ERROR. El contenido de este correo electrónico y sus archivos adjuntos son privados y confidenciales y va dirigido exclusivamente a su destinatario. No se autoriza la utilización, retransmisión, diseminación, o

[GENERAL] pgAgent and encoding

2011-10-27 Thread pasman pasmański
Hi. I can't set proper encoding for pgAgent. I have two databases: postgres and www. postgres is encoded in UTF8, www is encoded in WIN1250. When i run pgAgent's task in www database, it fail (message char cant be converted to UTF8): 2011-10-27 14:50:29 CEST [nieznany] 1.COPY BŁĄD: k

Re: [GENERAL] Saving score of 3 players into a table

2011-10-27 Thread David Johnston
Fair enough. But look in the SQL Commands section under SELECT (FROM clause) as well, as that gives you the syntax and meaning and not just an overview of the concept. David J. On Oct 27, 2011, at 8:27, Alexander Farber wrote: > The PostgreSQL docs are unfortunately scarce on JOINs > http:/

Re: [GENERAL] Saving score of 3 players into a table

2011-10-27 Thread Michael Glaesemann
On Oct 27, 2011, at 7:21, Alexander Farber wrote: > Thank you Michal and others - > > On Wed, Oct 26, 2011 at 11:11 PM, Michael Glaesemann > wrote: >> Get games for a particular user: >> >> SELECT g.gid, g.rounds, g.finished >> FROM pref_games g >> JOIN pref_scores u USING (gid) >> WHERE u.

Re: [GENERAL] Saving score of 3 players into a table

2011-10-27 Thread Alexander Farber
The PostgreSQL docs are unfortunately scarce on JOINs http://www.postgresql.org/docs/8.4/static/tutorial-join.html I've never seen a JOIN producing several rows instead of columns before Michael suggested it in this thread -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To

Re: [GENERAL] Saving score of 3 players into a table

2011-10-27 Thread David Johnston
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Alexander Farber Sent: Thursday, October 27, 2011 7:21 AM Cc: pgsql-general Subject: Re: [GENERAL] Saving score of 3 players into a table Thank you Michal and others - On W

Re: [GENERAL] Saving score of 3 players into a table

2011-10-27 Thread Alexander Farber
Thank you Michal and others - On Wed, Oct 26, 2011 at 11:11 PM, Michael Glaesemann wrote: > Get games for a particular user: > > SELECT g.gid, g.rounds, g.finished >  FROM pref_games g >  JOIN pref_scores u USING (gid) >  WHERE u.id = :id; > > Now, add the participants for those games > > SELECT

Re: [GENERAL] pglesslog for Postgres 9.1.1

2011-10-27 Thread mailtolouis2020-postg...@yahoo.com
Hi, I'm sorry I'm not good in C, anyone can help to put a patch or release a new version for that? Regards Louis > >From: Tom Lane >To: "mailtolouis2020-postg...@yahoo.com" >Cc: Postgres >Sent: Wednesday, October 26, 2011 3:42 PM >Subject: Re: [GENERAL] pgl

Re: [GENERAL] GIN : Working with term positions

2011-10-27 Thread Cédric Villemain
2011/10/26 Yoann Moreau : > On 21/10/11 12:23, Yoann Moreau wrote: >> >> Hello, >> I'm using a GIN index for a text column on a big table. I use it to rank >> the rows, but I also need to get the term positions for each document of a >> subset of documents. I assume these positions are stored in th

Re: [GENERAL] Can someone help explain what's going on from the attached logs?

2011-10-27 Thread Simon Riggs
On Wed, Oct 26, 2011 at 6:41 PM, Chris Redekop wrote: >> Caveat #2 applies here >> >> http://developer.postgresql.org/pgdocs/postgres/hot-standby.html#HOT-STANDBY-CAVEATS >> >> The consistent state is delayed until your long running transactions >> end, which is workload dependent but transient. >

Re: [GENERAL] specifying multiple ldapserver in pg_hba.conf

2011-10-27 Thread Magnus Hagander
On Wed, Oct 26, 2011 at 23:00, Darin Perusich wrote: > Are you able to specify multiple ldapservers in pg_hba.conf and if so > what is the format? I'd like to be able to build some redundancy incase > one of the ldap servers goes down. This is unfortunately currently not possible. To do this, you

Re: [GENERAL] PG 9.1.1 - availability of xslt_process()

2011-10-27 Thread Vibhor Kumar
On Oct 27, 2011, at 11:43 AM, Andrea Peri wrote: > Hi, > > I'm using the compiled version of PG 9.1.1 on win32 . > > try-ing to call the xslt_process(text,text) (two parameter version) > > PG say me it is not available. > > In the docs are say that it is available only if compiled with the li