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

2006-10-02 Thread Wyatt Tellis
Tom Lane wrote: "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 in

[GENERAL] Foreign keys, arrays, and uniqueness

2006-10-02 Thread Morgan Kita
Let me start by saying I understand that postgresql does not support the following: composite data types with individual components acting as foreign keys, arrays of composite data types, and arrays with elements acting as foreign keys. I will layout my example using them for clarity even though th

Re: [GENERAL] Determining size of a database before dumping

2006-10-02 Thread Tom Lane
Jeff Davis <[EMAIL PROTECTED]> writes: > On Tue, 2006-10-03 at 00:42 +0200, Alexander Staubo wrote: >> Why does pg_dump serialize data less efficiently than PostgreSQL when >> using the "custom" format? > What you're saying is more theoretical. If pg_dump used specialized > compression based on

Re: [GENERAL] Determining size of a database before dumping

2006-10-02 Thread Jeff Davis
On Tue, 2006-10-03 at 00:42 +0200, Alexander Staubo wrote: > Why does pg_dump serialize data less efficiently than PostgreSQL when > using the "custom" format? (Pg_dump arguably has greater freedom in > being able to apply space-saving optimizations to the output format. > For example, one co

Re: [GENERAL] Determining size of a database before dumping

2006-10-02 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/02/06 16:19, Tom Lane wrote: > Alexander Staubo <[EMAIL PROTECTED]> writes: >> You could count the disk space usage of the actual stored tuples, >> though this will necessarily be inexact: >>http://www.postgresql.org/docs/8.1/static/diskusa

Re: [GENERAL] Determining size of a database before dumping

2006-10-02 Thread Alexander Staubo
On Oct 2, 2006, at 23:19 , Tom Lane wrote: Alexander Staubo <[EMAIL PROTECTED]> writes: You could count the disk space usage of the actual stored tuples, though this will necessarily be inexact: http://www.postgresql.org/docs/8.1/static/diskusage.html Or you could count the size of the physi

[GENERAL] Experiences with 3PAR

2006-10-02 Thread Aaron Glenn
I'm curious if anyone on the list has any hands on performance experience with running PostgreSQL on 3PAR appliances (big and small). If you do, please contact me offlist - I'll be happy to summarize for the list archives. Thanks, Aaron ---(end of broadcast)--

Re: [GENERAL] Determining size of a database before dumping

2006-10-02 Thread Tom Lane
Alexander Staubo <[EMAIL PROTECTED]> writes: > You could count the disk space usage of the actual stored tuples, > though this will necessarily be inexact: >http://www.postgresql.org/docs/8.1/static/diskusage.html > Or you could count the size of the physical database files (/var/lib/ > post

Re: [GENERAL] Determining size of a database before dumping

2006-10-02 Thread Madison Kelly
Alexander Staubo wrote: On Oct 2, 2006, at 22:17 , Madison Kelly wrote: I am (re)writing a backup program and I want to add a section for backing up pSQL DBs. In the planning steps (making sure a given destination has enough space) I try to calculate how much space will be needed by a 'pg_d

Re: [GENERAL] Performance and Generic Config after install

2006-10-02 Thread Jim C. Nasby
Patches welcome. :) BTW, -docs or -www might be a better place to discuss this. On Mon, Oct 02, 2006 at 05:11:20PM -0400, Brandon Aiken wrote: > I think the problem would be partly mitigated be better or more obvious > documentation that makes it clear that a) PostgreSQL is probably not > configu

Re: [GENERAL] Performance and Generic Config after install

2006-10-02 Thread Brandon Aiken
I think the problem would be partly mitigated be better or more obvious documentation that makes it clear that a) PostgreSQL is probably not configured optimally, and b) where exactly to go to get server optimization information. Even basic docs on postgresql.conf seem lacking. The fact that some

Re: [GENERAL] Determining size of a database before dumping

2006-10-02 Thread Madison Kelly
Steve Wampler wrote: Madison Kelly wrote: Hi all, I am (re)writing a backup program and I want to add a section for backing up pSQL DBs. In the planning steps (making sure a given destination has enough space) I try to calculate how much space will be needed by a 'pg_dump' run *before* actual

Re: [GENERAL] Determining size of a database before dumping

2006-10-02 Thread Alexander Staubo
On Oct 2, 2006, at 22:17 , Madison Kelly wrote: I am (re)writing a backup program and I want to add a section for backing up pSQL DBs. In the planning steps (making sure a given destination has enough space) I try to calculate how much space will be needed by a 'pg_dump' run *before* actu

Re: [GENERAL] Determining size of a database before dumping

2006-10-02 Thread Steve Wampler
Madison Kelly wrote: > Hi all, > > I am (re)writing a backup program and I want to add a section for > backing up pSQL DBs. In the planning steps (making sure a given > destination has enough space) I try to calculate how much space will be > needed by a 'pg_dump' run *before* actually dumping i

[GENERAL] Determining size of a database before dumping

2006-10-02 Thread Madison Kelly
Hi all, I am (re)writing a backup program and I want to add a section for backing up pSQL DBs. In the planning steps (making sure a given destination has enough space) I try to calculate how much space will be needed by a 'pg_dump' run *before* actually dumping it. Is there a relatively

Re: [GENERAL] Postgres backup

2006-10-02 Thread Damian C
On 10/3/06, Martijn van Oosterhout wrote: On Sun, Oct 01, 2006 at 09:20:12PM -0700, pd wrote: > guys, > > i have a java web app with a postgres backend. now i want to implement > a db database functionality from within my web app. now i have got > this so far, > > String[] args = {"\"C:\\Program

Re: [GENERAL] Performance and Generic Config after install

2006-10-02 Thread Jeff Davis
On Mon, 2006-10-02 at 14:40 -0400, Oisin Glynn wrote: > As an aside to the "[GENERAL] Advantages of PostgreSQL" thread going on > today, I have wondered why the initial on install config of PostgreSQL > is (according to most posts) very conservative. I can see how this > would be a plus when pe

Re: [GENERAL] Performance and Generic Config after install

2006-10-02 Thread Andrew Sullivan
On Mon, Oct 02, 2006 at 02:40:03PM -0400, Oisin Glynn wrote: > As an aside to the "[GENERAL] Advantages of PostgreSQL" thread going on > today, I have wondered why the initial on install config of PostgreSQL > is (according to most posts) very conservative. I can see how this Actually, that's

[GENERAL] Performance and Generic Config after install

2006-10-02 Thread Oisin Glynn
As an aside to the "[GENERAL] Advantages of PostgreSQL" thread going on today, I have wondered why the initial on install config of PostgreSQL is (according to most posts) very conservative. I can see how this would be a plus when people may be getting PostgreSQL as part of an OS in the Linux

Re: [GENERAL] Weird disk write load caused by PostgreSQL?

2006-10-02 Thread Alexander Staubo
I'm surprised that I have to reply to myself, since in hindsight this should be bloody obvious: It's the pgsql_tmp directory. I just monitored the file creation in that directory, and found PostgreSQL to be creating huge temporary, extremely short-lived files ranging from 1MB to 20MB in siz

Re: [GENERAL] Advantages of postgresql

2006-10-02 Thread Brandon Aiken
I’ve recently done the same thing.   Basically, it boils down to philosophy.  MySQL’s primary goal is speed.  Speed over features, and even speed over data integrity.  PostgreSQL’s (and most RDBMS system’s) primary goal is to present the complete relational model and maintain ACID complia

Re: [GENERAL] Weird disk write load caused by PostgreSQL?

2006-10-02 Thread Alexander Staubo
On Oct 2, 2006, at 17:50 , Tom Lane wrote: Alexander Staubo <[EMAIL PROTECTED]> writes: I have a production PostgreSQL instance (8.1 on Linux 2.6.15) that seems to be writing data to disk at rates that I think are disproportional to the update load imposed on the database. I am looking for ways

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

2006-10-02 Thread arsi
Hi all, 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_p

Re: [GENERAL] Postgres backup

2006-10-02 Thread Martijn van Oosterhout
On Sun, Oct 01, 2006 at 09:20:12PM -0700, pd wrote: > guys, > > i have a java web app with a postgres backend. now i want to implement > a db database functionality from within my web app. now i have got > this so far, > > String[] args = {"\"C:\\Program > Files\\PostgreSQL\\8.1\\bin\\pg_dump\"",

Re: [GENERAL] using float4, I get incorrect value when select

2006-10-02 Thread Martijn van Oosterhout
On Sun, Oct 01, 2006 at 10:47:27PM -0400, Anibal David Acosta F. wrote: > Hello, I have a table, with a float4 column, when I insert a new row and for > example I use this value "5000542,5" in the column of type float4, the > insert do OK, but when I select (select myColumn from myTable) I get th

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

2006-10-02 Thread Martijn van Oosterhout
On Sun, Oct 01, 2006 at 07:48:14PM -0700, rlee0001 wrote: > For example, if I key "employee" by Last Name, First Name, Date > of Hire and Department, I would need to store copies of all this data > in any entity that relates to an employee (e.g. payroll, benefits and > so on). In addition, if any

Re: [GENERAL] Weird disk write load caused by PostgreSQL?

2006-10-02 Thread Tom Lane
Alexander Staubo <[EMAIL PROTECTED]> writes: > I have a production PostgreSQL instance (8.1 on Linux 2.6.15) that > seems to be writing data to disk at rates that I think are > disproportional to the update load imposed on the database. I am > looking for ways to determine the cause of this I

[GENERAL] test

2006-10-02 Thread Alban Hertroys
Mail from this ML doesn't seem to arrive at our office anymore (you haven't been silent for 4 days, have you?). Hence a small test. Sorry for the inconvenience. -- Alban Hertroys [EMAIL PROTECTED] magproductions b.v. T: ++31(0)534346874 F: ++31(0)534346876 M: I: www.magproductions.nl A: Postbu

[GENERAL] Weird disk write load caused by PostgreSQL?

2006-10-02 Thread Alexander Staubo
I have a production PostgreSQL instance (8.1 on Linux 2.6.15) that seems to be writing data to disk at rates that I think are disproportional to the update load imposed on the database. I am looking for ways to determine the cause of this I/O. As an example, here is a typical graph produced

Re: [GENERAL] Dynamic access to record columns (in PL/pgsql)

2006-10-02 Thread Erik Jones
Tom Lane wrote: Daniele Mazzini <[EMAIL PROTECTED]> writes: I have a trigger procedure which I want to be called after insert or update on different tables. In this procedure, I need to find the values of key fields for the affected table in the NEW record, but I can't find a way to access

Re: [GENERAL] Advantages of postgresql

2006-10-02 Thread Andreas Kretschmer
Iulian Manea <[EMAIL PROTECTED]> schrieb: > > > Hello everybody, > > So far I have only been working with MySQL. Today I was talking to a friend > and > he was suggesting I migrated to postgreSQL, as it is way better & > > My question is & why? > I mean could someone pls tell me some advant

[GENERAL] FlushRelationBuffers Error

2006-10-02 Thread Joey Adams
Last night during a vacuum full, one of our production 7.4.12 databases threw this warning: WARNING: FlushRelationBuffers("idxtype26", 6137): block 5752 is referenced (private 0, global 1) vacuumdb: vacuuming of database "cvdb" failed: ERROR: FlushRelationBuffers returned -2 PANIC: cannot ab

[GENERAL] Advantages of postgresql

2006-10-02 Thread Iulian Manea
Hello everybody,   So far I have only been working with MySQL. Today I was talking to a friend and he was suggesting I migrated to postgreSQL, as it is way better …   My question is … why? I mean could someone pls tell me some advantages and disadvantages of working with postgresql?  

[GENERAL]

2006-10-02 Thread Dirk Hartmann
Hi, I am using Postgresql 8.0. I have the problem to do any operation with the database like vaccumdb or dumping the database. The postgresql log shows, that it can't find the file /var/lib/pgsql/data/pg_clog/ . The database starts up and some tables can queried. Any help is welcome Dirk -

[GENERAL] Postgres backup

2006-10-02 Thread pd
guys, i have a java web app with a postgres backend. now i want to implement a db database functionality from within my web app. now i have got this so far, String[] args = {"\"C:\\Program Files\\PostgreSQL\\8.1\\bin\\pg_dump\"", " -i", " -h", " localhost", " -p", " 5432", " -U", " postgres", " -

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

2006-10-02 Thread rlee0001
Tom Lane wrote: > "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

[GENERAL] using float4, I get incorrect value when select

2006-10-02 Thread Anibal David Acosta F.
Hello, I have a table, with a float4 column, when I insert a new row and for example I use this value "5000542,5" in the column of type float4, the insert do OK, but when I select (select myColumn from myTable) I get the value "5000540" I don't know why. But if I cast to float8 (select cast(myC

[GENERAL] pg_dump design problem (bug??)

2006-10-02 Thread Karl O. Pinc
Postgresql 8.1.3 Hi, I'm wondering if there's a problem with pg_dump --create, or if I'm just missing something. It does not seem to restore things like: ALTER DATABASE foo SET "DateStyle" TO European; Shouldn't the database that is re-created be like the database that is being dumped? For ou

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

2006-10-02 Thread rlee0001
Stephan Szabo wrote: > 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, i

Re: [GENERAL] Major Performance decrease after some hours

2006-10-02 Thread Tom Lane
Ray Stell <[EMAIL PROTECTED]> writes: > How would one determine the lock situation definitively? Is there > an internal mechanism that can be queried? pg_locks view. regards, tom lane ---(end of broadcast)--- TIP 2: Don't

Re: [GENERAL] How to trace index to table?

2006-10-02 Thread Ardian Xharra
If you look on pg_indexes you find the index and the table.   - Original Message - From: Chris Hoover To: pgsql-general@postgresql.org Sent: Monday, October 02, 2006 9:19 AM Subject: [GENERAL] How to trace index to table? I'm trying to build some queries t

[GENERAL] How to trace index to table?

2006-10-02 Thread Chris Hoover
I'm trying to build some queries to gather metrics on my PG database.  When looking at pg_class and pulling a row that is an index, how do I use sql to pull the table the index belongs to?Thanks,Chris

Re: [GENERAL] Major Performance decrease after some hours

2006-10-02 Thread Ray Stell
On Sun, Oct 01, 2006 at 12:55:51PM +0200, MaXX wrote: > > Pure speculation: are you sure you aren't vacuuming too agressively? > The DELETE waiting and SELECT waiting sound to me like they are waiting > for a lock that another vacuum is holding. How would one determine the lock situation defini

Re: [GENERAL] pg web hosting with tsearch2?

2006-10-02 Thread Michelle Konzack
Am 2006-09-29 13:45:34, schrieb Rick Schumeyer: > 3)All the web hosts I am aware of are still offering only pg 7.4. > Does anybody offer pg 8.x ? I am thinking about a root-Server for 39 Euro/Month on which I can install what I want Greetings Michelle Konzack Systemadministrator

Re: [GENERAL] PostgreSQL 8.1 - SSL:Required

2006-10-02 Thread Magnus Hagander
> Hi, > I am using the binary install for postgresql 8.1 Win32 on Windows > XP. I know how to intstall SSL if I was installing from source, -- > with-openssl, but I am installing onto Windows XP for the first > time, so my question is: > > 1. How do I install the SSL module via the install wizard?

Re: [GENERAL] Major Performance decrease after some hours

2006-10-02 Thread Peter Bauer
2006/10/2, Tom Lane <[EMAIL PROTECTED]>: "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/pgSQ

[GENERAL] PostgreSQL 8.1 - SSL:Required

2006-10-02 Thread Andrew
Hi,I am using the binary install for postgresql 8.1 Win32 on Windows XP. I know how to intstall SSL if I was installing from source, --with-openssl, but I am installing onto Windows XP for the first time, so my question is: 1. How do I install the SSL module via the install wizard?Blessings Andrew

Re: [GENERAL] GiST and Gin technical doc

2006-10-02 Thread Teodor Sigaev
GiST: http://gist.cs.berkeley.edu/ http://www.sai.msu.su/~megera/postgres/gist/papers/concurrency/ GIN: GIN is ordinary inverted index which described in many docs. Look for some implementation details in my presentation on conference: http://www.sigaev.ru/gin/Gin.pdf Yannick Warnier wrote: Hi