Re: [GENERAL] Postgresql Page Layout details

2008-03-06 Thread Richard Huxton
Najib Abi Fadel wrote: Dear all, i was reading the postgres docs concerning the Database Physical Storage. I found that the information present there is not enough to satisfy my curiosity. Are there any documentation out there that describes in more details the Database Physical Storage of

Re: [GENERAL] Postgresql Page Layout details

2008-03-06 Thread Richard Huxton
Najib Abi Fadel wrote: Concerning the 8KB page size, as i understood postgres Page Size is different from the file system Block size. If the system block size is 4kB are there any mechanism that guaranties that a postgres page is stored on 2 adjacent file system blocks ? That's the job of the

Re: [GENERAL] Postgresql Page Layout details

2008-03-06 Thread Najib Abi Fadel
Concerning the 8KB page size, as i understood postgres Page Size is different from the file system Block size. If the system block size is 4kB are there any mechanism that guaranties that a postgres page is stored on 2 adjacent file system blocks ? Cause otherwise performance may suffer since

Re: [GENERAL] Planner: rows=1 after similar to where condition.

2008-03-06 Thread Joris Dobbelsteen
-Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Wednesday, 5 March 2008 0:29 To: Joris Dobbelsteen Cc: Gregory Stark; Scott Marlowe; pgsql-general@postgresql.org Subject: Re: [GENERAL] Planner: rows=1 after similar to where condition. Joris Dobbelsteen [EMAIL

[GENERAL] Ask ctid

2008-03-06 Thread Achmad Nizar Hidayanto
Dear all, I implement database in my faculty using Postgre. I have a problem with ctid in my tables. Let say, i have table STUDENT with #STU as the primary key. I don't know what happend in this table, some rows have exactly the same value ( i also have set the #STU as unique). After tracing the

Re: [GENERAL] ER Diagram design tools (Linux)

2008-03-06 Thread Thomas Pundt
Hi, Conor McTernan schrieb: I was wondering if anyone knows of any good ER Diagram tools for Postgres that run on Linux. [...] Does anyone know of any commercial or open source software that will do this? Datastudio (www.aquafold.com) also has a tool to build ER diagrams. It is a commercial

Re: [GENERAL] Ask ctid

2008-03-06 Thread Martijn van Oosterhout
On Thu, Mar 06, 2008 at 05:40:00PM +0700, Achmad Nizar Hidayanto wrote: Dear all, I implement database in my faculty using Postgre. I have a problem with ctid in my tables. Let say, i have table STUDENT with #STU as the primary key. I don't know what happend in this table, some rows have

Re: [GENERAL] Ask ctid

2008-03-06 Thread Tom Lane
Achmad Nizar Hidayanto [EMAIL PROTECTED] writes: I implement database in my faculty using Postgre. I have a problem with ctid in my tables. Let say, i have table STUDENT with #STU as the primary key. I don't know what happend in this table, some rows have exactly the same value ( i also have

[GENERAL] mssql to postgres problems with bytea help needed

2008-03-06 Thread robert
Hi all, I've successfully converted a huge mssql ddl to postgres 8.1.9 - I could upgrade if need be. We run both db's for our app depending on the customer. We have a new feature, storing serialized java objects in the db, and I'm having trouble with on this insert: INSERT INTO

Re: [GENERAL] mssql to postgres problems with bytea help needed

2008-03-06 Thread Thomas Kellerer
robert, 06.03.2008 15:32: Hi all, I've successfully converted a huge mssql ddl to postgres 8.1.9 - I could upgrade if need be. We run both db's for our app depending on the customer. We have a new feature, storing serialized java objects in the db, and I'm having trouble with on this insert:

[GENERAL] Violation of non existing reference

2008-03-06 Thread js
Hi, I encountered an odd behaviour when I tried to delete a record. I have two tables z_base and z_ul. z_base's primary key is isin which is referenced by z_ul. select count(*) from z_base where isin = 'DE000DB3BTR9'; count --- 1 select count(*) from z_ul where isin = 'DE000DB3BTR9';

Re: [GENERAL] Violation of non existing reference

2008-03-06 Thread Tom Lane
[EMAIL PROTECTED] writes: So there is no record in z_ul that references z_base with isin 'DE000DB3BTR9', but when I do: delete from z_base where isin = 'DE000DB3BTR9'; ERROR: update or delete on table z_base violates foreign key constraint z_ul_isin_fkey on table z_ul DETAIL: Key

Re: [GENERAL] I'm in need of something that should be there

2008-03-06 Thread Ralph Smith
Ralph Smith wrote: And should be easier to find in the manual! I've looked in many related chapters of the 8.2 manual for a way to find out WHY a specific user has access to a database. Chapter 5Data Definition Chapter 18 Database Roles Privileges Chapter 20 Client Authorization

Re: [GENERAL] mssql to postgres problems with bytea help needed

2008-03-06 Thread Tom Lane
Thomas Kellerer [EMAIL PROTECTED] writes: robert, 06.03.2008 15:32: I've successfully converted a huge mssql ddl to postgres 8.1.9 - I could upgrade if need be. We run both db's for our app depending on the customer. We have a new feature, storing serialized java objects in the db, and I'm

Re: [GENERAL] I'm in need of something that should be there

2008-03-06 Thread Richard Huxton
Ralph Smith wrote: So am I to assume that there is no way to query just what privs a user/role has on an object, anything, from a DB to an index? Well, obviously you can see what permissions an object has - \dp from psql. See the manual for details. Run psql with -E if you want to see the

Re: [GENERAL] I'm in need of something that should be there

2008-03-06 Thread Erik Jones
On Mar 6, 2008, at 11:52 AM, Ralph Smith wrote: Ralph Smith wrote: And should be easier to find in the manual! I've looked in many related chapters of the 8.2 manual for a way to find out WHY a specific user has access to a database. Chapter 5Data Definition Chapter 18 Database

Re: [GENERAL] Violation of non existing reference

2008-03-06 Thread js
It's Version 8.3. Both columns are of a user defined datatype which is a varchar(12) with a special check. I already did a REINDEX but it didn't help. On 6 Mrz., 18:27, [EMAIL PROTECTED] (Tom Lane) wrote: What PG version is this? Are the two columns of identical datatypes? (I'm wondering

[GENERAL] Cannot Install PostgreSQL on Windows 2000 Server

2008-03-06 Thread Ron Tyndall
Hi, I am having trouble installing PostgreSQL on Windows 2000 Server. When I installed it the Services would not start so I could not complete the install. I granted the windows postgres account Log On as a Service and Log on Locally permissions. Now when I try to install I get an error say the

[GENERAL] staring pgsql on fedora 8

2008-03-06 Thread newbiegalore
Hello everyone :-) , I've just started to get to grips with pgsql and am facing a small issue. I would appreciate any pointers / ideas about how to get around it :-) . When I installed FC8 on my machine, I installed the pgsql package via the package installer, and

Re: [GENERAL] Changing column names in tables

2008-03-06 Thread Hoover, Jeffrey
Why are there too many to fix with ALTER? Use SQL and the data dictionary to generate the DDL and pipe it into psql (or spool it to disk and use that file as a sql script): psql your_db_name -t -c select 'alter table '||t.tablename||' rename \'||c.column_name||'\ to

[GENERAL] Problems with 8.3

2008-03-06 Thread Alex Turner
I'm getting the back end closing connections early for some reason. Here is an exception report from my servlet. This first started happening with my instance of Trac, but now it's happening to my Java apps too. I hope someone can shed some light on what is going on here. Alex HTTP Status 500

Re: [GENERAL] Problems with 8.3

2008-03-06 Thread Alex Turner
Ok - lookint at the pg log, it appears that the server process is seg faulting :(. This might conceivably be my fault. I have 3 stored procedures written in C, but they've been on the server for months, and unless I didn't deploy them correctly originally I don't think it's them. I'm thinking I

Re: [GENERAL] Problems with 8.3

2008-03-06 Thread Douglas McNaught
On 3/6/08, Alex Turner [EMAIL PROTECTED] wrote: I'm getting the back end closing connections early for some reason. Here is an exception report from my servlet. This first started happening with my instance of Trac, but now it's happening to my Java apps too. I hope someone can shed some

Re: [GENERAL] Problems with 8.3

2008-03-06 Thread Alex Turner
Ok - the connection closed thing is happening a lot, but not much is going into pg_log... Alex On Thu, Mar 6, 2008 at 4:03 PM, Douglas McNaught [EMAIL PROTECTED] wrote: On 3/6/08, Alex Turner [EMAIL PROTECTED] wrote: Ok - lookint at the pg log, it appears that the server process is seg

Re: [GENERAL] Problems with 8.3

2008-03-06 Thread Richard Huxton
Alex Turner wrote: I'm getting the back end closing connections early for some reason. Here is an exception report from my servlet. This first started happening with my instance of Trac, but now it's happening to my Java apps too. I hope someone can shed some light on what is going on here.

Re: [GENERAL] Problems with 8.3

2008-03-06 Thread Alex Turner
Sometimes I'm getting LOG: unexptected EOF on client connection Alex On Thu, Mar 6, 2008 at 4:06 PM, Alex Turner [EMAIL PROTECTED] wrote: Ok - the connection closed thing is happening a lot, but not much is going into pg_log... Alex On Thu, Mar 6, 2008 at 4:03 PM, Douglas McNaught

Re: [GENERAL] Problems with 8.3

2008-03-06 Thread Alex Turner
Ok - more info I turned on connection logging a few other things, and normaly I get something like this: LOG: 0: connection authorized: user=postgres database=trend LOCATION: BackendInitialize, postmaster.c:3097 LOG: 0: disconnection: session time: 0:00:00.004 user=postgres

Re: [GENERAL] Problems with 8.3

2008-03-06 Thread Douglas McNaught
On 3/6/08, Alex Turner [EMAIL PROTECTED] wrote: Ok - lookint at the pg log, it appears that the server process is seg faulting :(. This might conceivably be my fault. I have 3 stored procedures written in C, but they've been on the server for months, and unless I didn't deploy them

Re: [GENERAL] Problems with 8.3

2008-03-06 Thread Richard Huxton
Alex Turner wrote: Ok - lookint at the pg log, it appears that the server process is seg faulting :(. This might conceivably be my fault. I have 3 stored procedures written in C, but they've been on the server for months, and unless I didn't deploy them correctly originally I don't think it's

Re: [GENERAL] Problems with 8.3

2008-03-06 Thread Tom Lane
Alex Turner [EMAIL PROTECTED] writes: I'm thinking I need a core file. Yeah. I'm guessing I just restart postgresql from a user whos core file size limit is set to non zero? Probably won't help if your start script does su postgres as most do. What I'd try is putting the ulimit command in

Re: [GENERAL] Problems with 8.3

2008-03-06 Thread Alex Turner
I did a pg_ctl start from the postgres user... is that gonna work, or does pg_ctl do an su? Alex On Thu, Mar 6, 2008 at 4:34 PM, Tom Lane [EMAIL PROTECTED] wrote: Alex Turner [EMAIL PROTECTED] writes: I'm thinking I need a core file. Yeah. I'm guessing I just restart postgresql

Re: [GENERAL] Violation of non existing reference

2008-03-06 Thread Tom Lane
[EMAIL PROTECTED] writes: It's Version 8.3. Both columns are of a user defined datatype which is a varchar(12) with a special check. You mean a DOMAIN, or you mean a special datatype with custom C code? If the latter, I'd suspect the C code. 8.3 has more stringent coding rules for

Re: [GENERAL] staring pgsql on fedora 8

2008-03-06 Thread Tom Lane
newbiegalore [EMAIL PROTECTED] writes: When I use this command $ service postgresql initdb nothing really happens. The display says, initializing database and then nothing. I've waited for 10 minutes at a stretch and CPU/memory utilization doesn't seem to be going out of the window implying

Re: [GENERAL] Changing column names in tables 2

2008-03-06 Thread Nis Jørgensen
Tony Cade skrev: select relfilenode from pg_class where relname='rates' update pg_attribute set attname=lower(attname) where attnum 0 and attrelid= ( from above query) Instead of the second one, do SELECT 'ALTER TABLE rates RENAME COLUMN ' || attname || ' TO ' || lower(attname) ||

Re: [GENERAL] contributing patches

2008-03-06 Thread Bruce Momjian
Robert, would you email us the patch? Thanks. --- Robert Haas wrote: We require that all submissions conform to the Postgres BSD license, but we are not picky about requiring paperwork to prove it. Just put the same

Re: [GENERAL] [DOCS] Incrementally Updated Backups: Docs Clarification

2008-03-06 Thread Bruce Momjian
I have updated the docs by changing a few words, patch attached. --- Simon Riggs wrote: On Thu, 2007-04-19 at 15:48 -0500, Thomas F. O'Connell wrote: If we take a backup of the standby server's files while it is

[GENERAL] PHPs PDO, apache and never ending sessions

2008-03-06 Thread Andrej Ricnik-Bay
Hi, Not sure whether this is the right place to ask (probably isn't) but I've seen much mention of PHP and some of PDO on this list ... I'm currently playing with the above, today I got a message FATAL: connection limit exceeded for non-superusers even though there were no sessions I was aware

Re: [GENERAL] PHPs PDO, apache and never ending sessions

2008-03-06 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 7 Mar 2008 15:01:11 +1300 Andrej Ricnik-Bay [EMAIL PROTECTED] wrote: Hi, Not sure whether this is the right place to ask (probably isn't) but I've seen much mention of PHP and some of PDO on this list ... I'm currently playing with

Re: [GENERAL] I'm in need of something that should be there

2008-03-06 Thread John Koller
Ralph Smith wrote: Ralph Smith wrote: And should be easier to find in the manual! I've looked in many related chapters of the 8.2 manual for a way to find out WHY a specific user has access to a database. Chapter 5Data Definition Chapter 18 Database Roles Privileges

Re: [GENERAL] staring pgsql on fedora 8

2008-03-06 Thread newbiegalore
On Mar 6, 10:12 pm, [EMAIL PROTECTED] (Tom Lane) wrote: newbiegalore [EMAIL PROTECTED] writes: When I use this command $ service postgresql initdb nothing really happens. The display says, initializing database and then nothing. I've waited for 10 minutes at a stretch and CPU/memory

Re: [GENERAL] Postgresql Page Layout details

2008-03-06 Thread Patrick TJ McPhee
In article [EMAIL PROTECTED], Richard Huxton [EMAIL PROTECTED] wrote: % Some people used to suggest that a larger blocksize helped with specific % disk systems disk block sizes. This means changing the setting in one % of the header files and recompiling. It also means your database files %

Re: [GENERAL] staring pgsql on fedora 8

2008-03-06 Thread Tom Lane
newbiegalore [EMAIL PROTECTED] writes: hey! thanks for the reply :-). I looked into the pgstartup.log file and everything seems to have worked perfectly with the msg at the end saying Success: you can now start but when I try to start it as a normal user using su normaluser my computer

Re: [GENERAL] staring pgsql on fedora 8

2008-03-06 Thread Tom Lane
Anirban Banerjee [EMAIL PROTECTED] writes: Wow! thanks for being super helpful, I will try it all out. Though I distinctly remember turning off SElinux because it was giving me such a headache even in permissive mode. Yeah, Red Hat has spent quite some time now filing the rough edges off

Re: [GENERAL] Violation of non existing reference

2008-03-06 Thread js
Sorry, I was wrong. It's a charachter(12) not a varchar and it's a domain. The isins in z_ul either start with 'DE000' or with 'CH003'. PG seems to compare only the first few charachters because when I set the reference to CASCADE all z_ul entries that start with 'DE000' are deleted. I tested it