Re: [GENERAL] Decreasing WAL size effects

2008-10-31 Thread Craig Ringer
Jason Long wrote: Greg Smith wrote: On Thu, 30 Oct 2008, Tom Lane wrote: The real reason not to put that functionality into core (or even contrib) is that it's a stopgap kluge. What the people who want this functionality *really* want is continuous (streaming) log-shipping, not

[GENERAL] tsearch2 problem

2008-10-31 Thread Jodok Batlogg
we're using tsearch2 with the german dictionary http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/dicts/ispell/ispell-german-compound.tar.gz for fulltext search. the indexing is configured as follows: CREATE TEXT SEARCH DICTIONARY public.german ( TEMPLATE = ispell, DictFile =

Re: [GENERAL] Decreasing WAL size effects

2008-10-31 Thread Craig Ringer
If Pg truncated the WAL files before calling archive_command, and would accept truncated WAL files on restore, that'd be really useful. On second thought - that'd prevent reuse of WAL files, or at least force the filesystem to potentially allocate new storage for the part that was

[GENERAL] Storage location of temporary files

2008-10-31 Thread Christian Schröder
Hi list, I want to optimize the performance of our PostgreSQL 8.2 server. Up to now the server has a raid1 where the whole database is located (including tha WAL files). We will now move the database to a raid5 (which should be faster than the raid1) and will also move the WAL to a separate

Re: [GENERAL] Storage location of temporary files

2008-10-31 Thread Christian Schröder
Christian Schröder wrote: So I would like to use a faster disk for these temporary files, too, but I could not find where the temporary files are located. Is there a separate directory? I have found a pgsql_tmp directory inside of the database directories (base/oid/pgsql_tmp). Is this what I'm

Re: [GENERAL] Decreasing WAL size effects

2008-10-31 Thread Magnus Hagander
On 31 okt 2008, at 02.18, Greg Smith [EMAIL PROTECTED] wrote: On Thu, 30 Oct 2008, Tom Lane wrote: The real reason not to put that functionality into core (or even contrib) is that it's a stopgap kluge. What the people who want this functionality *really* want is continuous (streaming)

Re: [GENERAL] Are there plans to add data compression feature to postgresql?

2008-10-31 Thread Gregory Stark
Scott Marlowe [EMAIL PROTECTED] writes: What is the torn page problem? Note I'm no big fan of compressed file systems, but I can't imagine them not working with databases, as I've seen them work quite reliably under exhange server running a db oriented storage subsystem. And I can't

Re: [GENERAL] Slow query performance

2008-10-31 Thread Nick Mellor
Hi Kevin, I'm not deeply knowledgeable about PostgreSQL, but my guess is that 2 things are doing you in: (1) scanning all those nulls during SELECTs (even though PostgreSQL is efficient at nulls, there are still tens or hundreds of billions of them) (2) All those single-field indexes, and

Re: [GENERAL] tsearch2 problem

2008-10-31 Thread Oleg Bartunov
Jodok, you got what's you defined. Please, read documentation. In short, word doesn't indexed if it is not recognized by any dictionaried from stack of dictionaries. Put stemming dictionary at the end, which recognizes everything. Oleg On Fri, 31 Oct 2008, Jodok Batlogg wrote: we're using

Re: [GENERAL] Are there plans to add data compression feature to postgresql?

2008-10-31 Thread Scott Marlowe
On Thu, Oct 30, 2008 at 9:43 PM, Tom Lane [EMAIL PROTECTED] wrote: Scott Marlowe [EMAIL PROTECTED] writes: Sure, bash Microsoft it's easy. But it doesn't address the point, is a database safe on top of a compressed file system and if not, why? It is certainly *less* safe than it is on top

[GENERAL] Bad behaviour in Sun Cluster

2008-10-31 Thread Patricio Mora
Hello all. - postmaster (PostgreSQL) 7.4.5 (Update unviable due to application) - Solaris 9 - Sun Cluster 3.1.0 - SUNWscPostgreSQL 3.1.0 About 3 times each week, the check_pgs function of the SUNWscPostgreSQL bin/functios file, stops my Postgres database. I enabled the cluster's monitor logs

Re: [GENERAL] tsearch2 problem

2008-10-31 Thread Oleg Bartunov
Sergio, On Fri, 31 Oct 2008, Ivan Sergio Borgonovo wrote: On Fri, 31 Oct 2008 13:10:20 +0300 (MSK) Oleg Bartunov [EMAIL PROTECTED] wrote: Jodok, you got what's you defined. Please, read documentation. In short, word doesn't indexed if it is not recognized by any dictionaried from stack of

Re: [GENERAL] tsearch2 problem

2008-10-31 Thread Ivan Sergio Borgonovo
On Fri, 31 Oct 2008 13:10:20 +0300 (MSK) Oleg Bartunov [EMAIL PROTECTED] wrote: Jodok, you got what's you defined. Please, read documentation. In short, word doesn't indexed if it is not recognized by any dictionaried from stack of dictionaries. Put stemming dictionary at the end, which

Re: [GENERAL] tsearch2 problem

2008-10-31 Thread Oleg Bartunov
On Fri, 31 Oct 2008, Jodok Batlogg wrote: hi oleg, thanks for your quick response, 2008/10/31 Oleg Bartunov [EMAIL PROTECTED]: Jodok, you got what's you defined. Please, read documentation. In short, word doesn't indexed if it is not recognized by any dictionaried from stack of

Re: [GENERAL] tsearch2 problem

2008-10-31 Thread Jodok Batlogg
hi oleg, thanks for your quick response, 2008/10/31 Oleg Bartunov [EMAIL PROTECTED]: Jodok, you got what's you defined. Please, read documentation. In short, word doesn't indexed if it is not recognized by any dictionaried from stack of dictionaries. Put stemming dictionary at the end,

Re: [GENERAL] Slow query performance

2008-10-31 Thread Isak Hansen
On Wed, Oct 29, 2008 at 9:18 PM, Kevin Galligan [EMAIL PROTECTED] wrote: I'm approaching the end of my rope here. I have a large database. 250 million rows (ish). Each row has potentially about 500 pieces of data, although most of the columns are sparsely populated. *snip* So, went the

Re: [GENERAL] speed up restore from dump

2008-10-31 Thread Sam Mason
On Thu, Oct 30, 2008 at 02:28:38PM -0700, Alan Hodgson wrote: On Thursday 30 October 2008, Joao Ferreira [EMAIL PROTECTED] wrote: well. see for yourself... (360 RAM , 524 SWAP) that's what it is... it supposed to be somewhat an embedded product... Clearly your hardware is your speed

Re: [GENERAL] Are there plans to add data compression feature to postgresql?

2008-10-31 Thread Scott Marlowe
On Fri, Oct 31, 2008 at 2:49 AM, Gregory Stark [EMAIL PROTECTED] wrote: Scott Marlowe [EMAIL PROTECTED] writes: What is the torn page problem? Note I'm no big fan of compressed file systems, but I can't imagine them not working with databases, as I've seen them work quite reliably under

Re: [GENERAL] Storage location of temporary files

2008-10-31 Thread Sam Mason
On Fri, Oct 31, 2008 at 09:01:29AM +0100, Christian Schrrrder wrote: So I would like to use a faster disk for these temporary files, too, but I could not find where the temporary files are located. Is there a separate directory? I have found a pgsql_tmp directory inside of the database

Re: [GENERAL] tsearch2 problem

2008-10-31 Thread John DeSoi
On Oct 31, 2008, at 6:30 AM, Jodok Batlogg wrote: nevertheless i still have the problem that words with '/' are beeing interpreted as file paths instead of words. any idea how i could tweak this? The easiest solution I found was to replace '/' with a space before parsing the text.

Re: [GENERAL] Bad behaviour in Sun Cluster

2008-10-31 Thread Scott Marlowe
On Fri, Oct 31, 2008 at 5:00 AM, Patricio Mora [EMAIL PROTECTED] wrote: Hello all. - postmaster (PostgreSQL) 7.4.5 (Update unviable due to application) And this prevents you from updating to 7.4.22? - Solaris 9 - Sun Cluster 3.1.0 - SUNWscPostgreSQL 3.1.0 About 3 times each week, the

Re: [GENERAL] Bad behaviour in Sun Cluster

2008-10-31 Thread Patricio Mora
Scott Marlowe escribi: On Fri, Oct 31, 2008 at 5:00 AM, Patricio Mora [EMAIL PROTECTED] wrote: Hello all. - postmaster (PostgreSQL) 7.4.5 (Update unviable due to application) And this prevents you from updating to 7.4.22? Thanks, I'll try it on my development

[GENERAL] perl-DBD-Pg package for CentOS 5?

2008-10-31 Thread Kevin Murphy
Hi Devrim, Thanks for the awesome resource of yumpgsqlrpms.org. My life would be complete if it offered perl-DBD-Pg for CentOS 5! I'll look around for a src rpm. -Kevin -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

[GENERAL] Equivalent for AUTOINCREMENT?

2008-10-31 Thread Michelle Konzack
Hello, I have a table where I have a serialnumber which shuld be increased be each INSERT. I know I can use max() to get the highest number, but how can I use it in a INSERT statement? There was a message for some month a message describing it on this list but I do not find the message

Re: [GENERAL] Equivalent for AUTOINCREMENT?

2008-10-31 Thread Grzegorz Jaśkiewicz
# create table foo( a SERIAL ); NOTICE: CREATE TABLE will create implicit sequence foo_a_seq for serial column foo.a CREATE TABLE # \d+ foo Table public.foo Column | Type | Modifiers | Description +-+-+- a | integer |

Re: [GENERAL] Are there plans to add data compression feature to postgresql?

2008-10-31 Thread Alvaro Herrera
Scott Marlowe escribió: On Thu, Oct 30, 2008 at 7:37 PM, Alvaro Herrera [EMAIL PROTECTED] wrote: Scott Marlowe escribió: What is the torn page problem? Note I'm no big fan of compressed file systems, but I can't imagine them not working with databases, as I've seen them work quite

Re: [GENERAL] Equivalent for AUTOINCREMENT?

2008-10-31 Thread Sam Mason
On Fri, Oct 31, 2008 at 03:30:44AM +0100, Michelle Konzack wrote: I have a table where I have a serialnumber which shuld be increased be each INSERT. I know I can use max() to get the highest number, but how can I use it in a INSERT statement? Just don't mention the column. For example,

Re: [GENERAL] Are there plans to add data compression feature to postgresql?

2008-10-31 Thread Ivan Sergio Borgonovo
On Fri, 31 Oct 2008 08:49:56 + Gregory Stark [EMAIL PROTECTED] wrote: Scott Marlowe [EMAIL PROTECTED] writes: What is the torn page problem? Note I'm no big fan of compressed file systems, but I can't imagine them not working with databases, as I've seen them work quite reliably

Re: [GENERAL] Equivalent for AUTOINCREMENT?

2008-10-31 Thread Grzegorz Jaśkiewicz
pardon me, I didn't read the post - just judged it by subject really :) you can also use keyward DEFAULT, so insert into foo(a) values(default); But that's the whole point of DEFAULT in create table statement. If you omit that column, it will be set to default value.

Re: [GENERAL] Equivalent for AUTOINCREMENT?

2008-10-31 Thread Michael Hall
I have a table where I have a serialnumber which shuld be increased be each INSERT. I know I can use max() to get the highest number, but how can I use it in a INSERT statement? Have a look in the manual for the SERIAL data type. For fields with a SERIAL data type, you can use DEFAULT in

Re: [GENERAL] Are there plans to add data compression feature to postgresql?

2008-10-31 Thread Thomas Samson
On Fri, Oct 31, 2008 at 3:01 PM, Alvaro Herrera [EMAIL PROTECTED]wrote: Scott Marlowe escribió: On Thu, Oct 30, 2008 at 7:37 PM, Alvaro Herrera [EMAIL PROTECTED] wrote: Scott Marlowe escribió: What is the torn page problem? Note I'm no big fan of compressed file systems, but I

[GENERAL] plruby on windows

2008-10-31 Thread [EMAIL PROTECTED]
Hi, I know it has been posted before, but it's been some time since that and there has been no definitive (good) answer, so: has anyone been able to build and use PL/Ruby with postgres 8.3 on windows? I have had no problems on my linux machine, but now I need to get it working on windows...

[GENERAL] Connections getting stuck sending data to client

2008-10-31 Thread Chris Butler
I've been having intermittent problems with our DB server (running postgresql 8.3.3) reaching its connection limit, all because of a SELECT statement that's stuck while sending data. This gets stuck because there's a transaction waiting to do an ALTER TABLE, then the subsequent SELECTs wait for

Re: [GENERAL] speed up restore from dump

2008-10-31 Thread Joao Ferreira
On Thu, 2008-10-30 at 13:08 -0700, Alan Hodgson wrote: On Thursday 30 October 2008, Joao Ferreira gmail During restore: # vmstat procs memory--- ---swap-- -io -system-- cpu r b swpd free buff cache si so bi bo in cs us sy id wa 3 1 230204

Re: [GENERAL] perl-DBD-Pg package for CentOS 5?

2008-10-31 Thread Devrim GÜNDÜZ
Hi, On Fri, 2008-10-31 at 09:20 -0400, Kevin Murphy wrote: My life would be complete if it offered perl-DBD-Pg for CentOS 5! We had an up2date package, but it broke many apps inside RHEL/CentOS 5, so I removed EL-4 and EL-5 branches from SVN. If you want, you can grab Fedora 9 SRPM and

Re: [GENERAL] Storage location of temporary files

2008-10-31 Thread Aaron
I too have used a symlink for some time (years) to put temp onto dedicated disks without any problems. I am not sure if 8.3 is different but I symlink the directory: base/pgsql_tmp Aaron Thul http://www.chasingnuts.com On Fri, Oct 31, 2008 at 8:11 AM, Sam Mason [EMAIL PROTECTED] wrote: On

Re: [GENERAL] autovacuum

2008-10-31 Thread Noah Freire
On Thu, Oct 30, 2008 at 8:53 PM, Matthew T. O'Connor [EMAIL PROTECTED]wrote: Noah Freire wrote: On Wed, Oct 29, 2008 at 4:46 PM, Matthew T. O'Connor [EMAIL PROTECTED]mailto: [EMAIL PROTECTED] wrote: Is the table being excluded? (see the pg_autovacuum system table settings)

Re: [GENERAL] autovacuum

2008-10-31 Thread Noah Freire
On Wed, Oct 29, 2008 at 4:46 PM, Matthew T. O'Connor [EMAIL PROTECTED]wrote: Noah Freire wrote: 2008-10-29 11:09:03.453 PDTDEBUG: 0: accounts: vac: 16697969 (threshold 650), anl: 16697969 (threshold 12048) 2008-10-29 11:09:05.610 PDTDEBUG: 0: accounts: vac: 16699578

Re: [GENERAL] Are there plans to add data compression feature to postgresql?

2008-10-31 Thread Gregory Stark
Ivan Sergio Borgonovo [EMAIL PROTECTED] writes: On Fri, 31 Oct 2008 08:49:56 + Gregory Stark [EMAIL PROTECTED] wrote: Invisible under normal operation sure, but when something fails the consequences will surely be different and I can't see how you could make a compressed filesystem safe

Re: [GENERAL] perl-DBD-Pg package for CentOS 5?

2008-10-31 Thread Kevin Murphy
Joao Ferreira wrote: Have you considered installing directlly from CPAN ? # perl -MCPAN -e 'install DBD::Pg;' On Fri, 2008-10-31 at 09:20 -0400, Kevin Murphy wrote: My life would be complete if it offered perl-DBD-Pg for CentOS 5! Yes, but I prefer a package in this situation

Re: [GENERAL] Equivalent for AUTOINCREMENT?

2008-10-31 Thread D. Dante Lorenso
Michelle Konzack wrote: I have a table where I have a serialnumber which shuld be increased be each INSERT. I know I can use max() to get the highest number, but how can I use it in a INSERT statement? There was a message for some month a message describing it on this list but I do not

Re: [GENERAL] Connections getting stuck sending data to client

2008-10-31 Thread Scott Marlowe
On Fri, Oct 31, 2008 at 9:36 AM, Chris Butler [EMAIL PROTECTED] wrote: I've been having intermittent problems with our DB server (running postgresql 8.3.3) reaching its connection limit, all because of a SELECT statement that's stuck while sending data. This gets stuck because there's a

Re: [GENERAL] Decreasing WAL size effects

2008-10-31 Thread Aidan Van Dyk
* Greg Smith [EMAIL PROTECTED] [081001 00:00]: The overhead of clearing out the whole thing is just large enough that it can be disruptive on systems generating lots of WAL traffic, so you don't want the main database processes bothering with that. A related fact is that there is a

Re: [GENERAL] Decreasing WAL size effects

2008-10-31 Thread Aidan Van Dyk
* Aidan Van Dyk [EMAIL PROTECTED] [081031 15:11]: Archiving 00010012 Archiving 00010013 Archiving 00010014 Archiving 00010017 Archiving 00010018 Archiving

Re: [GENERAL] harddisk configuration

2008-10-31 Thread Joseph S
Goboxe wrote: Hi, I just receive a new server with 5 x 73GB SAS harddisk. I tried to maximize the total usable space when configure using RAID 5. What I plan to do to configure all the 5 harddisks using RAID 5. Windows operating system also will be installed the same RAID 5 ( I going to have

Re: [GENERAL] How to know the password for the user 'postgres'

2008-10-31 Thread Stephane Bortzmeyer
On Tue, Oct 28, 2008 at 07:13:38AM -0700, Tim Bruce - Postgres [EMAIL PROTECTED] wrote a message of 41 lines which said: Wouldn't it be better to add the line 'sudo su - postgres' as the entry (command) for the user(s) in the sudoers file? Simpler, set the runas parameter: jsmith

[GENERAL] Wildly erratic query performance

2008-10-31 Thread Eric Schwarzenbach
I've got a particular query that is giving me ridiculously erratic query performance. I have the SQL in a pgadmin query window, and from one execution to another, with no changes, the time it takes varies from half a second to, well, at least 10 minutes or so at which point I give up an cancel the

Re: [GENERAL] Wildly erratic query performance

2008-10-31 Thread Dann Corbit
-Original Message- From: [EMAIL PROTECTED] [mailto:pgsql-general- [EMAIL PROTECTED] On Behalf Of Eric Schwarzenbach Sent: Friday, October 31, 2008 12:35 PM To: pgsql-general@postgresql.org Subject: [GENERAL] Wildly erratic query performance I've got a particular query that is

[GENERAL] Need Help for a query

2008-10-31 Thread aravind chandu
Hello,     I am using this pqxx library for postgresql to run programs.The following is the query which i gave to store the data,here data.speed,data.heading are float values and data.ttime is timestamp .If i try to run this statement I end up with an error below this query.Please help

Re: [GENERAL] Are there plans to add data compression feature to postgresql?

2008-10-31 Thread Chris Browne
[EMAIL PROTECTED] (Scott Marlowe) writes: I assume hardware failure rates are zero, until there is one. Then I restore from a known good backup. compressed file systems have little to do with that. There's a way that compressed filesystems might *help* with a risk factor, here... By

Re: [GENERAL] Decreasing WAL size effects

2008-10-31 Thread Aidan Van Dyk
* Aidan Van Dyk [EMAIL PROTECTED] [081031 15:11]: How about something like the attached. It's been spun quickly, passed regression tests, and some simple hand tests on REL8_3_STABLE. It seem slike HEAD can't initdb on my machine (quad opteron with SW raid1), I tried a few revision in the

[GENERAL] GEQO randomness?

2008-10-31 Thread Eric Schwarzenbach
This is in a sense a followup to my post with subject Wildly erratic query performance. The more I think about it the only thing that makes sense of my results is if the query planner really WAS choosing my join order truly randomly each time. I went digging into the manual and Section 49.3.1.

Re: [GENERAL] Wildly erratic query performance

2008-10-31 Thread Scott Marlowe
On Fri, Oct 31, 2008 at 1:34 PM, Eric Schwarzenbach [EMAIL PROTECTED] wrote: I've got a particular query that is giving me ridiculously erratic query performance. I have the SQL in a pgadmin query window, and from one execution to another, with no changes, the time it takes varies from SNIP

Re: [GENERAL] harddisk configuration

2008-10-31 Thread Scott Marlowe
On Fri, Oct 31, 2008 at 1:21 PM, Joseph S [EMAIL PROTECTED] wrote: Goboxe wrote: Hi, I just receive a new server with 5 x 73GB SAS harddisk. I tried to maximize the total usable space when configure using RAID 5. What I plan to do to configure all the 5 harddisks using RAID 5. Windows

Re: [GENERAL] Bad behaviour in Sun Cluster

2008-10-31 Thread Scott Marlowe
On Fri, Oct 31, 2008 at 7:17 AM, Patricio Mora [EMAIL PROTECTED] wrote: Scott Marlowe escribió: On Fri, Oct 31, 2008 at 5:00 AM, Patricio Mora [EMAIL PROTECTED] wrote: - postmaster (PostgreSQL) 7.4.5 (Update unviable due to application) And this prevents you from updating to 7.4.22?

Re: [GENERAL] Wildly erratic query performance

2008-10-31 Thread Tom Lane
Scott Marlowe [EMAIL PROTECTED] writes: On Fri, Oct 31, 2008 at 1:34 PM, Eric Schwarzenbach [EMAIL PROTECTED] wrote: This is postgreslq 8.3, on Windows XP. The query joins about 17 tables (without an explicit JOIN, just using the WHERE criteria) with a few OK, whether you use join syntax or

Re: [GENERAL] Need Help for a query

2008-10-31 Thread Tom Lane
aravind chandu [EMAIL PROTECTED] writes:     I am using this pqxx library for postgresql to run programs.The following is the query which i gave to store the data,here data.speed,data.heading are float values and data.ttime is timestamp .If i try to run this statement I end up with an

Re: [GENERAL] Are there plans to add data compression feature to postgresql?

2008-10-31 Thread Ivan Sergio Borgonovo
On Fri, 31 Oct 2008 17:08:52 + Gregory Stark [EMAIL PROTECTED] wrote: Invisible under normal operation sure, but when something fails the consequences will surely be different and I can't see how you could make a compressed filesystem safe without a huge performance hit. Pardon my

Re: [GENERAL] GEQO randomness?

2008-10-31 Thread Tom Lane
Eric Schwarzenbach [EMAIL PROTECTED] writes: Now ordinarily I would interpret this use of the word random loosely, to mean arbitrarily or using some non-meaningful selection criteria. But given what I am seeing, this leads me to consider that random is meant literally, and that it actually

Re: [GENERAL] Are there plans to add data compression feature to postgresql?

2008-10-31 Thread Bruce Momjian
Scott Marlowe wrote: On Thu, Oct 30, 2008 at 4:01 PM, Gregory Stark [EMAIL PROTECTED] wrote: Scott Marlowe [EMAIL PROTECTED] writes: I'm sure this makes for a nice brochure or power point presentation, but in the real world I can't imagine putting that much effort into it when

Re: [GENERAL] Wildly erratic query performance

2008-10-31 Thread Dennis Brakhane
On Fri, Oct 31, 2008 at 04:36:02PM -0400, Eric Schwarzenbach wrote: As I explained already (no pun intended) running the query using EXPLAIN makes the wild variation go away. So I cannot get explain results for a fast and for a slow execution. EXPLAIN only determines and outputs the query

Re: [GENERAL] Are there plans to add data compression feature to postgresql?

2008-10-31 Thread Ron Mayer
Chris Browne wrote: There's a way that compressed filesystems might *help* with a risk factor, here... By reducing the number of disk drives required to hold the data, you may be reducing the risk of enough of them failing to invalidate the RAID array. And one more way. If neither your

[Fwd: Re: [GENERAL] GEQO randomness?]

2008-10-31 Thread Eric Schwarzenbach
My problem with GEQO using a random number generator is that non-deterministic behavior is really hard to debug, and problems can go undiagnosed for ages. Frankly I would rather something fail all the time, than it work most of the time and fail just now and then. Never getting a good plan for a

Re: [GENERAL] Wildly erratic query performance

2008-10-31 Thread Eric Schwarzenbach
Dann, Thanks for your response. I thought I'd covered most of what your are asking in my first message, but these results are weird enough that I can understand you might not give me the benefit of the doubt and without very explicit confirmation. To answer your questions: YES the query each