Re: [GENERAL] How to create a multi-column index with 2 dates using 'gist'?

2009-08-25 Thread Sam Mason
On Mon, Aug 24, 2009 at 05:24:59PM +0800, Fred Janon wrote: I am using 8.3 and pgAdmin III. I have a couple of tables using 2 DATE columns like 'startdate' and 'enddate' (just date, not interested in time in these columns). I have some queries (some using OVERLAPS) involving both 'startdate'

Re: [GENERAL] How to create a multi-column index with 2 dates using 'gist'?

2009-08-25 Thread Fred Janon
Thanks Sam. I looked at the gist documentation and although it would be fun, I don't have the time at the moment to explore that avenue (and scratching my head!). I also think it would require a lot of work testing to validate the code and that the gist index is better than the B-tree one. So I am

Re: [GENERAL] How to create a multi-column index with 2 dates using 'gist'?

2009-08-25 Thread Sam Mason
On Tue, Aug 25, 2009 at 07:39:26PM +0800, Fred Janon wrote: Basically I have an events table representing events with a duration (startdate, enddate). I was wondering if it would improve the performance if I was creating a separate table (indexed as you suggested) with the date ranges

[GENERAL] backup and recovery problem

2009-08-25 Thread chanda roopesh
Hi, i want to know is there any automated backup and recovery process for postgres 8.3 if not can you suggest me how to handle on Windows Server 2003 and Linux. Thanks in Advance..

[GENERAL] ETL software and training

2009-08-25 Thread Rstat
Hi all, We are in the process of getting an ETL program. We need it to perform some basic extract, transform and load jobs. But we want to get an open source tool with good training. Our team is mainly business oriented, with some computer knowledge. We would like to have someone come to our

Re: [GENERAL] ETL software and training

2009-08-25 Thread tv
I guess Talend (Open Studio) might be the right choice. But I do not have direct experience with the training. see www.talend.com Hi all, We are in the process of getting an ETL program. We need it to perform some basic extract, transform and load jobs. But we want to get an open source

Re: [GENERAL] ETL software and training

2009-08-25 Thread Devrim GÜNDÜZ
On Tue, 2009-08-25 at 02:50 -0700, Rstat wrote: So would someone know which open source companies offer ETL tools with good training and how much time would it take? I'd contact Pentaho: http://www.pentaho.com/services/training/ Regards, -- Devrim GÜNDÜZ, RHCE Command Prompt -

[GENERAL] Invalid memory alloc request

2009-08-25 Thread Guy Helmer
On systems running Postgresql 8.3.6, I have a nightly backup using pg_dump that failed on two machines overnight with this error: pg_dump: SQL command failed pg_dump: Error message from server: ERROR: invalid memory alloc request size 1376006425 pg_dump: The command was: COPY public.tablename

Re: [GENERAL] Invalid memory alloc request

2009-08-25 Thread Tom Lane
Guy Helmer ghel...@palisadesys.com writes: On systems running Postgresql 8.3.6, I have a nightly backup using pg_dump that failed on two machines overnight with this error: pg_dump: SQL command failed pg_dump: Error message from server: ERROR: invalid memory alloc request size 1376006425

Re: [GENERAL] New database or New Schema?

2009-08-25 Thread Eric Comeau
David Fetter da...@fetter.org wrote in message news:20090821170259.ga6...@fetter.org... On Fri, Aug 21, 2009 at 12:16:45PM -0400, Eric Comeau wrote: In the next release of our software the developers are moving to JBoss and have introduced the use of JBoss Messaging. They want to change from

Re: [GENERAL] backup and recovery problem

2009-08-25 Thread Craig Ringer
On 25/08/2009 8:12 PM, chanda roopesh wrote: Hi, i want to know is there any automated backup and recovery process for postgres 8.3 if not can you suggest me how to handle on Windows Server 2003 and Linux. Linux: pg_dump and cron (or ideally your existing backup scheduler via an external

Re: R: [GENERAL] Field's position in Table

2009-08-25 Thread Alvaro Herrera
Michael Gould wrote: I come from the Sybase world and more SQL Anywhere. This is a feature that has been asked for on several occassions. I believe that it is on the feature list for V12. The only reason that it has been asked for is because of how rows are stored on a page. Only the 1st

[GENERAL] once:radix version 1.5 released

2009-08-25 Thread Rob Napier
Hi! Six years ago, my fledgling business made a tactical decision: To put all our faith in PostgreSQL as the database on which to build an entirely new type of software. once:radix has become the world's first browser-based Rapid Application Development system. Despite the time we have been at

Re: [GENERAL] How to simulate crashes of PostgreSQL?

2009-08-25 Thread Vick Khera
On Sat, Aug 22, 2009 at 6:55 PM, Greg Sabino Mullaneg...@turnstep.com wrote: A server crash is a pretty rare event in the Postgres world, so I would not spend too many cycles on this... I had one the other day caused by server resource issues: I ran out of file descriptors when I had a very

Re: [GENERAL] Invalid memory alloc request

2009-08-25 Thread Guy Helmer
Tom Lane wrote: Guy Helmer ghel...@palisadesys.com writes: On systems running Postgresql 8.3.6, I have a nightly backup using pg_dump that failed on two machines overnight with this error: pg_dump: SQL command failed pg_dump: Error message from server: ERROR: invalid memory alloc

Re: [GENERAL] How to simulate crashes of PostgreSQL?

2009-08-25 Thread Merlin Moncure
On Mon, Aug 24, 2009 at 2:10 AM, Scott Marlowescott.marl...@gmail.com wrote: On Sat, Aug 22, 2009 at 4:55 PM, Greg Sabino Mullaneg...@turnstep.com wrote: A server crash is a pretty rare event in the Postgres world, so I would not spend too many cycles on this... I've been running pg in

Re: R: [GENERAL] Field's position in Table

2009-08-25 Thread Tino Wildenhain
Alvaro Herrera wrote: Michael Gould wrote: ... doesn't need to look at the overflow page. I don't know if this is true or not in PostGres. If it isn't then I'm not sure what difference it would make other than allowing for pretty documentation. Postgres does not overflow pages. Tuples are

Re: [GENERAL] New database or New Schema?

2009-08-25 Thread Filip Rembiałkowski
2009/8/25 Eric Comeau ecom...@signiant.com David Fetter da...@fetter.org wrote in message news:20090821170259.ga6...@fetter.org... On Fri, Aug 21, 2009 at 12:16:45PM -0400, Eric Comeau wrote: In the next release of our software the developers are moving to JBoss and have introduced the

Re: [GENERAL] view table pkey values

2009-08-25 Thread Scott Frankel
Thanks for the thorough explanation and link to more docs. Very much appreciated! Scott On Aug 24, 2009, at 11:03 AM, Raymond O'Donnell wrote: On 24/08/2009 18:37, Scott Frankel wrote: If I understand how tables are managed internally, there are 2 sequences: my explicit foo_id and

[GENERAL] WAL Shipping + checkpoint

2009-08-25 Thread Sébastien Lardière
Hi All, I've a cluster ( Pg 8.3.7 ) with WAL Shipping, and a few hours ago, the master had to restart. I use walmgr from Skytools, which works very well. I have already restart the master without any problem, but today, the slave doesn't work like I want. The field Time of latest checkpoint

Re: [GENERAL] Invalid memory alloc request

2009-08-25 Thread Tom Lane
Guy Helmer ghel...@palisadesys.com writes: Tom Lane wrote: Normally I'd say data corruption, but it is odd if you got the identical message from two different machines. Can you reproduce it with a debugger attached? If so, a backtrace from the call of errfinish might be useful. Yes, here

Re: [GENERAL] ETL software and training

2009-08-25 Thread Martin Gainty
*If commandprompt does not offer classroom or online training* for comprehensive classroom ETL training for all DB's you may wish to contact http://www.aictrain.com for online training curriculae you may want to contact http://www.champlain.edu/News-and-Events/News/Online-Ranking.html Let me

[GENERAL] somewhat slow query with subselect

2009-08-25 Thread Marcus Engene
Hi list, I have a table, not that many rows (400k) but with about 55 columns. There are some maintenance selects I want to do (every now and then) that I don't want to add indexes for. select ... from quite_big_table qbt where qbt.owner = 123 AND exists ( select null

Re: R: [GENERAL] Field's position in Table

2009-08-25 Thread Alvaro Herrera
Tino Wildenhain wrote: And which is quite easily done by: [ some SQL commands ] Yeah, there are workarounds, but they have limitations -- they don't work with FKs, they don't work if there's inheritance, they lose indexes, and so on. They remind me how our CLUSTER command worked in 7.1.

Re: [GENERAL] Invalid memory alloc request

2009-08-25 Thread Guy Helmer
Tom Lane wrote: Guy Helmer ghel...@palisadesys.com writes: Tom Lane wrote: Normally I'd say data corruption, but it is odd if you got the identical message from two different machines. Can you reproduce it with a debugger attached? If so, a backtrace from the call of errfinish might

Re: [GENERAL] somewhat slow query with subselect

2009-08-25 Thread Tom Lane
Marcus Engene meng...@engene.se writes: ... In a case with some 5000 rows belonging to owner 123, this select really takes a long time. Way longer than without the subselect and order by filelength. I agree that with the subselect it would take some extra juice, but in my mind it would do

Re: [GENERAL] warm standby and reciprocating failover

2009-08-25 Thread james bardin
On Mon, Aug 24, 2009 at 12:45 PM, james bardinjbar...@bu.edu wrote: I tried recovery_target_timeline='X' on the standby, where X is the new timeline created after recovery on the new master. This fails, with some unexpected timeline ID lines and a PANIC:  could not locate a valid checkpoint

Re: [GENERAL] Invalid memory alloc request

2009-08-25 Thread Tom Lane
Guy Helmer ghel...@palisadesys.com writes: On the system where I captured the backtrace, there are several 400MB-long entries in the textdata column. I inserted these entries by doing an INSERT (..., textdata) VALUES (..., $1), mmap'ed the data from a file into memory, and executed the

Re: [GENERAL] How to simulate crashes of PostgreSQL?

2009-08-25 Thread Alvaro Herrera
Vick Khera wrote: On Sat, Aug 22, 2009 at 6:55 PM, Greg Sabino Mullaneg...@turnstep.com wrote: A server crash is a pretty rare event in the Postgres world, so I would not spend too many cycles on this... I had one the other day caused by server resource issues: I ran out of file

Re: [GENERAL] How to simulate crashes of PostgreSQL?

2009-08-25 Thread Vick Khera
On Tue, Aug 25, 2009 at 1:09 PM, Alvaro Herreraalvhe...@commandprompt.com wrote: Vick Khera wrote: On Sat, Aug 22, 2009 at 6:55 PM, Greg Sabino Mullaneg...@turnstep.com wrote: A server crash is a pretty rare event in the Postgres world, so I would not spend too many cycles on this... I

Re: [GENERAL] How to simulate crashes of PostgreSQL?

2009-08-25 Thread Tom Lane
Vick Khera vi...@khera.org writes: On Tue, Aug 25, 2009 at 1:09 PM, Alvaro Herreraalvhe...@commandprompt.com wrote: PG is not supposed to crash when it runs out of file descriptors.  In fact there's a whole abstraction layer to ensure this does not happen. From my syslog: Aug 21 15:11:13

Re: [GENERAL] somewhat slow query with subselect

2009-08-25 Thread Marcus Engene
Tom Lane wrote: Marcus Engene meng...@engene.se writes: ... In a case with some 5000 rows belonging to owner 123, this select really takes a long time. Way longer than without the subselect and order by filelength. I agree that with the subselect it would take some extra juice, but in my

[GENERAL] PL/pgSQL infinite loop in UPDATE/INSERT example

2009-08-25 Thread Michael Brown
Hi, I believe that Example 38-2 (Exceptions with UPDATE/INSERT) in the PL/pgSQL documentation suffers from a race condition leading to a potential infinite loop when running at isolation level SERIALIZABLE. Here's the relevant code, for reference (copied straight from the 8.4 documentation):

Re: [GENERAL] How to simulate crashes of PostgreSQL?

2009-08-25 Thread Vick Khera
On Tue, Aug 25, 2009 at 2:49 PM, Alvaro Herreraalvhe...@commandprompt.com wrote: Vivek, do you see this error message before the PANIC? LOG:    out of file descriptors: %m; release and retry Nope. no mention of release in that log file. I have a handful of lines like these: ERROR: could

Re: [GENERAL] How to simulate crashes of PostgreSQL?

2009-08-25 Thread Alvaro Herrera
Tom Lane wrote: Vick Khera vi...@khera.org writes: On Tue, Aug 25, 2009 at 1:09 PM, Alvaro Herreraalvhe...@commandprompt.com wrote: PG is not supposed to crash when it runs out of file descriptors. �In fact there's a whole abstraction layer to ensure this does not happen. From my

Re: [GENERAL] How to simulate crashes of PostgreSQL?

2009-08-25 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: Would it be worth for walwriter to grab a dozen of dummy fd's? I don't think so. As you point out, we could never positively guarantee no ENFILE failures anyway. If we were in an out-of-FDs situation, any such cushion would get whittled down to

[GENERAL] Importing Mangled SQL File via psql

2009-08-25 Thread APseudoUtopia
Hey list, I have a dump of a table from a mysql database. I spent the last two days running search-and-replace regexes and other such formatting changes in order to get it loadable into PostgreSQL. I finally got to what seemed like the end of the process, when this happened as I tried to load it:

Re: [GENERAL] PL/pgSQL infinite loop in UPDATE/INSERT example

2009-08-25 Thread Tom Lane
Michael Brown mbr...@fensystems.co.uk writes: I believe that Example 38-2 (Exceptions with UPDATE/INSERT) in the PL/pgSQL documentation suffers from a race condition leading to a potential infinite loop when running at isolation level SERIALIZABLE. You're right, it's not designed to work in

[GENERAL] Posting error

2009-08-25 Thread Rob Napier
Sorry! Last night, during a conversation with one of the Moderators of this list, it was suggested that I post an announcement regarding progress with the development of once:radix. We eventually decided that the general list was not the right place and decided on a different course. I forgot to

Re: [GENERAL] Importing Mangled SQL File via psql

2009-08-25 Thread Tom Lane
APseudoUtopia apseudouto...@gmail.com writes: The file does contain quite a bit of \r\n's in them for newlines inside VARCHAR and TEXT columns, but I thought they would be converted into actual newlines as I import it, not the actual character strings \n and \r. If they're inside quoted

Re: [GENERAL] ETL software and training

2009-08-25 Thread Lew
Devrim GÜNDÜZ wrote: I'd contact Pentaho: What an unfortunate corporate name, if pronounced with a long a sound as in name. If pronounced with the a sound in father it's not so bad. I used to work for a company called MyWebOS (later WebOS). Spanish speakers thought that a very amusing

Re: [GENERAL] cluster replication over only http protocol

2009-08-25 Thread Scott Marlowe
2009/8/25 Szabolcs Márton marton.szabo...@gmail.com: Hi, somebody could give me an advice what should i look for? my situation is: - i have a running/working postgre databse - i have to make another database exactly the same as the first (for development purposes) - the two databases

[GENERAL] cluster replication over only http protocol

2009-08-25 Thread Szabolcs Márton
Hi, somebody could give me an advice what should i look for? my situation is: - i have a running/working postgre databse - i have to make another database exactly the same as the first (for development purposes) - the two databases have only(!) http or https connection, nothing else ! is there

[GENERAL] It looks like transaction, but it isn't transaction

2009-08-25 Thread Sergey Samokhin
Hello. PostgreSQL driver I'm using let me execute queries made by combining some commands into one statement: pgsql:squery(Conn, CREATE TABLE foo (id int); INSERT INTO foo VALUES (1), (2)); There is one thing I find especially interesting: queries I pass to the pgsql:squery() are executed with

Re: [GENERAL] cluster replication over only http protocol

2009-08-25 Thread Sam Mason
On Wed, Aug 26, 2009 at 01:13:48AM +0200, Szabolcs MMMrton wrote: my situation is: - i have a running/working postgre databse - i have to make another database exactly the same as the first (for development purposes) - the two databases have only(!) http or https connection, nothing else !

Re: [GENERAL] [Skytools-users] WAL Shipping + checkpoint

2009-08-25 Thread Mark Kirkwood
Sébastien Lardière wrote: Hi All, I've a cluster ( Pg 8.3.7 ) with WAL Shipping, and a few hours ago, the master had to restart. I use walmgr from Skytools, which works very well. I have already restart the master without any problem, but today, the slave doesn't work like I want. The

[GENERAL] best practise/pattern for large OR / LIKE searches

2009-08-25 Thread Ries van Twisk
Hey All, I am wondering if there is a common pattern for these sort of queries : SELECT * FROM tbl WHERE datanumber LIKE '%12345%' OR LIKE '%54321%' OR LIKE '%8766%' OR LIKE '%009%', .. The number of OR/LIKES are in the order of 50-100 items... the table tbl is a couple of million rows.