[GENERAL] Preformace boost -- by 8.0.4 upgrade to 8.1.4

2006-06-26 Thread Richard Broersma Jr
Hello list, I am happy to report that I am seeing a 150% average increase in select performance since I upgraded to 8.1.4. Version PostgreSQL 8.1.4 on i686-pc-linux-gnu, compiled by GCC i686-pc-linux-gnu-gcc (GCC) 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9) Not to mention, the u

Re: [GENERAL] auto-vacuum & Negative "anl" Values

2006-06-26 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > + /* last_anl_tuples must never exceed n_live_tuples */ If we actually believe the above statement, it seems like your patch to pgstat_recv_tabstat() opens a new issue: with that patch, it is possible for pgstat_recv_tabstat() to decrease n_

[GENERAL] FKs Lock Contention

2006-06-26 Thread Bruno Almeida do Lago
Hello, I need some help to understand better the way PostgreSQL works internally: Oracle 8.1.7 used to have a severe lock contention when FKs had no index (causing an sx table lock). AFAIK this was "fixed" on 9i with the addition of "shared row locking". Reading the docs I found that PostgreSQL

Re: [GENERAL] auto-vacuum & Negative "anl" Values

2006-06-26 Thread Alvaro Herrera
Dylan Hansen wrote: > So can I assume that this is a bug? Definitively a bug. > The only resolution I can see right now is to setup a cron job that > will perform an ANALYZE periodically, as the pg_autovacuum ANALYZE > threshold is never reached. > > Any other suggestions? Thanks for the in

Re: [GENERAL] inheritance and table

2006-06-26 Thread arie nugraha
Inheritance in postgre means you will have same fields definition like the inherited table plus its own fields. So if table B is inherit table A, table B will have same field definition like A plus table B own unique field(s). It wont share primary keys, table B just have primary key in th

Re: [GENERAL] inheritance and table

2006-06-26 Thread Erik Jones
nik600 wrote: hi i don't have understand how works inheritance of tables... if table B inherits from table A - A and B must share primary keys? - if i isert record in B the record is replaced in A ? can i avoid this? i would like to have this scenario: table A table B inheridts from A tab

Re: [GENERAL] RAID + PostgreSQL?

2006-06-26 Thread Alex Turner
Compaq RAID controllers are known to be slow under linux.Alex.On 6/26/06, Tony Caduto <[EMAIL PROTECTED] > wrote:Scott Marlowe wrote:> On Mon, 2006-06-26 at 08:59, Tony Caduto wrote: >>> MG wrote:> Hello,>> we are using PostgreSQL 8.0.3 together with RAID on OpenServer 6.>> When we do a

Re: [GENERAL] Return the primary key of a newly inserted row?

2006-06-26 Thread John Tregea
Hi all, Thanks for the continued suggestions on this question. I will reply again once it is implemented and working. Kind regards John Alban Hertroys wrote: Scott Ribe wrote: You won't have duplicates[1], it's a sequence. It's its purpose. Now I may have missed something, I didn't follow

Re: [GENERAL] list or regular expressions

2006-06-26 Thread Mischa Sandberg
Rhys Stewart wrote: Hi all, can i search in a list or regular expressioneg "select yadi from ya where yadiya in ('old', 'ulk', 'orb')" but instead of in ther'd be another operator or a LIKE IN. so it'd be a shorcut for typing yadiya ~* 'old' or yadiya ~* 'ulk' etc.

Re: [GENERAL] RAID + PostgreSQL?

2006-06-26 Thread Scott Marlowe
On Mon, 2006-06-26 at 12:10, Guy Fraser wrote: > On Mon, 2006-26-06 at 11:08 -0500, Scott Marlowe wrote: > > On Mon, 2006-06-26 at 08:59, Tony Caduto wro > > > > I have to say this has NOT been my experience. With a pair of U320 > > drives on an LSI-Megaraid with battery backed cache (256M or 512

Re: [GENERAL] inheritance and table

2006-06-26 Thread Richard Broersma Jr
> i don't have understand how works inheritance of tables... > if table B inherits from table A > - A and B must share primary keys? No, currently there is no unique constraint that will force uniqueness across parent/child/sibling tables. Just think of them as being nothing more than seperate

Re: [GENERAL] limit over attribute size if index over it exists

2006-06-26 Thread Tom Lane
"pajai" <[EMAIL PROTECTED]> writes: > I have got an issue with PostgreSQL. There is a limitation on the > column length of a tuple, in case there is an index over it. In the > actual project I am working on, I meet such a situation. I have got an > attribute over which I am doing a search (that is,

Re: [GENERAL] list or regular expressions

2006-06-26 Thread Tom Lane
"Rhys Stewart" <[EMAIL PROTECTED]> writes: > can i search in a list or regular expressioneg > "select yadi from ya where yadiya in ('old', 'ulk', 'orb')" > but instead of in ther'd be another operator or a LIKE IN. You could use " ANY" --- "IN" is just a shorthand for "= ANY". I don't think

[GENERAL] list or regular expressions

2006-06-26 Thread Rhys Stewart
Hi all, can i search in a list or regular expressioneg "select yadi from ya where yadiya in ('old', 'ulk', 'orb')" but instead of in ther'd be another operator or a LIKE IN. so it'd be a shorcut for typing yadiya ~* 'old' or yadiya ~* 'ulk' etc. ---(end of broadcast)

Re: [GENERAL] limit over attribute size if index over it exists

2006-06-26 Thread Martijn van Oosterhout
On Mon, Jun 26, 2006 at 02:52:56AM -0700, pajai wrote: > I have thought of a possible workaround. I would like to know if it > seems reasonable. The idea would be to build a hash, on the client > side, over the problematic column (let's say column a). I then store in > the db the attribute a (witho

Re: [GENERAL] RAID + PostgreSQL?

2006-06-26 Thread Tony Caduto
Scott Marlowe wrote: On Mon, 2006-06-26 at 08:59, Tony Caduto wrote: MG wrote: Hello, we are using PostgreSQL 8.0.3 together with RAID on OpenServer 6. When we do a big SELECT-query the whole maschine becomes very very very slowly or stands. The maschine has 3 GB RAM, so we suppos

Re: [GENERAL] RAID + PostgreSQL?

2006-06-26 Thread Guy Fraser
On Mon, 2006-26-06 at 11:08 -0500, Scott Marlowe wrote: > On Mon, 2006-06-26 at 08:59, Tony Caduto wrote: > > MG wrote: > > > Hello, > > > > > > we are using PostgreSQL 8.0.3 together with RAID on OpenServer 6. > > > > > > When we do a big SELECT-query the whole maschine becomes very very > >

Re: [GENERAL] auto-vacuum & Negative "anl" Values

2006-06-26 Thread Dylan Hansen
So can I assume that this is a bug?The only resolution I can see right now is to setup a cron job that will perform an ANALYZE periodically, as the pg_autovacuum ANALYZE threshold is never reached.Any other suggestions?  Thanks for the input! --Dylan HansenEnterprise Systems DeveloperOn 24-Jun-06,

[GENERAL] inheritance and table

2006-06-26 Thread nik600
hi i don't have understand how works inheritance of tables... if table B inherits from table A - A and B must share primary keys? - if i isert record in B the record is replaced in A ? can i avoid this? i would like to have this scenario: table A table B inheridts from A table C inheridts

[GENERAL] limit over attribute size if index over it exists

2006-06-26 Thread pajai
Hi everybody, I have got an issue with PostgreSQL. There is a limitation on the column length of a tuple, in case there is an index over it. In the actual project I am working on, I meet such a situation. I have got an attribute over which I am doing a search (that is, I need an index over it), bu

Re: [GENERAL] RAID + PostgreSQL?

2006-06-26 Thread Scott Marlowe
On Mon, 2006-06-26 at 08:59, Tony Caduto wrote: > MG wrote: > > Hello, > > > > we are using PostgreSQL 8.0.3 together with RAID on OpenServer 6. > > > > When we do a big SELECT-query the whole maschine becomes very very > > very slowly or stands. > > The maschine has 3 GB RAM, so we suppose it

Re: [GENERAL] initlocation on 8.0+

2006-06-26 Thread Nitin Verma
Thanx Scott and Michael -Original Message- From: Michael Fuhr [mailto:[EMAIL PROTECTED] Sent: Monday, June 26, 2006 9:18 PM To: Nitin Verma Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] initlocation on 8.0+ On Mon, Jun 26, 2006 at 08:31:22AM -0700, Nitin Verma wrote: > I am usi

Re: [GENERAL] initlocation on 8.0+

2006-06-26 Thread Michael Fuhr
On Mon, Jun 26, 2006 at 08:31:22AM -0700, Nitin Verma wrote: > I am using initlocation utility to have two separate PGDATAs, that can then > host different databases. In my case I only have one on each and I am using > version 7.3.2. > > But I am not able to find this utility on 8.1.0, is there an

Re: [GENERAL] Return the primary key of a newly inserted row?

2006-06-26 Thread Alban Hertroys
Scott Ribe wrote: You won't have duplicates[1], it's a sequence. It's its purpose. Now I may have missed something, I didn't follow this thread. Yes, what you quoted was more the intro. The actual question was how to find out what ids were generated during a sequence of insertions. That's w

Re: [GENERAL] initlocation on 8.0+

2006-06-26 Thread Scott Marlowe
On Mon, 2006-06-26 at 10:31, Nitin Verma wrote: > Hi All, > > I am using initlocation utility to have two separate PGDATAs, that can then > host different databases. In my case I only have one on each and I am using > version 7.3.2. > > But I am not able to find this utility on 8.1.0, is there an

Re: [GENERAL] Return the primary key of a newly inserted row?

2006-06-26 Thread Scott Ribe
> You won't have duplicates[1], it's a sequence. It's its purpose. > > Now I may have missed something, I didn't follow this thread. Yes, what you quoted was more the intro. The actual question was how to find out what ids were generated during a sequence of insertions. -- Scott Ribe [EMAIL PRO

[GENERAL] initlocation on 8.0+

2006-06-26 Thread Nitin Verma
Hi All, I am using initlocation utility to have two separate PGDATAs, that can then host different databases. In my case I only have one on each and I am using version 7.3.2. But I am not able to find this utility on 8.1.0, is there an alternative utility to this or this feature is no more suppor

Re: [GENERAL] RAID + PostgreSQL?

2006-06-26 Thread Joshua D. Drake
On Monday 26 June 2006 00:36, MG wrote: > Hello, > > we are using PostgreSQL 8.0.3 together with RAID on OpenServer 6. I'm sorry. > > When we do a big SELECT-query the whole maschine becomes very very very > slowly or stands. The maschine has 3 GB RAM, so we suppose it`s the RAID. Or your databa

Re: [GENERAL] update impossible, constraint prevents it but it shouldn't

2006-06-26 Thread lrotger
Martijn van Oosterhout wrote: On Mon, Jun 26, 2006 at 01:00:19PM +0200, lrotger wrote: I run the following query: update personal set closed_date = flt_date + 20 from enr inner join personal p on enr.id = p.id_enr where (...columns from enr, columns from personal...) I think your problem is

Re: [GENERAL] unique attributes in profile management system

2006-06-26 Thread Francesco Formenti - TVBLOB S.r.l.
Tom Lane wrote: "Francesco Formenti - TVBLOB S.r.l." <[EMAIL PROTECTED]> writes: we are developing a system for profile management. The simplified schema is composed by three tables: * tbl_user : the users table; contains the unique id of the users and the profile id (only

Re: [GENERAL] RAID + PostgreSQL?

2006-06-26 Thread Tony Caduto
MG wrote: Hello, we are using PostgreSQL 8.0.3 together with RAID on OpenServer 6. When we do a big SELECT-query the whole maschine becomes very very very slowly or stands. The maschine has 3 GB RAM, so we suppose it`s the RAID. Has anyone some experience with RAID + PostgreSQL? Where d

Re: [GENERAL] unique attributes in profile management system

2006-06-26 Thread Tom Lane
"Francesco Formenti - TVBLOB S.r.l." <[EMAIL PROTECTED]> writes: > we are developing a system for profile management. The simplified schema > is composed by three tables: > * tbl_user : the users table; contains the unique id of the users > and the profile id (only one profile for each

Re: [GENERAL] Return the primary key of a newly inserted row?

2006-06-26 Thread Martijn van Oosterhout
On Mon, Jun 26, 2006 at 11:31:32AM +0200, Alban Hertroys wrote: > [1] Unless you manage to make it wrap around after 2^32 (or 2^64?) calls > of nextval. But that's quite unlikely. Even then, only if have wrapping enabled. With wrapping disabled, nextval() will simply fail rather than return a val

Re: [GENERAL] update impossible, constraint prevents it but it shouldn't

2006-06-26 Thread Martijn van Oosterhout
On Mon, Jun 26, 2006 at 01:00:19PM +0200, lrotger wrote: > I run the following query: > > update personal set closed_date = flt_date + 20 > from enr inner join personal p on enr.id = p.id_enr > where (...columns from enr, columns from personal...) I think your problem is that "personal" and "pers

Re: [GENERAL] Return the primary key of a newly inserted row?

2006-06-26 Thread Alban Hertroys
John Tregea wrote: The example of select id1 = nextval(somesequence) could work for me. I have multiple users with our GUI and imagine I could use transaction protection to ensure no duplicates between selecting and incrementing the somesequence... You won't have duplicates[1], it's a seque

[GENERAL] "Ghost" colmumn with primary key

2006-06-26 Thread chrisek
Hello, I have a table 'customers', with 2 records: SELECT * FROM customers; customerID | customerName --+- myFriend | myFriend's Name test | testing user (2 rows) but when I'm asking about customerID column, I get the answer: SELECT custo

[GENERAL] unique attributes in profile management system

2006-06-26 Thread Francesco Formenti - TVBLOB S.r.l.
Hi all, we are developing a system for profile management. The simplified schema is composed by three tables: * tbl_user : the users table; contains the unique id of the users and the profile id (only one profile for each user), and some other information * tbl_data_type : conta

[GENERAL] RAID + PostgreSQL?

2006-06-26 Thread MG
Hello,   we are using PostgreSQL 8.0.3 together with RAID on OpenServer 6.   When we do a big SELECT-query the whole maschine becomes very very very slowly or stands. The maschine has 3 GB RAM, so we suppose it`s the RAID.   Has anyone some experience with RAID + PostgreSQL?   Where does Postgr

[GENERAL] update impossible, constraint prevents it but it shouldn't

2006-06-26 Thread lrotger
I apologize if I'm running an old version (7.2.1) maybe this has been fixed or maybe it's not a bug but I can't look at the changelogs now. UPDATE has a non-standard FROM clause where you can do joins etc so columns from other tables can appear in WHERE. I run the following query: update per

Re: [GENERAL] "Ghost" colmumn with primary key

2006-06-26 Thread Bruno Baguette
[EMAIL PROTECTED] a écrit : Hello, I have a table 'customers', with 2 records: SELECT * FROM customers; customerID | customerName --+- myFriend | myFriend's Name test | testing user (2 rows) but when I'm asking about customerID column, I