Re: [GENERAL] Lifecycle of PostgreSQL releases

2007-03-23 Thread Naz Gassiep
Tom Lane wrote: Naz Gassiep <[EMAIL PROTECTED]> writes: Joshua D. Drake wrote: Example discussion with customer: ... Finally, in the absence of security concerns or performance issues (and I mean the "we can't afford to buy better hardware" type edge of the envelope type issue

[GENERAL] Howto optimize pg 8.1.4 and FC6 x64 ??

2007-03-23 Thread amrit angsusingh
I try to change my database server from the older one ie. 2Cpu Xeon 2.4 32 bit 4Gb SDram Hdd SCSI RAID 5 and FC 3 ix86 with 7..4.7 PG to the newer one with 2CPU Xeon 3.0 64 Bit 4Gb DDRram SCSI Raid5 and FC6 X64 PG 8.14 and try to use rather the same parameter from the previous postgresql.conf :-

Re: [GENERAL] question: knopixx and postgresql on flash drive

2007-03-23 Thread Stephen Liu
Hi Mark, > Since it's going to be a development environment I don't need it > fast. > > So, I would still prefer to go ahead with USB drive. I like your idea. Last year I tested installing a complete Linux OS on USB drive (thumb drive) of 1G size. It worked booting direct on PC. It has a comp

Re: [GENERAL] concurrency in stored procedures

2007-03-23 Thread Ottavio Campana
Ottavio Campana wrote: > Anyway, apart from a couple of errors in the code i wrote (an in isn't > closed and exception handling is not correctly written), can I be sure > that the code in the sub-block works an a snapshot of the db? It seems not to work, I put it into my application and I got Err

Re: [GENERAL] Insert fail: could not open relation with OID 3221204992

2007-03-23 Thread Tom Lane
"Ale Raza" <[EMAIL PROTECTED]> writes: > Breakpoint 1, ST_Geometry_Recv (fcinfo=0xbfffcb90) at binary.c:138 > 138 StringInfo src_buf = (StringInfo) > PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); > (gdb) p *src_buf > $4 = {data = 0xff0c8d8b , len = > -1031143425, maxlen = -13595335, cursor =

Re: [GENERAL] concurrency in stored procedures

2007-03-23 Thread Ottavio Campana
Merlin Moncure wrote: > On 3/23/07, Ottavio Campana <[EMAIL PROTECTED]> wrote: >> Ottavio Campana wrote: >> > What would you to in order to be sure that one function or a part of it >> > is atomically executed? >> >> would it be correct something like? or how would you write this? >> >> create or r

Re: [GENERAL] concurrency in stored procedures

2007-03-23 Thread Merlin Moncure
On 3/23/07, Ottavio Campana <[EMAIL PROTECTED]> wrote: Ottavio Campana wrote: > What would you to in order to be sure that one function or a part of it > is atomically executed? would it be correct something like? or how would you write this? create or replace function my_function () returs int

Re: [GENERAL] Insert fail: could not open relation with OID 3221204992

2007-03-23 Thread Tom Lane
"Ale Raza" <[EMAIL PROTECTED]> writes: > Breakpoint 3, #_Recv (fcinfo=0xbfffa3a0) at binary.c:138 > 138 StringInfo src_buf = (StringInfo) > PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); > (gdb) p *src_buf > Cannot access memory at address 0x0 At the point where you've stopped, src_buf hasn

Re: [GENERAL] question: knopixx and postgresql on flash drive

2007-03-23 Thread Merlin Moncure
On 3/23/07, Mark <[EMAIL PROTECTED]> wrote: I would like to use postgresql with knopixx, Sounds like a simple idea :-) and I would like to get full version of postgresql stored on flash drive. I remeber I've seen postgresql tar files before, but do not recall the location - can anybody point? A

Re: [GENERAL] What is the difference between rule and triggers

2007-03-23 Thread Milen A. Radev
Karthikeyan Sundaram wrote: > > Hi Everybody, > > What is the difference between creating a rule and a trigger? > http://www.postgresql.org/docs/current/static/rules-triggers.html -- Milen A. Radev ---(end of broadcast)--- TIP 2: Don'

Re: [GENERAL] concurrency in stored procedures

2007-03-23 Thread Ottavio Campana
Ottavio Campana wrote: > What would you to in order to be sure that one function or a part of it > is atomically executed? would it be correct something like? or how would you write this? create or replace function my_function () returs integer as $$ declare ... status boolean; ... begin

[GENERAL] concurrency in stored procedures

2007-03-23 Thread Ottavio Campana
Hi, using constraints on tables I was able to remove some race conditions, because the unique index prevents the same data to be inserted twice into the table. But I still didn't fix all the race conditions, because in some functions I have to modify more than one table or I just have read and wr

[GENERAL] What is the difference between rule and triggers

2007-03-23 Thread Karthikeyan Sundaram
Hi Everybody, What is the difference between creating a rule and a trigger? Regards skarthi _ i'm making a difference. Make every IM count for the cause of your choice. Join Now. http://clk.atdmt.com/MSN/go/msnnkwme00800

Re: [GENERAL] question: knopixx and postgresql on flash drive

2007-03-23 Thread Mark
Since it's going to be a development environment I don't need it fast. So, I would still prefer to go ahead with USB drive. Mark --- James Neff <[EMAIL PROTECTED]> wrote: > Mark wrote: > > I would like to use postgresql with knopixx, Sounds like a simple > > idea :-) and I would like to get ful

Re: [GENERAL] Async triggers

2007-03-23 Thread Martijn van Oosterhout
On Fri, Mar 23, 2007 at 07:30:17PM +0200, Peter wrote: > Is this possible in PG somehow? Basically I need to call web service > whenever new row is inserted in a table - the lookup takes time up to > 10-15 seconds. Obviously I cant do this inside trigger proc as that > would delay inserts a lot.

[GENERAL] Async triggers

2007-03-23 Thread Peter
Is this possible in PG somehow? Basically I need to call web service whenever new row is inserted in a table - the lookup takes time up to 10-15 seconds. Obviously I cant do this inside trigger proc as that would delay inserts a lot. I suppose I could do a cron job to do webservice lookups peri

Re: [GENERAL] shell script to SQL statement: `pg_dump | psql -U`

2007-03-23 Thread MargaretGillon
> Date: 21 Mar 2007 00:29:33 -0700 > From: "filippo" <[EMAIL PROTECTED]> > To: pgsql-general@postgresql.org > Subject: Re: shell script to SQL statement: `pg_dump | psql -U` > Message-ID: <[EMAIL PROTECTED]> > > On 20 Mar, 16:47, [EMAIL PROTECTED] (Tom Lane) wrote: > > "filippo" <[EMAIL PROTECTED]

Re: [GENERAL] multi-row check constraints?

2007-03-23 Thread Jeff Davis
On Thu, 2007-03-22 at 20:48 -0400, Martin Gainty wrote: > Greetings > > Select COLUMN FROM TABLE WHERE (some condition) for UPDATE OF COLUMN > is not supported? > Yes, it is supported. > what would happen in a Table Deadlock scenario??? The deadlock detector detects the deadlock, causing one t

Re: [GENERAL] question: knopixx and postgresql on flash drive

2007-03-23 Thread Vladimir Zelinski
SQLite database is much better choice for flash drive from my point of view. --- James Neff <[EMAIL PROTECTED]> wrote: > Mark wrote: > > I would like to use postgresql with knopixx, > Sounds like a simple > > idea :-) and I would like to get full version of > postgresql stored on > > flash drive

Re: [GENERAL] question: knopixx and postgresql on flash drive

2007-03-23 Thread James Neff
Mark wrote: I would like to use postgresql with knopixx, Sounds like a simple idea :-) and I would like to get full version of postgresql stored on flash drive. I remeber I've seen postgresql tar files before, but do not recall the location - can anybody point? Also, how big (in MB) postgresql

[GENERAL] question: knopixx and postgresql on flash drive

2007-03-23 Thread Mark
I would like to use postgresql with knopixx, Sounds like a simple idea :-) and I would like to get full version of postgresql stored on flash drive. I remeber I've seen postgresql tar files before, but do not recall the location - can anybody point? Also, how big (in MB) postgresql takes after in

Re: [GENERAL] Query not using index pgsql 8.2.3

2007-03-23 Thread Michael Fuhr
On Fri, Mar 23, 2007 at 02:13:57PM +0100, Henrik Zagerholm wrote: > I'm just amazed that setting the statistics threshold on one column > mad all the difference. IS there any guidelines on what columns I > should change the statistics on? Start by looking for columns involved in simple compari

Re: [GENERAL] Query not using index pgsql 8.2.3

2007-03-23 Thread Henrik Zagerholm
Never mind my last post regarding the Bitmap heap scan. That is all in order. Now it works perfectly. Went from 30+ seconds to 179ms. =) I'm just amazed that setting the statistics threshold on one column mad all the difference. IS there any guidelines on what columns I should change the s

Re: [GENERAL] Query not using index pgsql 8.2.3

2007-03-23 Thread Henrik Zagerholm
23 mar 2007 kl. 13:34 skrev Michael Fuhr: On Fri, Mar 23, 2007 at 12:41:58PM +0100, Henrik Zagerholm wrote: 23 mar 2007 kl. 12:33 skrev Michael Fuhr: The row count estimate for fk_filetype_id = 83 is high by an order of magnitude: Bitmap Index Scan on tbl_file_idx6 (cost=0.00..25.65 rows=1

Re: [GENERAL] Query not using index pgsql 8.2.3

2007-03-23 Thread Alban Hertroys
Henrik Zagerholm wrote: >> Have you run ANALYZE or VACUUM ANALYZE on these tables recently? >> If so then you might try increasing the statistics target for >> tbl_file.fk_filetype_id and perhaps some of the columns in the join >> conditions. > > I did a vacuum full and reindex on all tables. > >

Re: [GENERAL] Query not using index pgsql 8.2.3

2007-03-23 Thread Michael Fuhr
On Fri, Mar 23, 2007 at 12:41:58PM +0100, Henrik Zagerholm wrote: > 23 mar 2007 kl. 12:33 skrev Michael Fuhr: > >The row count estimate for fk_filetype_id = 83 is high by an order > >of magnitude: > > > >>Bitmap Index Scan on tbl_file_idx6 (cost=0.00..25.65 rows=1251 > >>width=0) (actual time=21.9

Re: [GENERAL] Query not using index pgsql 8.2.3

2007-03-23 Thread Henrik Zagerholm
23 mar 2007 kl. 12:33 skrev Michael Fuhr: On Fri, Mar 23, 2007 at 11:43:54AM +0100, Henrik Zagerholm wrote: I'm having a hard time understanding why my query is not using my indices when I change a field in the WHERE clause. The row count estimate for fk_filetype_id = 83 is high by an order

Re: [GENERAL] Query not using index pgsql 8.2.3

2007-03-23 Thread Michael Fuhr
On Fri, Mar 23, 2007 at 11:43:54AM +0100, Henrik Zagerholm wrote: > I'm having a hard time understanding why my query is not using my > indices when I change a field in the WHERE clause. The row count estimate for fk_filetype_id = 83 is high by an order of magnitude: > Bitmap Index Scan on tbl_

[GENERAL] [Fwd: postgres dev question - MVCC slowdown]

2007-03-23 Thread Csaba Nagy
(see below the original mail I forwarded to the list) Zsombor, As far as I know there's no way to disable the MVCC features in postgres, that's a fundamental design choice in it's workings. However, your problem can be solved by properly running vacuum on the tables you update frequently. A firs

[GENERAL] Query not using index pgsql 8.2.3

2007-03-23 Thread Henrik Zagerholm
Hello list, I'm having a hard time understanding why my query is not using my indices when I change a field in the WHERE clause. Please could someone shed some light on this. Below is both queries and explain analyze for the different queries. Regards, Henrik QUERY 1. Using WHERE tbl_file_s