Re: [GENERAL] Cause of ERROR: could not open relation

2006-10-01 Thread Tom Lane
"Wyatt Tellis" <[EMAIL PROTECTED]> writes: >> I'm running 8.1.4 on W2K3 R2. I occasionally get errors of the type: >> ERROR: could not open relation 1663/856689/856777: Invalid argument > Is there a command or way to determine if an index is corrupt? Is there > anyway to discern this info from th

Re: [GENERAL] Cause of ERROR: could not open relation

2006-10-01 Thread Wyatt Tellis
Greg, Thanks for the pointers. I couldn't find a reference on the pg-admin list to this exact error but I've read up a bit on the REINDEX command. Is there a command or way to determine if an index is corrupt? Is there anyway to discern this info from the error message itself (i.e. are the nu

[GENERAL] ISO week dates

2006-10-01 Thread Brendan Jurd
Hey guys,I have a question regarding the ISO 8601 week date format.  Outputting dates in this format seems to be partially supported, and rather inconsistent.  The documentation for to_char() lists 'IYYY' (ISO year) and 'IW' (ISO week) as format patterns, but there is no "ISO day of week" format pa

Re: [GENERAL] Normal vs Surrogate Primary Keys...

2006-10-01 Thread Stephan Szabo
On Sun, 1 Oct 2006, rlee0001 wrote: > I know, for example, that by default PostgreSQL assigns every record a > small unique identifier called an OID. It seems reasonable then, that > when the DBA creates a cascading foreign key to a record, that the DBMS > could, instead of storing the record's en

Re: [GENERAL] Major Performance decrease after some hours

2006-10-01 Thread Tom Lane
"Peter Bauer" <[EMAIL PROTECTED]> writes: > Attached you can find the postgresql logfiles and a logfile which > contains alls SQL statements executed in the relevant time together > with the excpetions thrown. I also attached a file with all used > Pl/pgSQL functions. Since we were not able to find

Re: [GENERAL] Normal vs Surrogate Primary Keys...

2006-10-01 Thread Tom Lane
"rlee0001" <[EMAIL PROTECTED]> writes: > ... I know, for example, that by default PostgreSQL assigns every record a > small unique identifier called an OID. Well, actually, that hasn't been the default for some time, and even if you turn it on it's not guaranteed unique without additional steps, a

[GENERAL] Normal vs Surrogate Primary Keys...

2006-10-01 Thread rlee0001
I know this is an old topic and also a religious one so I won't get into the debate, but I thought up one possible solution that would make almost everybody happy and was wondering if any PostgreSQL hackers out there had any thoughts. I was wondering if, considering that an entity can only have a

Re: [GENERAL] String handling function, substring vs. substr

2006-10-01 Thread Tom Lane
brian <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] wrote: >> Does this mean that substr calls substring internally?? Or is it the >> other way around?? Or are they independent of each other?? > Looks like they're pretty evenly matched. Actually, a bit of poking into the contents of pg_proc wi

Re: [GENERAL] String handling function, substring vs. substr

2006-10-01 Thread brian
[EMAIL PROTECTED] wrote: Hi all, I want to call one of the two functions above many times (in an aggregate function) and it says in the manual pages that substr is the same as substring. Does this mean that substr calls substring internally?? Or is it the other way around?? Or are they ind

[GENERAL] String handling function, substring vs. substr

2006-10-01 Thread arsi
Hi all, I want to call one of the two functions above many times (in an aggregate function) and it says in the manual pages that substr is the same as substring. Does this mean that substr calls substring internally?? Or is it the other way around?? Or are they independent of each other??

[GENERAL] GiST and Gin technical doc

2006-10-01 Thread Yannick Warnier
Hi there, I'm having trouble finding technical documentation about GiST, Gin and TSearch2. I am particularly interested in the internal data structure of a GiST-ed or Gin-ed index, and the availability of searches by proximity. Does anyone know of a good place to find such doc, outside from the

Re: [GENERAL] memory issues when running with mod_perl

2006-10-01 Thread Jorge Godoy
Andreas Rieke <[EMAIL PROTECTED]> writes: > It's 2.6.13-15. Thus, if we have a kernel bug, the newest known leaky > version is 2.6.13-15, whereas the oldest fixed version should be 2.6.16.27. I have a few servers with 2.6.16.21 and I don't see the problem as well. -- Jorge Godoy <[EMAIL

Re: [GENERAL] Major Performance decrease after some hours

2006-10-01 Thread Peter Bauer
2006/10/1, Matthew T. O'Connor : MaXX wrote: >> There are 10-15 postmaster processes running which use all the CPU >> power. >> A restart of tomcat and then postgresql results in the same situation. >> Some postgres processes are in DELETE waiting or SELECT waiting. >> VACUUM runs through in just

Re: [GENERAL] Major Performance decrease after some hours

2006-10-01 Thread Peter Bauer
2006/10/1, MaXX <[EMAIL PROTECTED]>: Peter Bauer wrote: > 2006/10/1, MaXX <[EMAIL PROTECTED]>: >> Peter Bauer wrote: >> [...] >> > There are 10-15 postmaster processes running which use all the CPU >> power. >> > A restart of tomcat and then postgresql results in the same situation. >> > Some pos

Re: [GENERAL] memory issues when running with mod_perl

2006-10-01 Thread Andreas Rieke
Fred, > > What is your kernel version? It's 2.6.13-15. Thus, if we have a kernel bug, the newest known leaky version is 2.6.13-15, whereas the oldest fixed version should be 2.6.16.27. As many people run pg on older kernel versions, I would expect many others having memory problems in that case.

Re: [GENERAL] memory issues when running with mod_perl

2006-10-01 Thread Tom Lane
"Fred Tyler" <[EMAIL PROTECTED]> writes: >>> R2: After having a look at the linux kernel mailing list, it seems that >>> this problem is not yet known there. > It is possible that it has already been fixed. I am seeing this memory > leak quite clearly on 2.6.12.6, but there's no evidence of it at

Re: [GENERAL] memory issues when running with mod_perl

2006-10-01 Thread Fred Tyler
OK, that kills the theory that the leak is triggered by subprocess exit. Another thing that would be worth trying is to just stop and start the postmaster a large number of times, to see if the leak occurs at postmaster exit. It is not from the exit. I see the exact same problem and I never rest

Re: [GENERAL] Major Performance decrease after some hours

2006-10-01 Thread Tom Lane
"Peter Bauer" <[EMAIL PROTECTED]> writes: > yes, there are about 10 postmaster processes in top which eat up all > of the CPU cycles at equal parts. What are these processes doing exactly --- can you show us the queries they're executing? It might be worth attaching to a few of them with gdb to g

Re: [GENERAL] memory issues when running with mod_perl

2006-10-01 Thread Fred Tyler
> Tonight I am going to upgrade postgres on the first machine and see if > it makes any difference, but it'll be about a week before I know for > sure if memory is still being lost (it's such a slow leak that you > cannot tell with just a couple days). I use the latest 8.1.4 postgres software on

Re: [GENERAL] memory issues when running with mod_perl

2006-10-01 Thread Tom Lane
Andreas Rieke <[EMAIL PROTECTED]> writes: > R1: First of all, I tried the loop from your older OS X problem: > while true > do > psql -c "select count(*) from tenk1" regression > done > Even after running the psql command for more than a million times over > quite a small table

Re: [GENERAL] memory issues when running with mod_perl

2006-10-01 Thread Andreas Rieke
Fred, Fred Tyler wrote: > Tonight I am going to upgrade postgres on the first machine and see if > it makes any difference, but it'll be about a week before I know for > sure if memory is still being lost (it's such a slow leak that you > cannot tell with just a couple days). I use the latest 8.

Re: [GENERAL] memory issues when running with mod_perl

2006-10-01 Thread Fred Tyler
However, my machine looses between 500 M and 800 M in two weeks, and within that time, I restart pg only very few times, say 3-4 times. Does pg allocate other shmem blocks? If there is really a kernel memory problem in shmem, how can I loose so much memory? This is the same thing I am seeing --

Re: [GENERAL] memory issues when running with mod_perl

2006-10-01 Thread Andreas Rieke
Tom, thanks for all the facts first. Tom Lane wrote: >If the shared segment is no longer present according to ipcs, >and there are no postgres processes still running, then it's >simply not possible for it to be postgres' fault if memory has >not been reclaimed. So you're looking at a kernel bu

Re: [GENERAL] Major Performance decrease after some hours

2006-10-01 Thread Matthew T. O'Connor
MaXX wrote: There are 10-15 postmaster processes running which use all the CPU power. A restart of tomcat and then postgresql results in the same situation. Some postgres processes are in DELETE waiting or SELECT waiting. VACUUM runs through in just about 1-2 seconds and is run via cron every mi

Re: [GENERAL] Major Performance decrease after some hours

2006-10-01 Thread Peter Bauer
2006/10/1, Chris Mair <[EMAIL PROTECTED]>: Hi, a few random question... > > i have a Tomcat application with PostgreSQL 8.1.4 running which > > performs about 1 inserts/deletes every 2-4 minutes and updates on > > a database and after some hours of loadtesting the top output says > > 0.0% i

Re: [GENERAL] strange sql issue

2006-10-01 Thread Andreas Seltenreich
Thomas Peter writes: > the following sql stopped working with postgres, and the fix of this > problem seems strange to me. [...] > and the fix was, to twist the order in the FROM statement. > changing > FROM ticket as t, permission as perm, enum as p > to > FROM permission as perm, enum as p, tick

Re: [GENERAL] Major Performance decrease after some hours

2006-10-01 Thread MaXX
Peter Bauer wrote: [...] There are 10-15 postmaster processes running which use all the CPU power. A restart of tomcat and then postgresql results in the same situation. Some postgres processes are in DELETE waiting or SELECT waiting. VACUUM runs through in just about 1-2 seconds and is run via c

Re: [GENERAL] Major Performance decrease after some hours

2006-10-01 Thread Chris Mair
Hi, a few random question... > > i have a Tomcat application with PostgreSQL 8.1.4 running which > > performs about 1 inserts/deletes every 2-4 minutes and updates on > > a database and after some hours of loadtesting the top output says > > 0.0% idle, 6-7% system load, load average 32, 31, 2

Re: [GENERAL] Major Performance decrease after some hours

2006-10-01 Thread Peter Bauer
2006/10/1, Peter Bauer <[EMAIL PROTECTED]>: Hi all, i have a Tomcat application with PostgreSQL 8.1.4 running which performs about 1 inserts/deletes every 2-4 minutes and updates on a database and after some hours of loadtesting the top output says 0.0% idle, 6-7% system load, load average 3

[GENERAL] create table foo( ... ..., _date date default current_date, ... ... );

2006-10-01 Thread louis gonzales
Group, I want to set the default value of a date attribute _date to CURRENT_DATE. CURRENT_DATE gives a format-MM-DD my table is something similar to: create table foo( ... ..., _date date default current_date, ... ...); Now, everytime a new entry is inserted, is it going to get the C