[SQL] FIFO Queue Problems

2002-11-01 Thread Chris Gamache
I'm having a race condition with a FIFO queue program that I've created... CREATE TABLE fifo ( id serial, data varchar(100), status int4 DEFAULT 0 ); I have a program that claims a row for itself my $processid = $$; my $sql_update = EOS; UPDATE fifo set status=$processid

[SQL] Different size in the DATA directory

2002-11-01 Thread Maurício Sessue Otta
Hi, in my production server a "du -hs" in the DATA directory returns 21GB in a newly installed server, after I restored the dumps from the production server, the "du -hs" gives me just 8GB why is there such a diference??? what should I do (besides buying bigger and bigger HDs) ??? []'s

Re: [SQL] Different size in the DATA directory

2002-11-01 Thread dima
Hi, in my production server a du -hs in the DATA directory returns 21GB in a newly installed server, after I restored the dumps from the production server, the du -hs gives me just 8GB why is there such a diference??? what should I do (besides buying bigger and bigger HDs) ??? VACUUM?

Re: [SQL] Different size in the DATA directory

2002-11-01 Thread Maurício Sessue Otta
I do daily vacuums on the production server | Hi, in my production server a du -hs in the DATA directory | returns 21GB | in a newly installed server, after I restored the dumps from the | production server, the du -hs gives me just 8GB | | why is there such a diference??? | | what

Re: [SQL] Different size in the DATA directory

2002-11-01 Thread Stephan Szabo
On Fri, 1 Nov 2002, [iso-8859-1] Maurício Sessue Otta wrote: I do daily vacuums on the production server You haven't said what version you're running, but if you're using 7.2 and non-FULL vacuums you also will want to make sure that you have the free space map settings in postgresql.conf are

Re: [SQL] Different size in the DATA directory

2002-11-01 Thread Tim Perdue
Maurício Sessue Otta wrote: Hi, in my production server a du -hs in the DATA directory returns 21GB in a newly installed server, after I restored the dumps from the production server, the du -hs gives me just 8GB why is there such a diference??? what should I do (besides buying bigger and

Re: [SQL] FIFO Queue Problems

2002-11-01 Thread Richard Huxton
On Friday 01 Nov 2002 2:56 pm, Chris Gamache wrote: I'm having a race condition with a FIFO queue program that I've created... I have a program that claims a row for itself [code sample] The problem occurrs when two of the processes grab the exact same row at the exact same instant. It

Re: [SQL] Selecting * from the base table but getting the inheriteds

2002-11-01 Thread Ross J. Reedstrom
On Wed, Oct 30, 2002 at 10:25:17AM +0100, James Adams wrote: Yea it would be easier to have everything in one table filling unused with nulls, but I was trying to avoid that because of the wasted space. But I think I'll do it that way after all :~] Thanks for your help Don't fret too

Re: [SQL] FIFO Queue Problems

2002-11-01 Thread Bruno Wolff III
On Fri, Nov 01, 2002 at 06:56:30 -0800, Chris Gamache [EMAIL PROTECTED] wrote: The problem occurrs when two of the processes grab the exact same row at the exact same instant. It happens roughly 1 out of 1000 times. I'm not sure if setting the transactions to serializable would fix the

Re: [SQL] Database Design tool

2002-11-01 Thread Reinoud van Leeuwen
On Wed, 30 Oct 2002 14:35:23 + (UTC), [EMAIL PROTECTED] (Johannes Lochmann) wrote: Can anybody take me reference on Database design tool with PostgreSQL support. You can use PowerDesigner from Sybase. Windows only. A fully functional trial version (45 days) is downloadable at

Re: [SQL] [GENERAL] Database Design tool

2002-11-01 Thread Diogo Biazus
Viacheslav N Tararin wrote: Hi. Can anybody take me reference on Database design tool with PostgreSQL support. thanks. There's another one very good called Data Architect: http://www.thekompany.com/products/dataarchitect/ -- Diogo de Oliveira Biazus [EMAIL PROTECTED] Ikono Sistemas e

[SQL] HA PostgreSQL

2002-11-01 Thread Charles H. Woloszynski
I am trying to develop a plan for a high-availability (HA) implementation of a database using PostgreSQL. One wrinkle; the data we receive is performance data, and occassional loss of some measurements is Ok for us. [I know, this is not in the main stream of database users :-)]. I have

Re: [SQL] FIFO Queue Problems

2002-11-01 Thread Bruno Wolff III
On Fri, Nov 01, 2002 at 14:18:37 -0500, Wei Weng [EMAIL PROTECTED] wrote: Do you need to unlock the table fifo when you are done? Locks only apply for the duration of a transaction. When you commit or roleback the lock will be released. ---(end of

Re: [SQL] FIFO Queue Problems

2002-11-01 Thread Tom Lane
Wei Weng [EMAIL PROTECTED] writes: Do you need to unlock the table fifo when you are done? That happens at COMMIT. regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL

Re: [SQL] select syntax question

2002-11-01 Thread Bruno Wolff III
On Fri, Nov 01, 2002 at 16:33:32 -0500, Wei Weng [EMAIL PROTECTED] wrote: This is what is on postgresql's manual page: According to this syntax, SELECT DISTINCT COUNT(ID) FROM test should be valid while SELECT COUNT(DISTINCT ID) FROM test otherwise. while in fact, both are valid. Is

Re: [SQL] HA PostgreSQL

2002-11-01 Thread Robert Treat
On Fri, 2002-11-01 at 13:26, Charles H. Woloszynski wrote: I am trying to develop a plan for a high-availability (HA) implementation of a database using PostgreSQL. One wrinkle; the data we receive is performance data, and occassional loss of some measurements is Ok for us. [I know, this

[SQL] Timezone issue with date_part

2002-11-01 Thread Ken Kennedy
In trying to debug some code, I've come across this SQL issue that's causing my problem. I've got two epoch time values that I have to compare. Time #1 seems to be working straightforwardly enough, but a tricky timezone-related error has surfaced with Time #2. Looking at the straight timestamp: