[GENERAL] generating part of composite key

2007-07-26 Thread Stuart
I have a table with a composite PK like CREATE TABLE t ( grp INT NOT NULL, itm SMALLINT NOT NULL, ..., PRIMARY KEY (grp,itm)); Normally the app takes care of providing the correct grp,itm values when inserting records. However (during a long period of development), I need to re

Re: [GENERAL] Question about Postgres

2007-07-26 Thread John Koller
NetComrade wrote: > I apologize for cross-posting, but I need some help w/o too many > advices RTFM :). After Oracle and MySQL, this becomes the third > product that I need to learn to some degree, and I need a few links > which would provide a 'quick tutorial' especially for folks with > Oracle b

Re: [GENERAL] The database slows down after a few weeks

2007-07-26 Thread Damian C
On 7/27/07, Tom Lane <[EMAIL PROTECTED]> wrote: Bekar Bartaia <[EMAIL PROTECTED]> writes: > Versions running: > Linux Fedora Core 3 > psql (PostgreSQL) 7.4.8 > jdk1.5.0_02 The first tip I'd give you is to get onto something newer than PG 7.4. Fedora 3 is pretty long in the tooth as well. Alth

Re: [GENERAL] The database slows down after a few weeks

2007-07-26 Thread Tom Lane
Bekar Bartaia <[EMAIL PROTECTED]> writes: > If no cause can be found: Are there any other useful > tips? > Versions running: > Linux Fedora Core 3 > psql (PostgreSQL) 7.4.8 > jdk1.5.0_02 The first tip I'd give you is to get onto something newer than PG 7.4. Fedora 3 is pretty long in the tooth as

Re: [GENERAL] Porting MySQL data types to PostgreSQL

2007-07-26 Thread Jeff Davis
On Tue, 2007-07-24 at 10:47 -0700, Gautam Sampathkumar wrote: > Hi, >I am in the process of porting a MySQL database to PostgreSQL. > I was wondering why PostgreSQL does not support unsigned data types? > > Does this mean I'd have to essentially double the space occupied by > most database

[GENERAL] NOTICE Acepted as Error After Upgrade

2007-07-26 Thread Kaloyan Iliev
Hello Group, I have the following problem. We have a very old server on BSDI. We buy a new one and install FreeBSD6.2 on it. The PG version on the old server is: version - PostgreSQL 7.4.6 on i386-pc-bsdi4.2,

Re: [GENERAL] The database slows down after a few weeks

2007-07-26 Thread Bill Moran
In response to Bekar Bartaia <[EMAIL PROTECTED]>: > Hello > > We have a problem with our database. It is accessed by > Java using Hibernate. When the program has been > running for a couple of weeks some transactions are > delayed and are executed up to an hour later than then > they are first ca

[GENERAL] The database slows down after a few weeks

2007-07-26 Thread Bekar Bartaia
Hello We have a problem with our database. It is accessed by Java using Hibernate. When the program has been running for a couple of weeks some transactions are delayed and are executed up to an hour later than then they are first called. If the computer is restarted it will take about a week bef

Re: [GENERAL] Tunning PostgreSQL performance for views on Windows

2007-07-26 Thread Harald Armin Massa
in addition to the good advise of "materialzing the view" as in "create table as select * from " once a day, and to provide more information, PLEASE take notice that Good places to start with tuning: http://www.powerpostgresql.com/PerfList http://www.varlena.com/GeneralBits/Tidbits/perf.html

Re: [GENERAL] Tunning PostgreSQL performance for views on Windows

2007-07-26 Thread Bill Moran
In response to Ranieri Mazili <[EMAIL PROTECTED]>: > > I'm developing a BI and as database it's using postgresql 8.2, how data > are very detailed, I'm creating a view to consolidate the most important > data, but the performance of view is very poor, 1 minute to perform more > or less without whe

[GENERAL] Tunning PostgreSQL performance for views on Windows

2007-07-26 Thread Ranieri Mazili
Hello, I'm developing a BI and as database it's using postgresql 8.2, how data are very detailed, I'm creating a view to consolidate the most important data, but the performance of view is very poor, 1 minute to perform more or less without where clause. I need to know how I can increase the perf

Re: [GENERAL] ssl connections to postgresql

2007-07-26 Thread Richard Huxton
James B. Byrne wrote: On Wed, July 25, 2007 03:13, Albe Laurenz wrote: James B. Byrne wrote: I would like to verify that the connection between these two machines is indeed employing ssl for the application in question. If you set log_min_messages and log_min_error_statement to debug5, you wil

Re: [GENERAL] a few questions (and doubts) about xid

2007-07-26 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > What's going on here is that we use Xmax not only for storing "this > transaction deleted the row" but also for storing "this transaction > locked the row". So the row is not really deleted at all. The > IS_LOCKED bit tells you whether the row is locke

Re: [GENERAL] ssl connections to postgresql

2007-07-26 Thread James B. Byrne
On Tue, July 24, 2007 18:29, Joshua D. Drake wrote: > > just enforce hostssl in your pg_hba.conf and nothing else. If you can > connect, you are good :) > > Joshua D. Drake Thanks, I will probably end up doing this. What I am really looking for is an audit trail for all DBM host connections to

Re: [GENERAL] ssl connections to postgresql

2007-07-26 Thread James B. Byrne
On Wed, July 25, 2007 03:13, Albe Laurenz wrote: > James B. Byrne wrote: >> >> I would like to verify that the connection between these >> two machines is indeed employing ssl for the application in question. > > If you set log_min_messages and log_min_error_statement to debug5, > you will get som

Re: [GENERAL] upgrade to 8.2.? or implement Slony, which first?

2007-07-26 Thread Geoffrey
Joseph S wrote: If you don't mind the downtime it would be simpler to upgrade to 8.2 and then worry about Slony. If you do mind you can use slony to do the upgrade which needs much less downtime as you switch servers. Interesting point. It's a 24/7 environment, so downtime is unacceptable.

Re: [GENERAL] Postgresql over a SAN

2007-07-26 Thread Ericson Smith
At one point I used a SAN with a 380GB postgresql database. There were no issues. Great benefit? We were able to keep a hot standby servers in case the main server went down. In that case we would just shutdown the primary server, and start the standby one. - Ericson Smith W3matter LLC http://ww

Re: [GENERAL] Postgresql over a SAN

2007-07-26 Thread Albe Laurenz
Denis Gasparin wrote: > We're evaluating to install a SAN (Storage Area Network) and to use it > as storage area for our Postgresql server. > > Did anybody already make this? Problems, performance issues, tips? We use a SAN with HP EVA boxes for our PostgreSQL servers and we have not encountered

Re: [GENERAL] Delete/update with limit

2007-07-26 Thread Andrew Kroeger
Csaba Nagy wrote: > On Tue, 2007-07-24 at 19:06, Stephan Szabo wrote: >>> Unfortunately I don't think this will work. Multiple backends will happily >>> pick up the same ctid in their selects and then try to delete the same >>> records. >> I'm pretty sure he said that the batch processing (and the

Re: [GENERAL] Delete/update with limit

2007-07-26 Thread Csaba Nagy
Andrew, Thanks for your input, comments below. On Thu, 2007-07-26 at 13:30, Andrew Kroeger wrote: > After reading through this thread, I have an idea that should accomplish > what I believe are your 3 main goals (avoid any negative performance > impact on the user's inserts, do not lose any data

[GENERAL] Postgresql over a SAN

2007-07-26 Thread Denis Gasparin
We're evaluating to install a SAN (Storage Area Network) and to use it as storage area for our Postgresql server. Did anybody already make this? Problems, performance issues, tips? The db server is mainly used as backend to several heavy loaded web servers. The version of Postgresql is 8.1 and O

Re: [GENERAL] Replicating db structure changes

2007-07-26 Thread Magnus Hagander
On Wed, Jul 25, 2007 at 09:08:56PM -0700, Robby Russell wrote: > Hey all, > > I'm catching up the replication options for PostgreSQL and was looking > at slony, but was wondering if I could get some pointers. > > If I understand the slony documentation correctly, it doesn't allow me > to send C

Re: [GENERAL] Replicating db structure changes

2007-07-26 Thread Richard Huxton
Robby Russell wrote: Hey all, I'm catching up the replication options for PostgreSQL and was looking at slony, but was wondering if I could get some pointers. If I understand the slony documentation correctly, it doesn't allow me to send CREATE/ALTER TABLE/INDEX statements to the master and

Re: [GENERAL] a few questions (and doubts) about xid

2007-07-26 Thread Gregory Stark
"Alvaro Herrera" <[EMAIL PROTECTED]> writes: > Gregory Stark wrote: > >> > Just for confirmation: the relfrozenxid of a fresh table is the xid of the >> > transaction that created it, isn't it? >> >> Yes, easily enough checked: >> >> postgres=# create table xyz (i integer); >> CREATE TABLE >> p

Re: [GENERAL] a few questions (and doubts) about xid

2007-07-26 Thread Alvaro Herrera
Luca Ferrari wrote: > On Wednesday 25 July 2007 Gregory Stark's cat, walking on the keyboard, wrote: > > If you really want to understand how snapshots work at this level you could > > read (slowly -- it's pretty dense stuff) through > > src/backend/utils/time/tqual.c:HeapTupleSatisfiesMVCC() > >