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

2009-04-03 Thread Gordon Shannon
That does the trick, awesome! I do think it would be great if psql had a stderr capture in addition to stdout. Thanks hubert depesz lubaczewski-2 wrote: On Thu, Apr 02, 2009 at 10:55:10PM -0700, Gordon Shannon wrote: Has anyone solved this issue before? have you seen program script?

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

2009-04-03 Thread Scott Marlowe
On Thu, Apr 2, 2009 at 11:55 PM, Gordon Shannon gordo...@gmail.com 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 captures everything from an

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 gordo...@gmail.com 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

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 andreas.kretsch...@schollglas.com wrote: In response to Scott Marlowe : On Thu, Apr 2, 2009 at 11:55 PM, Gordon Shannon gordo...@gmail.com wrote: What I'm trying to do doesn't seem like it should be that difficult or unusual, but I can't seem

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

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 s...@samason.me.uk 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

[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,

[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.

Re: [GENERAL] high load on server

2009-04-03 Thread Scott Marlowe
2009/4/3 Gerd König koe...@transporeon.com: 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: ==

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 s...@samason.me.uk 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

Re: [GENERAL] Rule or Function and Trigger?

2009-04-03 Thread Tom Lane
James B. Byrne byrn...@harte-lyne.ca 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

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 Heap Scan

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 andreas.kretsch...@schollglas.com wrote: In response to Scott Marlowe : On Thu, Apr 2, 2009 at 11:55 PM, Gordon Shannon gordo...@gmail.com wrote: What I'm trying to do doesn't seem like it should

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

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's

Re: [GENERAL] slow select in big table

2009-04-03 Thread Tom Lane
rafalak rafa...@gmail.com 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

[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 unnamed FOREIGN KEY cd_card(tender) REFERENCES cd_tender(id) DETAIL: Found referenced table's DELETE trigger. for the following statement CREATE

Re: [GENERAL] constraint trigger

2009-04-03 Thread Tom Lane
Komaravolu, Satya satya.komarav...@gilbarco.com writes: I'm running into the following error when i create a CONSTRAINT TRIGGER. NOTICE: ignoring incomplete trigger group for constraint unnamed FOREIGN KEY cd_card(tender) REFERENCES cd_tender(id) DETAIL: Found referenced table's

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 koe...@transporeon.com: 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?

Re: [GENERAL] constraint trigger

2009-04-03 Thread Tom Lane
Komaravolu, Satya satya.komarav...@gilbarco.com 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 unnamed FOREIGN KEY

Re: [GENERAL] high load on server

2009-04-03 Thread Scott Marlowe
On Fri, Apr 3, 2009 at 12:35 PM, Gerd Koenig koe...@transporeon.com 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

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 koe...@transporeon.com: 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?

Re: [GENERAL] high load on server

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