Re: [GENERAL] recover corrupt DB?

2009-05-01 Thread Tom Lane
Craig Ringer writes: > These reports seem to come up a bit, with disk full issues resulting in > the need to pg_resetxlog, dump, and re-initdb, but I wouldn't be too > shocked if they all turned out to be on xfs or something like that. Well, there are cases where that might actually be the best s

Re: [GENERAL] Possible to prevent transaction abort?

2009-05-01 Thread Craig Ringer
Adam B wrote: > Hello all, > > Is it possible to prevent Postgre from aborting the transaction upon a > constraint violation? Not without use of savepoints. What I like to do is bulk-insert the suspect data into a temp table without constraints, then INSERT INTO ... SELECT it into the target ta

Re: [GENERAL] recover corrupt DB?

2009-05-01 Thread Craig Ringer
Tom Lane wrote: > Craig Ringer writes: >> I've been wondering about this for a while. Why does Pg end up with the >> database in an unusable, unrecoverable state after a disk-full error? > > It doesn't. There must have been some other filesystem misfeasance > involved in the OP's problem. Cool

[GENERAL] function in pgAdmin

2009-05-01 Thread rwade
How do I view the result set of a function that returns a refcursor in pgAdmin? I am trying to test it in pgadmin my calling it like this, but I can't see the result set, it only says: Query result with 1 rows discarded. Query result with 328 rows discarded. Query returned successfully with no r

Re: [GENERAL] Possible to prevent transaction abort?

2009-05-01 Thread Adam B
Perhaps I'm doing something wrong. I'm consistently taking over 20s for the following test case. (Without savepoints it takes under 10s) CREATE TABLE lots2 ( lid serial NOT NULL, "name" character varying(64), CONSTRAINT lots2pk PRIMARY KEY (lid), CONSTRAINT lots2_unique_name UNIQUE (nam

Re: [GENERAL] 08P01: unexpected EOF on client connection

2009-05-01 Thread Tomas Vondra
Hi, Tomas Vondra wrote: $conn = pg_connect(...); $res = pg_query("SELECT mime, thumbnail_data FROM images WHERE filename = "); $row = pg_fetch_assoc($row); header('Content-Type: ' . $row['mime']); echo pg_unescape_bytea($row['thumbnail_data']); PHP? Try running your script in a PHP debu

Re: [GENERAL] Possible to prevent transaction abort?

2009-05-01 Thread Adam B
I'm intrigued by this solution, Johan.  It might be just the ticket!  I'll do some benchmarks when I have time in a week or so. Johan Nel wrote: Adam B wrote: Hello all, Is it possible to prevent Postgre from aborting the transaction upon a constraint violation? >From th

Re: [GENERAL] Possible to prevent transaction abort?

2009-05-01 Thread Adam B
Strange indeed.  Perhaps there's some background stuff happening that messes with the results (auto VACUUM?). In my mind, however, it makes sense that it would take longer: 2 extra operations against the server (save&release). Thomas Kellerer wrote: Adam B wrote on 01.05.2009 22:59: Perh

Re: [GENERAL] Handling large number of OR/IN conditions

2009-05-01 Thread Tom Lane
Steve Atkins writes: > On May 1, 2009, at 2:42 PM, David Wall wrote: >> Does anybody know if PG will perform better with the table join >> instead of evaluating the series of OR/IN? The OR/IN has to be >> parsed, but the comparisons may be faster than the table join. > It used to be that pop

Re: [GENERAL] Possible to prevent transaction abort?

2009-05-01 Thread Thomas Kellerer
Adam B wrote on 01.05.2009 22:59: Perhaps I'm doing something wrong. I'm consistently taking over 20s for the following test case. (Without savepoints it takes under 10s) That's really strange. I can reproduce your results on my computer (25 vs. 65 seconds). When running my import progra

Re: [GENERAL] Handling large number of OR/IN conditions

2009-05-01 Thread Steve Atkins
On May 1, 2009, at 2:42 PM, David Wall wrote: (quoted from Chris) Select field1,field2 FROM table1 inner join relationships on table1.creator_user_id = relationships.employee WHERE relationships.manager = ? (quoted from Steve) select table1.field1, table2.field2 from table1, reports where

Re: [GENERAL] Online Backups PostGre

2009-05-01 Thread Adam Ruth
Cygwin comes with rsync on Windows. On 02/05/2009, at 4:06 AM, John R Pierce wrote: Joshua D. Drake wrote: Well that's just it. Out of the box it doesn't actually work. PostgreSQL only gives you the facilities to roll your own PITR solution. You can look at PITR Tools: https://projects.comm

Re: [GENERAL] Handling large number of OR/IN conditions

2009-05-01 Thread David Wall
(quoted from Chris) Select field1,field2 FROM table1 inner join relationships on table1.creator_user_id = relationships.employee WHERE relationships.manager = ? (quoted from Steve) select table1.field1, table2.field2 from table1, reports where table1.creator_user_id = reports.peon and report

Re: [GENERAL] Possible to prevent transaction abort?

2009-05-01 Thread Thomas Kellerer
Adam B wrote on 01.05.2009 19:50: I realize that I could set a save-point before every INSERT but that nearly doubles the processing time. That's interesting. I did a quick test with JDBC inserting 500,000 rows and the time when using a savepoint for each INSERT was not really different to t

Re: [GENERAL] Possible to prevent transaction abort?

2009-05-01 Thread Johan Nel
Adam B wrote: Hello all, Is it possible to prevent Postgre from aborting the transaction upon a constraint violation? From the help files maybe the following could get you on the right track: This example uses exception handling to perform either UPDATE or INSERT, as appropriate: CREATE TAB

Re: [GENERAL] Online Backups PostGre

2009-05-01 Thread Scott Marlowe
On Fri, May 1, 2009 at 12:06 PM, John R Pierce wrote: > Joshua D. Drake wrote: >> >> Well that's just it. Out of the box it doesn't actually work. PostgreSQL >> only gives you the facilities to roll your own PITR solution. You can >> look at PITR Tools: >> >> https://projects.commandprompt.com/pub

Re: [GENERAL] Handling large number of OR/IN conditions

2009-05-01 Thread Chris Spotts
A separate table for managing the relationships. One column for the manager and one for employee. Then you end up with a query like this. Select field1,field2 FROM table1 inner join relationships on table1.creator_user_id = relationships.employee WHERE relationships.manager = ? _ Fr

Re: [GENERAL] Handling large number of OR/IN conditions

2009-05-01 Thread Steve Atkins
On May 1, 2009, at 10:49 AM, David Wall wrote: We have a database report function that seemed clean when the number of users was small, but as the number of users grow, I was wondering if anybody had any good ideas about how to handle OR or IN for SELECTs. The general scenario is that a

Re: [GENERAL] Online Backups PostGre

2009-05-01 Thread Adrian Klaver
- "Joshua D. Drake" wrote: > On Fri, 2009-05-01 at 09:22 -0700, PostGre Newbie wrote: > > Hi everyone, > > > I searched the web and I know I should get a snapshot of the > > filesystem and then backup the WAL archive logs but this is the > part > > where I am confused. I do not know of any

[GENERAL] Handling large number of OR/IN conditions

2009-05-01 Thread David Wall
We have a database report function that seemed clean when the number of users was small, but as the number of users grow, I was wondering if anybody had any good ideas about how to handle OR or IN for SELECTs. The general scenario is that a manager runs reports that list all records that were

[GENERAL] Possible to prevent transaction abort?

2009-05-01 Thread Adam B
Hello all, Is it possible to prevent Postgre from aborting the transaction upon a constraint violation? Using JDBC if I catch the constraint violation and try another statement I get: /ERROR: current transaction is aborted, commands ignored until end of transaction block/ I realize that I

Re: [GENERAL] Online Backups PostGre

2009-05-01 Thread John R Pierce
Joshua D. Drake wrote: Well that's just it. Out of the box it doesn't actually work. PostgreSQL only gives you the facilities to roll your own PITR solution. You can look at PITR Tools: https://projects.commandprompt.com/public/pitrtools It doesn't quite work on Windows due to lack of rsync and

Re: [GENERAL] Online Backups PostGre

2009-05-01 Thread Alan Hodgson
On Friday 01 May 2009, PostGre Newbie wrote: >I do not know of any open source backup utilities > that can take snapshots of the filesystem. I get the overall concept > of online backups but I am still unclear EXACTLY how the system works. > I would be grateful if anyone could explain it to me. I

Re: [GENERAL] Online Backups PostGre

2009-05-01 Thread Joshua D. Drake
On Fri, 2009-05-01 at 09:47 -0700, Ben Chobot wrote: > On Fri, 1 May 2009, PostGre Newbie wrote: > > > I know that taking the backup of the whole database every 10 minutes > > is a very bad way to go about it but until I find a better way to do > > it, it will have to do for now. Any suggestions/t

Re: [GENERAL] Online Backups PostGre

2009-05-01 Thread Joshua D. Drake
On Fri, 2009-05-01 at 09:22 -0700, PostGre Newbie wrote: > Hi everyone, > I searched the web and I know I should get a snapshot of the > filesystem and then backup the WAL archive logs but this is the part > where I am confused. I do not know of any open source backup utilities > that can take sna

Re: [GENERAL] Online Backups PostGre

2009-05-01 Thread Ben Chobot
On Fri, 1 May 2009, PostGre Newbie wrote: I know that taking the backup of the whole database every 10 minutes is a very bad way to go about it but until I find a better way to do it, it will have to do for now. Any suggestions/tips/articles on how to do the backup would be appreciated very much

[GENERAL] Online Backups PostGre

2009-05-01 Thread PostGre Newbie
Hi everyone, I am new to PostGreSql but I have to use it at work. I have to take backups of the database every 10 mins so that work isn't lost in case of an accident. I use PostGreSql v8.1 on Windows XP. I have already set up a system that automatically takes the backup of the database every 10 m

Re: [GENERAL] Understand this error

2009-05-01 Thread Tom Lane
Craig Ringer writes: > Note that it's not very likely that PostgreSQL was the process that used > up all your memory. It was just unlucky enough to be picked as the one > to be killed, because the OOM killer is terrible at estimating which > process is using the most memory when programs like Post

Re: [GENERAL] Connecting to a postgreSQL database with windows CE over wi-fi; failing gracefully

2009-05-01 Thread Peter Geoghegan
Wow, a response from the famous Tom Lane to my lame problem :-) . > What I'd try is a "ping" to the database server, and not initiate any > libpq operation unless the server is answering pings.  If you get > a failure due to connectivity loss midway through an operation, > PQreset is appropriate t

Re: [GENERAL] Do TEMP Tables have an OID? Can this be a problem if used too frequently?

2009-05-01 Thread Tom Lane
"Raymond O'Donnell" writes: > On 30/04/2009 10:01, Phil Couling wrote: >> If so am I right to assume that, if the function is used too frequently, >> it could cause the database to crash by wraping OIDs? > I'd imagine that this depends on how often the database is VACUUMed. Wrapping around the O

Re: [GENERAL] recover corrupt DB?

2009-05-01 Thread Tom Lane
Craig Ringer writes: > I've been wondering about this for a while. Why does Pg end up with the > database in an unusable, unrecoverable state after a disk-full error? It doesn't. There must have been some other filesystem misfeasance involved in the OP's problem. regard

Fwd: [GENERAL] triggers and execute...

2009-05-01 Thread Dimitri Fontaine
Hi, it seems it didn't make it the first time. Début du message réexpédié : De : Dimitri Fontaine Date : 30 avril 2009 12:03:10 HAEC À : pgsql-general@postgresql.org Objet : Rép : [GENERAL] triggers and execute... On Monday 27 April 2009 22:32:22 Scott Marlowe wrote: OK, I'm hitting a wall he

Re: [GENERAL] Connecting to a postgreSQL database with windows CE over wi-fi; failing gracefully

2009-05-01 Thread Tom Lane
Peter Geoghegan writes: > I'm developing a PostgreSQL application for Windows CE 5 on a PDT/ PDA > in C++/Qt, using Hiroshi Saito's libpq port for that platform. Since > the connection is established over wi-fi, and wi-fi connectivity is > often flaky, I feel that I have to "fail gracefully" to as

Re: [GENERAL] ERROR: syntax error at or near "IF"... why?

2009-05-01 Thread Sam Mason
On Wed, Apr 29, 2009 at 07:54:20AM -0700, DaNieL wrote: > ERROR: syntax error at or near "IF" > > Where am i mistaken? > > p.s: dont focus on the example functionality, its just a trial for me > to understand the transactions.. and now, the IF clause... As others have said, IF statements are on

Re: [GENERAL] Re: Mapping output from a SEQUENCE into something non-repeating/colliding but random-looking?

2009-05-01 Thread Bill Moran
In response to Craig Ringer : > Bill Moran wrote: > > > Sounds like you're reinventing message digests ... [snip your comments about why I was wrong about MDs working] > So long as I don't call it "xor encryption" ... sigh. > > > Most of the systems I've seen like this do one of a few things:

Re: [GENERAL] Re: Connecting to a postgreSQL database with windows CE over wi-fi; failing gracefully

2009-05-01 Thread Peter Geoghegan
It now appears that I was presumptuous in blaming libpq for my application's shutdown. It probably was down to a problem with the way I was remote debugging the application - a fluke. I can now get the message to appear, and then re-establish a connection by either disconnecting and reconnecting t

Re: [GENERAL] Re: Connecting to a postgreSQL database with windows CE over wi-fi; failing gracefully

2009-05-01 Thread Craig Ringer
Peter Geoghegan wrote: > though, but it does. My guess is that libpq is calling abort() or > something similar, directly or indirectly. I know that would cause an > error message with windows XP, but windows CE is funny. Maybe this is a stupid question (I don't really do WinCE) but ... can't you

Re: [GENERAL] Pgsql errors, DBI and CGI::Carp

2009-05-01 Thread Daniel Verite
Toomas Vendelin wrote: I'm writing CGI scripts in Perl using Postgresql via DBI interface. RAISE_ERROR is on. For some reason (unlike with MySQL), when a Perl script dies from Postgresql error, the line number of Perl script where the error occurred is not reported, just the SQL s

Re: [GENERAL] Re: Mapping output from a SEQUENCE into something non-repeating/colliding but random-looking?

2009-05-01 Thread Craig Ringer
Bill Moran wrote: > Sounds like you're reinventing message digests ... Message digests do not guarantee non-colliding output for a given input. They provide a result UNLIKELY to collide for any reasonable set of inputs. They need to produce quite large output values to do this effectively. Trunc

Re: [GENERAL] Re: Connecting to a postgreSQL database with windows CE over wi-fi; failing gracefully

2009-05-01 Thread Peter Geoghegan
I apologise for the duplicate posts - my initial post wasn't appearing on the mailing list archives hours later, and someone in #postgresql said that there was a problem with the service provider, so I thought I'd resend. > such an approach is doomed to failure, you have just implemented a > race

[GENERAL] xml not enabled by default on rhel4 packages from commandprompt

2009-05-01 Thread Grzegorz Jaśkiewicz
Any idea why xml support is off ? The libxml2, version 2.6.23 is there on centos4.7 (which is what I am using), is there any known problem with xml that it is off, or is just because they wanted to make sure that the package is going to work in versions prior to 4.7 as well ?? any ideas ? -- GJ

Re: [GENERAL] Re: Mapping output from a SEQUENCE into something non-repeating/colliding but random-looking?

2009-05-01 Thread Bill Moran
In response to Jasen Betts : > On 2009-04-30, Craig Ringer wrote: > > Hi > > > > This must be a fairly common requirement, but either I don't know how to > > ask Google about it or there's not as much out there as I would've expected. > > > > I'm looking for a way to map the output from a monoton

Re: [GENERAL] recover corrupt DB?

2009-05-01 Thread Craig Ringer
> On all our servers we have a cron job that runs daily and reports disk > usage stats. > Maybe you need something similar. Of course. I have Cacti running to monitor disk usage on all my servers. That doesn't help if a user creates several duplicates of a huge table, or otherwise gobbles disk s

Re: [GENERAL] Any way to execute ad-hoc pl/pgsql?

2009-05-01 Thread Keaton Adams
You can wrap a temporary function in a script and call it this way: keaton:811:~$more my_shell_script.sh #!/bin/bash OS=`uname -s` PSQL="/usr/bin/psql" USERNAME="postgres" export PGPASSWORD="${PASSWORD}" DATABASE="mydatabase" ${PSQL} "${DATABASE}" -U "${USERNAME}" << EOF BEGIN; CREATE OR REPLA

Re: [GENERAL] recover corrupt DB?

2009-05-01 Thread Steve Clark
Craig Ringer wrote: Peter Eisentraut wrote: On Thursday 23 April 2009 18:30:27 Dan Armbrust wrote: I had a test system (read as not backed up, sigh) which had the disk go full while PostgreSQL was loaded, consequently, PostgreSQL will no longer start. It is logging an error about detecting an

Re: [GENERAL] ERROR: syntax error at or near "IF"... why?

2009-05-01 Thread Chris Spotts
Could if be referencing the second IF..the one in your "END IF" that doesn't have a semicolon after it...? -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of DaNieL Sent: Wednesday, April 29, 2009 9:54 AM To: pgsql-general@p

[GENERAL] Re: Mapping output from a SEQUENCE into something non-repeating/colliding but random-looking?

2009-05-01 Thread Jasen Betts
On 2009-04-30, Craig Ringer wrote: > Hi > > This must be a fairly common requirement, but either I don't know how to > ask Google about it or there's not as much out there as I would've expected. > > I'm looking for a way to map the output from a monotonically increasing > sequence (not necessaril

Re: [GENERAL] Export Data from one DB and Import into a new DB

2009-05-01 Thread Jasen Betts
On 2009-04-29, Stefan Sturm wrote: > Hello, > > we are changing the structure of our database from a new release. > Now we need to export large amounts of data and import it into the new > db( with a new structure). > > Are there any tools( for osx ) to support me doing this? last time I had to c

Re: [GENERAL] Any way to execute ad-hoc pl/pgsql?

2009-05-01 Thread Craig Ringer
Carlo Stonebanks wrote: > (I suppose one possibility would be something that created a temporary > stored proc to execute the code, then cleaned up after itself.) Yep, that's what I do - CREATE FUNCTION fred() RETURNS blah AS $$ $$ LANGUAGE 'plpgsql'; SELECT fred(); DROP FUNCTION fred(); I've

Re: [GENERAL] Any way to execute ad-hoc pl/pgsql?

2009-05-01 Thread Jasen Betts
On 2009-05-01, Carlo Stonebanks wrote: > One of our developers asked me, "is there any way to execute arbitrary > plpgsql"? By that I beleive he means: is there some way to execute ad-hoc > pl/pgsql code without creating a stored procedure or a function? no. arbitrary SQL is no problem, arbi

[GENERAL] Re: Connecting to a postgreSQL database with windows CE over wi-fi; failing gracefully

2009-05-01 Thread Jasen Betts
On 2009-04-29, Peter Geoghegan wrote: > Hello, > > I'm developing a PostgreSQL application for Windows CE 5 on a PDT/ PDA > in C++/Qt, using Hiroshi Saito's libpq port for that platform. Since > the connection is established over wi-fi, and wi-fi connectivity is > often flaky, I feel that I have t

Re: [GENERAL] Importing large objects from the client side programatically.

2009-05-01 Thread Daniel Verite
Andrew Maclean wrote: I am using C++ and trying to programatically import a large object from the client side into a server. In that context, the simplest way is to use libpq's C functions: http://www.postgresql.org/docs/8.3/static/lo-interfaces.html Best regards, -- Daniel PostgreSQL

Re: [GENERAL] ERROR: syntax error at or near "IF"... why?

2009-05-01 Thread Johan Nel
Daniel, IF (SELECT credit FROM users WHERE name = 'mary') < 0 THEN ROLLBACK; END IF COMMIT; i always get the error ERROR: syntax error at or near "IF" Where am i mistaken? SELECT returns in essence a record or setof records. DECLARE _credit int; ... SELECT credit FROM users WHERE name = '

Re: [GENERAL] Do TEMP Tables have an OID? Can this be a problem if used too frequently?

2009-05-01 Thread Raymond O'Donnell
On 30/04/2009 10:01, Phil Couling wrote: > I've just written a search function which creates a temp table, preforms > some reasoning on it returning results then drops it again. > I'm using temp tables in an attempt to gain efficiency (not repeating > work between one section of the function and a

[GENERAL] ERROR: syntax error at or near "IF"... why?

2009-05-01 Thread DaNieL
Hi guys, im new with postgresql, and already got my first problem.. Well, I wroted some code for understend how the transaction works, following step by step the manual. TO make it short, i've created 2 tables, user and movements: in the firs one there are the name, email and credit colons, in th

Re: [GENERAL] Any way to execute ad-hoc pl/pgsql?

2009-05-01 Thread Dave Page
On Fri, May 1, 2009 at 6:25 AM, Carlo Stonebanks wrote: > One of our developers asked me, "is there any way to execute arbitrary > plpgsql"? By that I beleive he means: is there some way to execute ad-hoc > pl/pgsql code without creating a stored procedure or a function? > > I believe MS SQL Serve

Re: [GENERAL] Understand this error

2009-05-01 Thread Dennis Brakhane
On Thu, Apr 30, 2009 at 3:00 PM, paulo matadr wrote: > Hi all, > my database entry in mode recovery, > analyzing my pg_log I seem this: > system logger process (PID 6517) was terminated by signal 9 > background writer process (PID 6519) was terminated by signal 9 > terminating any other active ser

Re: [GENERAL] 08P01: unexpected EOF on client connection

2009-05-01 Thread Craig Ringer
Tomas Vondra wrote: > $conn = pg_connect(...); > $res = pg_query("SELECT mime, thumbnail_data FROM images WHERE filename > = "); > $row = pg_fetch_assoc($row); > header('Content-Type: ' . $row['mime']); > echo pg_unescape_bytea($row['thumbnail_data']); PHP? Try running your script in a PHP d

Re: [GENERAL] could not bind IPv4 socket

2009-05-01 Thread Craig Ringer
Greg Smith wrote: > Normal practice here is to set: > > listen_address='*' > > So that the server is remotely accessible from all of its interfaces, > and then you can do all filtering of who can connect just via > pg_hba.conf instead. Just to expand on that: listen_addresses is usually used i

[GENERAL] Importing large objects from the client side programatically.

2009-05-01 Thread Andrew Maclean
I am using C++ and trying to programatically import a large object from the client side into a server. I am using QT and, for the server side I can pass a command like: insert into x values('x1',lo_import('c:/temp/x1.txt')); Which works. However this will not work from the client side. For the cli

[GENERAL] pg_dump and pg_restore problem

2009-05-01 Thread Michele Petrazzo - Unipex
Hi all, I had a big problem that made me crazy... I want to simple backup some tables from a my db and restore them to another. My db: table_two( id serial PRIMARY KEY, ... ) table_one ( id serial PRIMARY KEY, real_name text NOT NULL, username text NOT NULL, id_table_two i

Re: [GENERAL] Understand this error

2009-05-01 Thread Craig Ringer
paulo matadr wrote: > Hi all, > my database entry in mode recovery, > analyzing my pg_log I seem this: > > system logger process (PID 6517) was terminated by signal 9 > background writer process (PID 6519) was terminated by signal 9 > terminating any other active server processes You haven't told

[GENERAL] Any way to execute ad-hoc pl/pgsql?

2009-05-01 Thread Carlo Stonebanks
One of our developers asked me, "is there any way to execute arbitrary plpgsql"? By that I beleive he means: is there some way to execute ad-hoc pl/pgsql code without creating a stored procedure or a function? I believe MS SQL Server can do this - has any one heard of some sort of command shel

Re: [GENERAL] retrieving primary key for row with MIN function

2009-05-01 Thread Erick Papadakis
Could you end the query with a "LIMIT 1"? SELECT h.id AS host_id, MIN(r.start_date) AS reservation_start_date, r.id AS reservation_id FROM hosts h LEFT OUTER JOIN reservation_hosts rh ON rh.host_id = h.id LEFT OUTER JOIN reservation r ON r.id = rh.reservation_id AND (r.start_date, r.end_date) OVE

Re: [GENERAL] Time zone HADT timestamp syntax error in trigger

2009-05-01 Thread Tom Lane
John Smithus writes: > [ 'HADT' is not recognized as a timezone abbreviation ] > The server is running PostgreSQL 8.3.7 on an AMD64 Gentoo Linux > machine. The system time zone is set to 'America/Adak' and datestyle > is set to 'sql, mdy' in postgresql.conf. Not every timezone abbreviation in the

Re: [GENERAL] recover corrupt DB?

2009-05-01 Thread Craig Ringer
Peter Eisentraut wrote: On Thursday 23 April 2009 18:30:27 Dan Armbrust wrote: I had a test system (read as not backed up, sigh) which had the disk go full while PostgreSQL was loaded, consequently, PostgreSQL will no longer start. It is logging an error about detecting an invalid shutdown, try

Re: [GENERAL] triggers and execute...

2009-05-01 Thread Alban Hertroys
On Apr 29, 2009, at 4:20 AM, Scott Marlowe wrote: Oh man, it just gets worse. I really need a simple elegant solution here, because if I try to build the query by hand null inputs make life a nightmare. I had built something like this: q = 'insert into '||schem||'.page_access_'||part||' value

[GENERAL] Tracking down a deadlock

2009-05-01 Thread Bill Moseley
I need a bit of help understanding what might be causing a deadlock. To duplicate the problem I'm running a test script that forks two child processes. Each child runs the same transaction and thus the order of execution is exactly the same. (i.e. not like the typical deadlock where the order o

Re: [GENERAL] triggers and execute...

2009-05-01 Thread Scott Marlowe
On Tue, Apr 28, 2009 at 10:46 PM, David Fetter wrote: > On Tue, Apr 28, 2009 at 08:20:34PM -0600, Scott Marlowe wrote: >> On Mon, Apr 27, 2009 at 3:24 PM, Richard Broersma >> wrote: >> > On Mon, Apr 27, 2009 at 1:32 PM, Scott Marlowe >> > wrote: >> >> OK, I'm hitting a wall here.  I've written

[GENERAL] Do TEMP Tables have an OID? Can this be a problem if used too frequently?

2009-05-01 Thread Phil Couling
Hi I've just written a search function which creates a temp table, preforms some reasoning on it returning results then drops it again. I'm using temp tables in an attempt to gain efficiency (not repeating work between one section of the function and another). However I'm worried that there ma

[GENERAL] Two Questions Re: Warm Backup

2009-05-01 Thread Terry Lee Tucker
Greetings: We are researching implementing a warm backup solution for our existing databases. We have a two node cluster running RH which are connected to a SAN. There is a total of 11 database clusters with the two node linux cluster balancing the load. At the moment, we are not doing any WAL

[GENERAL] Export Data from one DB and Import into a new DB

2009-05-01 Thread Stefan Sturm
Hello, we are changing the structure of our database from a new release. Now we need to export large amounts of data and import it into the new db( with a new structure). Are there any tools( for osx ) to support me doing this? Thanks for your help, Stefan Sturm -- Sent via pgsql-general maili