Re: [GENERAL] high load on server

2009-04-03 Thread Scott Marlowe
On Fri, Apr 3, 2009 at 4:13 PM, Erik Jones wrote: > > On Apr 3, 2009, at 7:32 AM, Scott Marlowe wrote: > >> 2009/4/3 Gerd König : >>> >>> Hello, >>> >>> since 2 days ago we're facing an increased load on our database server >>> (opensuse10.3-64bit, PostgreSQL 8.3.5, 8GB Ram). This high load stays

Re: [GENERAL] high load on server

2009-04-03 Thread Erik Jones
On Apr 3, 2009, at 7:32 AM, Scott Marlowe wrote: 2009/4/3 Gerd König : Hello, since 2 days ago we're facing an increased load on our database server (opensuse10.3-64bit, PostgreSQL 8.3.5, 8GB Ram). This high load stays the whole working day. How man cores? == current

Re: [GENERAL] high load on server

2009-04-03 Thread Scott Marlowe
On Fri, Apr 3, 2009 at 12:35 PM, Gerd Koenig wrote: >> The problem might be that you're assuming there's a problem.  Looking >> at the rest of your diags, you're data set fits in memory, I/O wait is >> < 10% and there are no processes waiting for a CPU to free up, they're >> all running. >> >> Loo

Re: [GENERAL] constraint trigger

2009-04-03 Thread Tom Lane
"Komaravolu, Satya" writes: > The SQL file is failing on the following error. I gave you that > message as it was the first one for the list > of CONSTRAINT TRIGGER statements. > NOTICE: converting trigger group into constraint "" FOREIGN > KEY jn_fuel(transaction_id) REFERENCES jn_transa

Re: [GENERAL] high load on server

2009-04-03 Thread Gerd Koenig
Hello Scott, thanks for answering. Scott Marlowe schrieb: 2009/4/3 Gerd König : Hello, since 2 days ago we're facing an increased load on our database server (opensuse10.3-64bit, PostgreSQL 8.3.5, 8GB Ram). This high load stays the whole working day. How man cores? The server contains two

Re: [GENERAL] constraint trigger

2009-04-03 Thread Tom Lane
"Komaravolu, Satya" writes: > I'm running into the following error when i create a CONSTRAINT > TRIGGER. > NOTICE: ignoring incomplete trigger group for constraint "" > FOREIGN KEY cd_card(tender) REFERENCES cd_tender(id) > DETAIL: Found referenced table's DELETE trigger. That is not an "

[GENERAL] constraint trigger

2009-04-03 Thread Komaravolu, Satya
Hi I'm running into the following error when i create a CONSTRAINT TRIGGER. NOTICE: ignoring incomplete trigger group for constraint "" FOREIGN KEY cd_card(tender) REFERENCES cd_tender(id) DETAIL: Found referenced table's DELETE trigger. for the following statement CREATE CONSTR

Re: [GENERAL] slow select in big table

2009-04-03 Thread Tom Lane
rafalak writes: > QUERY PLAN without changes > Aggregate (cost=98018.96..98018.97 rows=1 width=4) (actual > time=64049.326..64049.328 rows=1 loops=1) > -> Bitmap Heap Scan on tbl_photos_keywords (cost=533.23..97940.02 > rows=31577 width=4) (actual time=157.787..63905.939 rows=119154 > loops=1

Re: [GENERAL] How to capture an interactive psql session in a log file?

2009-04-03 Thread Erik Jones
On Apr 2, 2009, at 11:07 PM, Gordon Shannon wrote: That does the trick, awesome! I do think it would be great if psql had a "stderr" capture in addition to stdout. While the recommendations to use script are perfect for the use case of capturing everything, including input, I think it'

Re: [GENERAL] slow select in big table

2009-04-03 Thread Sam Mason
On Fri, Apr 03, 2009 at 01:20:33AM -0700, rafalak wrote: > QUERY PLAN without changes > Aggregate (cost=98018.96..98018.97 rows=1 width=4) (actual > time=64049.326..64049.328 rows=1 loops=1) > -> Bitmap Heap Scan on tbl_photos_keywords (cost=533.23..97940.02 > rows=31577 width=4) (actual tim

Re: [GENERAL] How to capture an interactive psql session in a log file?

2009-04-03 Thread Mahlon E. Smith
On Fri, Apr 03, 2009, Scott Marlowe wrote: > On Fri, Apr 3, 2009 at 1:20 AM, A. Kretschmer > wrote: > > In response to Scott Marlowe : > >> On Thu, Apr 2, 2009 at 11:55 PM, Gordon Shannon wrote: > >> > > >> > What I'm trying to do doesn't seem like it should be that difficult or > >> > unusual, b

Re: [GENERAL] slow select in big table

2009-04-03 Thread rafalak
> shared_buffers = 810MB > temp_buffers = 128MB > work_mem = 512MB > maintenance_work_mem = 256MB > max_stack_depth = 7MB > effective_cache_size = 800MB QUERY PLAN without changes Aggregate (cost=98018.96..98018.97 rows=1 width=4) (actual time=64049.326..64049.328 rows=1 loops=1) -> Bitmap Hea

Re: [GENERAL] Rule or Function and Trigger?

2009-04-03 Thread Tom Lane
"James B. Byrne" writes: > I am beginning to migrate some functionality from an application > prototype into the DBMS. One of these elements is time stamping row > insertions and updates. > I have been reading about rules, functions and triggers in regards > to this issue. So, of course, now I

Re: [GENERAL] reducing IO and memory usage: sending the content of a table to multiple files

2009-04-03 Thread Sam Mason
On Fri, Apr 03, 2009 at 11:09:56AM +0200, Ivan Sergio Borgonovo wrote: > On Fri, 3 Apr 2009 02:05:19 +0100 Sam Mason wrote: > > On Thu, Apr 02, 2009 at 09:48:33PM +0200, Ivan Sergio Borgonovo wrote: > > > I didn't find any elegant example of cursor use in PHP... OK PHP > > > is not the most elegan

Re: [GENERAL] high load on server

2009-04-03 Thread Scott Marlowe
2009/4/3 Gerd König : > Hello, > > since 2 days ago we're facing an increased load on our database server > (opensuse10.3-64bit, PostgreSQL 8.3.5, 8GB Ram). This high load stays the > whole > working day. How man cores? > == > current situation: > == > #>top > top

[GENERAL] Rule or Function and Trigger?

2009-04-03 Thread James B. Byrne
I am beginning to migrate some functionality from an application prototype into the DBMS. One of these elements is time stamping row insertions and updates. I have been reading about rules, functions and triggers in regards to this issue. So, of course, now I have myself completely befuddled. F

[GENERAL] high load on server

2009-04-03 Thread Gerd König
Hello, since 2 days ago we're facing an increased load on our database server (opensuse10.3-64bit, PostgreSQL 8.3.5, 8GB Ram). This high load stays the whole working day. == current situation: == #>top top - 14:09:46 up 40 days, 8:08, 2 users, load average: 7.60,

Re: [GENERAL] reducing IO and memory usage: sending the content of a table to multiple files

2009-04-03 Thread Ivan Sergio Borgonovo
On Fri, 3 Apr 2009 02:05:19 +0100 Sam Mason wrote: > On Thu, Apr 02, 2009 at 09:48:33PM +0200, Ivan Sergio Borgonovo > wrote: > > I didn't find any elegant example of cursor use in PHP... OK PHP > > is not the most elegant language around... but still any good > > exapmle someone could point me a

Re: [GENERAL] %r in restore_command?

2009-04-03 Thread Duco Fijma
Alvaro Herrera wrote: Duco Fijma wrote: Please allow me to rephrase a question I asked on this list some time ago. Could somebody shine some light on what exactly influences the value of the %r parameter in the restore_command (as used in recovery.conf)? I'm using this in a hot-standby-con

Re: [GENERAL] How to capture an interactive psql session in a log file?

2009-04-03 Thread Scott Marlowe
On Fri, Apr 3, 2009 at 1:20 AM, A. Kretschmer wrote: > In response to Scott Marlowe : >> On Thu, Apr 2, 2009 at 11:55 PM, Gordon Shannon wrote: >> > >> > What I'm trying to do doesn't seem like it should be that difficult or >> > unusual, but I can't seem to find the right combination of commands

Re: [GENERAL] How to capture an interactive psql session in a log file?

2009-04-03 Thread A. Kretschmer
In response to Scott Marlowe : > On Thu, Apr 2, 2009 at 11:55 PM, Gordon Shannon wrote: > > > > What I'm trying to do doesn't seem like it should be that difficult or > > unusual, but I can't seem to find the right combination of commands to make > > it happen.  I want to have a log file that capt