Re: [GENERAL] Question about hosting and server grade

2009-03-26 Thread Ivan Sergio Borgonovo
On Wed, 25 Mar 2009 13:19:12 -0600 Scott Marlowe scott.marl...@gmail.com wrote: Spend your money on more RAM, (32G isn't much more than 16G and I've seen it make a world of difference on our servers). Spend it on disks. Number of disks is often more important than RPM etc. Spend it on fast

[GENERAL] HINT: Please REINDEX it?

2009-03-26 Thread Bjørn T Johansen
I am seeing this in my log...: ERROR: index connect_idx contains unexpected zero page at block 208 HINT: Please REINDEX it. What does this mean? And how do I reindex it? Regards, BTJ -- --- Bjørn

Re: [GENERAL] [ADMIN] Can we load all database objects in memory?

2009-03-26 Thread Albe Laurenz
Iñigo Martinez Lasala wrote: Hi All, I have a database of 10GB. My Database Server has a RAM of 16GB Is there a way that I can load all the database objects to memory? Thanks for your time and taking a look at this question. Thanks Deepak Increase effective_cache_size parameter.

Re: [GENERAL] Weird encoding behavior

2009-03-26 Thread Albe Laurenz
Leonardo M. Ramé wrote: Hi, I'm experiencing a weird behavior when storing latin characters to a PostgreSQL 8.3.1.876 server. The database is Latin1 encoded, and it is working since September 2008, it wasn't updated nor replaced since its first installation. The weirdness of the problem

Re: [GENERAL] intermittant performance problem

2009-03-26 Thread Alban Hertroys
On Mar 25, 2009, at 5:09 PM, Mike Charnoky wrote: Due to the nature of the sampling (need to limit using several parameters with a WHERE clause), I can't just generate random numbers to select data that I need. Looks like I am stuck using ORDER BY RANDOM(). The only other option at this

[GENERAL] How to compile a 32 bit version of postgres on a x64 machine.

2009-03-26 Thread Tim Uckun
It looks like most avenues for high availability with postgres are not available if one of the machines is a 64 bit machine and the other a 32. Somebody on this list suggested I install a 32 bit version of postgres on my x64 machine. What's the best way to handle this? Should I compile it fresh?

[GENERAL] idle connection timeout

2009-03-26 Thread Grzegorz Jaśkiewicz
hey folks, is there any potential idle connection timeout on server side ? I got a C++ client here, using pqxx, that waits with CLOSE_WAIT, which would potentially mean that back end called close() on connection, if there's such idle timeout, how long is it set to by default, and can it be set by

Re: [GENERAL] Weird encoding behavior

2009-03-26 Thread Leonardo M. Ramé
Well, there *must* be one client that stores wrong data... You are right, I'll ask someone in site to look at *each* client hunting for the root of the problem. It must be a Windows Regional Settings or something similar. As a first step, can you find out the code point of the character

Re: [GENERAL] idle connection timeout

2009-03-26 Thread Tom Lane
=?UTF-8?Q?Grzegorz_Ja=C5=9Bkiewicz?= gryz...@gmail.com writes: is there any potential idle connection timeout on server side ? No. You might be getting bit by an idle timeout somewhere else, such as in a NAT router between the client and server. regards, tom lane --

Re: [GENERAL] Parallel Query Processing

2009-03-26 Thread Cory Coager
You could run parallel queries across multiple servers using pgpool-II. ~Cory Coager aravind chandu said the following on 03/25/2009 04:24 PM: Hello, I have a few questions related to the parallel query processing.Can you guys tell me how to implement parallel query processing

Re: [GENERAL] log shipping from 64 bit linux server to a 32 bit linux server

2009-03-26 Thread Chander Ganesan
Tatsuo Ishii wrote: I know what you think:-) Problem is, he asks high availabilty, that means, no SPOF, minimum down time. For the purpose, I suppose pgpool-HA(actually heartbeat)+pgpool-II+Slony-I might work, but I'm not sure heartbeat does work with 32/64bit combo. Heartbeat does work

Re: [GENERAL] idle connection timeout

2009-03-26 Thread Grzegorz Jaśkiewicz
2009/3/26 Tom Lane t...@sss.pgh.pa.us: You might be getting bit by an idle timeout somewhere else, such as in a NAT router between the client and server. ok, thanks tom. -- GJ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] Weird encoding behavior

2009-03-26 Thread Alvaro Herrera
Leonardo M. Ramé wrote: Hi, I'm experiencing a weird behavior when storing latin characters to a PostgreSQL 8.3.1.876 server. The database is Latin1 encoded, and it is working since September 2008, it wasn't updated nor replaced since its first installation. The weirdness of the

[GENERAL] ltree and full text search questions

2009-03-26 Thread Marc Mamin
Hello, (sorry for this long mail) I have started to evaluate ltree and tsearch (first on Windows with PG Version 8.3.7) and I would apprecicate some clarification. The first part deals with ltree where I have some questions, and the second part is a concept to combine ltree with the full text

Re: [GENERAL] Weird encoding behavior

2009-03-26 Thread Albe Laurenz
Leonardo M. Ramé wrote: As a first step, can you find out the code point of the character that is represented as ? in your E-Mail? Something like SELECT ascii(substr('NU?EZ', 3, 1)); except that instead of the string literal you substitute the column containing the bad value. I did

Re: [GENERAL] Question about hosting and server grade

2009-03-26 Thread Sam Mason
On Thu, Mar 26, 2009 at 09:06:03AM +0100, Ivan Sergio Borgonovo wrote: Could IO load show up as apparent CPU load? I may not be interpreting you correctly; but, as I understand it, if your IO subsystem is too slow then your CPUs are going to be idling. So if your CPUs are sitting at 100%

Re: [GENERAL] log shipping from 64 bit linux server to a 32 bit linux server

2009-03-26 Thread Sam Mason
On Thu, Mar 26, 2009 at 02:08:33PM +1300, Tim Uckun wrote: On Thu, Mar 26, 2009 at 2:05 PM, Tatsuo Ishii is...@postgresql.org wrote: According to the documentation it's not possible to log ship from a 64 bit server to a 32 bit server. I think the doc is quite correct. So what is

Re: [GENERAL] HINT: Please REINDEX it?

2009-03-26 Thread Sam Mason
On Thu, Mar 26, 2009 at 09:00:53AM +0100, Bjørn T Johansen wrote: ERROR: index connect_idx contains unexpected zero page at block 208 HINT: Please REINDEX it. What does this mean? It means something bad has happened to an index. If you're running an old version of PG then you may be

Re: [GENERAL] Weird encoding behavior

2009-03-26 Thread Tom Lane
Albe Laurenz laurenz.a...@wien.gv.at writes: Leonardo M. Ramé wrote: I did what you suggested, and it responds with a 63 when the string is NU?NEZ and 209 when it's NUÑEZ. 63 is indeed a question mark. Since such a conversion would not be done by PostgreSQL, something else must convert Ñ to

Re: [GENERAL] Question about hosting and server grade

2009-03-26 Thread Alan Hodgson
On Thursday 26 March 2009, Ivan Sergio Borgonovo m...@webthatworks.it wrote: Could IO load show up as apparent CPU load? It would show up as CPU busy in iowait state. If the CPU is actually busy it would show mostly in user state, some in system. -- Even a sixth-grader can figure out that

Re: [GENERAL] Parallel Query Processing

2009-03-26 Thread Simon Riggs
On Wed, 2009-03-25 at 15:52 -0600, Scott Marlowe wrote: On Wed, Mar 25, 2009 at 2:24 PM, aravind chandu avin_frie...@yahoo.com wrote: Hello, I have a few questions related to the parallel query processing.Can you guys tell me how to implement parallel query processing in

Re: [GENERAL] Parallel Query Processing

2009-03-26 Thread David Fetter
On Thu, Mar 26, 2009 at 05:04:29PM +, Simon Riggs wrote: On Wed, 2009-03-25 at 15:52 -0600, Scott Marlowe wrote: On Wed, Mar 25, 2009 at 2:24 PM, aravind chandu avin_frie...@yahoo.com wrote: Hello, I have a few questions related to the parallel query processing.Can you guys

Re: [GENERAL] Parallel Query Processing

2009-03-26 Thread Simon Riggs
On Thu, 2009-03-26 at 10:12 -0700, David Fetter wrote: On Thu, Mar 26, 2009 at 05:04:29PM +, Simon Riggs wrote: On Wed, 2009-03-25 at 15:52 -0600, Scott Marlowe wrote: On Wed, Mar 25, 2009 at 2:24 PM, aravind chandu avin_frie...@yahoo.com wrote: Hello, I have a few

[GENERAL] commit performance anomaly

2009-03-26 Thread Ed L.
I've been tracking the performance of our DB query statements across a number of fairly high-volume pg clusters for several years (combined 2700 tps, ~1.3TB). Last year, we started migrating off HP-UX IA64 servers running pg 8.1.x onto Linux quadcore x86_64 Blade servers running pg 8.3.x

Re: [GENERAL] commit performance anomaly

2009-03-26 Thread Greg Smith
On Thu, 26 Mar 2009, Ed L. wrote: But I'm curious why 'commit' statements (as well as certain update statements) seem to have actually degraded (1ms vs 5ms on avg, 2ms vs 14ms in the 95th percentile, etc). When you commit something, it writes information to the write-ahead log (WAL) and

Re: [GENERAL] HINT: Please REINDEX it?

2009-03-26 Thread Bjørn T Johansen
On Thu, 26 Mar 2009 15:32:46 + Sam Mason s...@samason.me.uk wrote: On Thu, Mar 26, 2009 at 09:00:53AM +0100, Bjørn T Johansen wrote: ERROR: index connect_idx contains unexpected zero page at block 208 HINT: Please REINDEX it. What does this mean? It means something bad has

Re: [GENERAL] log shipping from 64 bit linux server to a 32 bit linux server

2009-03-26 Thread Tim Uckun
What about running a 32bit build of PG on the 64bit machine? How would one go about doing something like this?

Re: [GENERAL] log shipping from 64 bit linux server to a 32 bit linux server

2009-03-26 Thread Scott Marlowe
On Thu, Mar 26, 2009 at 3:32 PM, Tim Uckun timuc...@gmail.com wrote: What about running a 32bit build of PG on the 64bit machine? How would one go about doing something like this? Compiling with the proper -march flags I believe. It's been like 5 years since I had to mess with such

Re: [GENERAL] how to specify the locale that psql uses

2009-03-26 Thread Dhaval Jaiswal
When you install postgreSQL over XP at the same time it asks for encoding locale. Set at the same time. Follow the below link will give you more idea. http://www.postgresql.org/docs/7.2/static/multibyte.html If you want to change the locale of existing database. You can't.. The

[GENERAL] Enumerating a row set

2009-03-26 Thread George Sakkis
Hi all, Is there a function similiar to Python's enumerate() [1] ? Searching the docs didn't reveal any relevant builtin but I hope it's doable in pgsql. Ideally I'd like a function that can be used as: SELECT e.i, e.col1, e.col2 FROM enumerate(some_table, 'i') e LIMIT 10 i col1 col2

Re: [GENERAL] how to avoid that a postgres session eats up all the memory

2009-03-26 Thread Dhaval Jaiswal
Generally out of memory error persist when the memory is not enough to handle the query. When query executed without using standard plan it consum lots of memory. If shared buffer is not enough to handle this query it thrown error like out of memory. It if good practice to do explain query 

Re: [GENERAL] Enumerating a row set

2009-03-26 Thread Steve Atkins
On Mar 26, 2009, at 3:42 PM, George Sakkis wrote: Hi all, Is there a function similiar to Python's enumerate() [1] ? Searching the docs didn't reveal any relevant builtin but I hope it's doable in pgsql. Ideally I'd like a function that can be used as: SELECT e.i, e.col1, e.col2 FROM

Re: [GENERAL] Is there a meaningful benchmark?

2009-03-26 Thread Scott Marlowe
On Fri, Mar 20, 2009 at 9:27 AM, Scott Ribe scott_r...@killerbytes.com wrote: That's why I was looking for a more balanced benchmark that exercises said capabilities. OK, here's the thing, I will give you *one* sample issue to think about, as an illustration of the kinds of differences there

Re: [GENERAL] how to specify the locale that psql uses

2009-03-26 Thread Shoaib Mir
On Fri, Mar 27, 2009 at 9:35 AM, Dhaval Jaiswal bablu_postg...@yahoo.comwrote: When you install postgreSQL over XP at the same time it asks for encoding locale. Set at the same time. Follow the below link will give you more idea. http://www.postgresql.org/docs/7.2/static/multibyte.html

Re: [GENERAL] Is there a meaningful benchmark?

2009-03-26 Thread Raymond O'Donnell
On 26/03/2009 23:10, Scott Marlowe wrote: It's also important to point out that writers don't necessarily block other writers. As long as they're operating on different ranges of the data set. You can have dozens of writers streaming data in with differening primary keys all running

Re: [GENERAL] difference between current_timestamp and now() in quotes

2009-03-26 Thread Dhaval Jaiswal
current_timestamp is the reserved keyword of postgreSQL. When you executes it within single quotation mark it treated as string that is the only reason it thrown error. Now() is an in-built function you can use it with/without single quotation mark. For more information refere the below

Re: [GENERAL] Is there a meaningful benchmark?

2009-03-26 Thread Scott Marlowe
On Thu, Mar 26, 2009 at 5:23 PM, Raymond O'Donnell r...@iol.ie wrote: On 26/03/2009 23:10, Scott Marlowe wrote: It's also important to point out that writers don't necessarily block other writers.  As long as they're operating on different ranges of the data set.  You can have dozens of

[GENERAL] Best way to store a threaded message list/tree in SQL

2009-03-26 Thread Mike Christensen
Hi guys - I'm looking for the best way to store a set of posts as well as comments on those posts in SQL. Imagine a design similar to a Wall on Facebook where users can write posts on their wall and other users can comment on those posts. I need to be able to display all wall posts as well

Re: [GENERAL] Enumerating a row set

2009-03-26 Thread David Fetter
On Thu, Mar 26, 2009 at 06:42:45PM -0400, George Sakkis wrote: Hi all, Is there a function similiar to Python's enumerate() [1] ? Searching the docs didn't reveal any relevant builtin but I hope it's doable in pgsql. Ideally I'd like a function that can be used as: SELECT e.i, e.col1,

Re: [GENERAL] Enumerating a row set

2009-03-26 Thread Guy Rouillier
On Thu, Mar 26, 2009 at 06:42:45PM -0400, George Sakkis wrote: Hi all, Is there a function similiar to Python's enumerate() [1] ? Searching the docs didn't reveal any relevant builtin but I hope it's doable in pgsql. I found this via Google:

Re: [GENERAL] Best way to store a threaded message list/tree in SQL

2009-03-26 Thread Johan Nel
Mike, connectby() is your friend here. Do a search on tablefunc in the help file. CREATE Table wallposts ( id uuid NOT NULL, posted timestamp NOT NULL, userid uuid NOT NULL, posterid uuid NOT NULL, parentid uuid NOT NULL, comment text NOT NULL ) SELECT * FROM connectby('wallposts', 'id',