Re: [ADMIN] out of memory error

2010-09-03 Thread Silvio Brandani
Tom Lane ha scritto: Silvio Brandani silvio.brand...@tech.sdb.it writes: Tom Lane ha scritto: Is it really the *exact* same query both ways, or are you doing something like parameterizing the query in the application? Is it exactly the same, the query text is from the

Re: [ADMIN] out of memory error

2010-09-03 Thread Silvio Brandani
Tom Lane ha scritto: Silvio Brandani silvio.brand...@tech.sdb.it writes: Tom Lane ha scritto: Is it really the *exact* same query both ways, or are you doing something like parameterizing the query in the application? Is it exactly the same, the query text is from the

Re: [ADMIN] Autovacuum and invalid page header

2010-09-03 Thread Ireneusz Pluta
Tom Lane pisze: Alvaro Herrera alvhe...@alvh.no-ip.org writes: Yeah, maybe we should make it put the failed table at the end of the list, for the next run. This is not simple to implement, if only because autovac workers don't have any way to persist state from one run to the next. But

Re: [ADMIN] Autovacuum and invalid page header

2010-09-03 Thread Ireneusz Pluta
Kevin Grittner pisze: Ireneusz Pluta ipl...@wp.pl wrote: Is there any ready tool, which, for instance when given a path to database cluster, would traverse all cluster directories and files and check all page headers? I probably answered myself - manual VACUUM [VERBOSE] would do - but it

[ADMIN] fail-safe sql update triggers

2010-09-03 Thread Michael Monnerie
I want to log all activity from a table to a old_table. Creating an ON INSERT trigger is simple, it just needs to INSERT INTO old_filter SELECT NEW.*; in a procedure that is called via the trigger. But what about updates? There is no simple UPDATE old_filter SET NEW.* WHERE id=NEW.id; so I

Re: [ADMIN] fail-safe sql update triggers

2010-09-03 Thread Kevin Grittner
Michael Monneriemichael.monne...@is.it-management.at wrote: But that is error prone, because when the filter table is changed to have a new column, the UPDATE statement would not contain it. Is there a fail-proof shortcut? You might draw inspiration for a C-based solution from Andrew

Re: [ADMIN] fail-safe sql update triggers

2010-09-03 Thread Rob Richardson
I thought I sent this earlier, but it's not in my Sent box, so I'll try again. Your solution maintains an exact copy of two tables. Whenever a record is updated in the first, it is updated in the second, and you have lost information about the previous value. Whenever I do anything like this,

Re: [ADMIN] Confused by 'timing' results

2010-09-03 Thread A J
Just to give an update, changing pg_log to a different drive that is write cache enabled (and to further make it fast, kept it data=writeback), helped quite a bit. The average time for several clients hitting concurrently was 15ms each for east-coast as well as west-coast clients. Still some

Re: [ADMIN] fail-safe sql update triggers

2010-09-03 Thread Michael Monnerie
On Freitag, 3. September 2010 Rob Richardson wrote: Your solution maintains an exact copy of two tables. Whenever a record is updated in the first, it is updated in the second, and you have lost information about the previous value. I have a table filter where the real work is done. Data

Re: [ADMIN] fail-safe sql update triggers

2010-09-03 Thread Michael Monnerie
On Freitag, 3. September 2010 Kevin Grittner wrote: You might draw inspiration for a C-based solution from Andrew Dunstan's minimal update code. Sorry that is too code-ish for me. I looked into it, but didn't see an UPDATE statement that I'd need. -- mit freundlichen GrĂ¼ssen, Michael

[ADMIN] plpgsql language differences betw 7.4 and 8.0

2010-09-03 Thread Ralph Smith
Hi, I'm stuck using v7.4 and more than once I've come across examples that just don't work here. e.g.: CREATE or ...FUNCTION AS $mydelim$ $mydelim$ doesn't work but plain old apostrophe does. Now it looks like ELSIF is different. Is there a location where I can find these changes?

Re: [ADMIN] plpgsql language differences betw 7.4 and 8.0

2010-09-03 Thread Tom Lane
Ralph Smith rsm...@10kinfo.com writes: I'm stuck using v7.4 and more than once I've come across examples that just don't work here. e.g.: CREATE or ...FUNCTION AS $mydelim$ $mydelim$ doesn't work but plain old apostrophe does. Now it looks like ELSIF is different. Is there a