[GENERAL] random delays

2005-12-09 Thread Baldur Norddahl
Hi, I noticed that sometimes we seem to have a problem with simple queries that take a long time to execute. For example "select * from config where key='abc'" which normally only takes a few milliseconds, but in some rare cases suddenly takes 10-30 seconds. It is a production system, so the

[GENERAL] postgresql start/stop/status script

2005-04-19 Thread Baldur Norddahl
Hi, I am working on making a postgresql/drbd/heartbeat high availability cluster. I need a script for heartbeat to start, stop and query the service. I wrote the following: pgStart() { su - pg0 -c "cd data ; /mnt/data0/postgresql/bin/pg_ctl start -D /mnt/data0/postgresql/data -w -o '-i -

Re: [GENERAL] postgresql start/stop/status script

2005-04-20 Thread Baldur Norddahl
Peter Eisentraut wrote: Baldur Norddahl wrote: Is there a better way to query the status of postgresql? I would expect it to at least check that the process in the PID is actually running and that it is a postgresql process. Maybe try test $(readlink /proc/$pid/exe

[GENERAL] duplicate primary key entries?

2003-11-25 Thread Baldur Norddahl
Hi, I just noticed something bad in our database: webshop=# select oid,* from content_loc where id=20488; oid | id | locale | name -+---++-- 9781056 | 20488 | any| Rise Part II 9781058 | 20488 | any| Rise Part II (2 rows) webshop=# \d content

Re: [GENERAL] duplicate primary key entries?

2003-11-25 Thread Baldur Norddahl
erhout <[EMAIL PROTECTED]>: > On Tue, Nov 25, 2003 at 12:22:29PM +0100, Baldur Norddahl wrote: > > Hi, > > > > I just noticed something bad in our database: > > > > webshop=# select oid,* from content_loc where id=20488; > >oid | id

Re: [GENERAL] duplicate primary key entries?

2003-11-26 Thread Baldur Norddahl
using it even when it fitted perfectly into the structure. Baldur Quoting Alvaro Herrera <[EMAIL PROTECTED]>: > On Tue, Nov 25, 2003 at 01:02:37PM +0100, Baldur Norddahl wrote: > > > No, there can be no space after 'any' because the foreign key prevents it > (wh

Re: [GENERAL] why the need for is null?

2004-01-01 Thread Baldur Norddahl
Quoting Martijn van Oosterhout <[EMAIL PROTECTED]>: > Annoying, not really. It's actually extremely useful. It's useful having a > value which is never equal to anything else, not even itself. If you use it > to represent "unknown" it will work for you. If you try to use it for > anything else, it

Re: [GENERAL] why the need for is null?

2004-01-03 Thread Baldur Norddahl
Quoting Guy Fraser <[EMAIL PROTECTED]>: > There already is an operator, and it is the ANSI SQL operator "IS". Just > because "IS" does not use puctuation characters does not mean it is not > an operator. "IS" is not an operator in postgresql, at least not in the same sense that "=" is an operat

[GENERAL] on cascade set null works on not null columns

2004-01-24 Thread Baldur Norddahl
Hi, I just noticed that I could do this: webshop=# create table foo (bar text not null primary key); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "foo_pkey" for table "foo" CREATE TABLE webshop=# create table foo2 (bar text not null, foreign key (bar) references foo(bar) on upda

Re: [GENERAL] Plans for 8.2?

2006-01-13 Thread Baldur Norddahl
Jeff Trout skrev: "Built In" Failover/Clustering This won't happen. The community stance, which is a good one is that no single replication solutions fits everyone's needs and therefore we rely out the outside sources. Slony-I, Mammoth Replicator and pgpool being the most popular. Too bad -