Re: [GENERAL] Replication and PITR

2006-09-29 Thread Bo Lorentsen
Jeff Davis wrote: If it's a statement queue, what happens when you do "INSERT ... VALUES (random())"? Can the statements be executed out of order on the slave or are they serialized? That is very relevant, and my ref to MySQL replication was only the relatively ease of its setup. And in most

Re: [GENERAL] Replication and PITR

2006-09-29 Thread Bo Lorentsen
Jim Nasby wrote: You can work around it right now, too; you just need an external process that will find the active WAL file and periodically copy it to the backup. I'm pretty sure there's info in the archives about the details of setting this up, and there's also the PITRHA project on pgFound

Re: [GENERAL] Replication and PITR

2006-09-29 Thread Bo Lorentsen
Andrew Sullivan wrote: Note that, the last time I looked at it, there was no interlock to ensure that your statement queue (which is basically just a log of statements as executed on the "master") was not accidentally blown away by your cleanup process before your target replicas were up to date.

Re: [GENERAL] Replication and PITR

2006-09-29 Thread Bo Lorentsen
Robert Treat wrote: Hmm almost sounds like what you really want is mammoth replicator... lower level than slony, built into the db, can handle ddl (iirc) not oss though. Yes, that may be true but I think I will try out Slony first, as the design of the DB (DDL) is quite static.

Re: [GENERAL] Full Text fuzzy search

2006-09-29 Thread Michael Vodep
Thanks for the replies, And all the functions work with levenstein and soundex? Can they also return the percentage of similarity? Regards michael ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Dead Lock problem with 8.1.3

2006-09-29 Thread Kai Hessing
Tom Lane wrote: > I bet the problem is that you're not getting a hashed subplan in 8.1. > What do you have work_mem set to on the two systems? The fact that the > rowcount estimate for the subplan is much larger may be causing the > change, too. Why is that --- perhaps you haven't ANALYZEd stud_v

[GENERAL] 8.1.4 compile problem

2006-09-29 Thread km
Hi all, i am compiling postgresql 8.1.4 on AMB x86_64 platform. configure runs fine but shows output (snippet shown) as follows: ... checking for int8... no checking for uint8... no checking for int64... no checking for uint64... no ... my gcc -v gives me: Reading specs from /usr/lib/gcc/x86

Re: [GENERAL] 8.1.4 compile problem

2006-09-29 Thread Thomas Pundt
Hi, On Friday 29 September 2006 11:01, km wrote: | i am compiling postgresql 8.1.4 on AMB x86_64 platform. | configure runs fine but shows output (snippet shown) as follows: | ... | checking for int8... no | checking for uint8... no | checking for int64... no | checking for uint64... no I'd say

Re: [GENERAL] 8.1.4 compile problem

2006-09-29 Thread km
On Fri, Sep 29, 2006 at 11:48:09AM +0200, Thomas Pundt wrote: > I'd say, this is expected output from configure. Configure is just a mechanism > to help constructing an abstraction for different types of OS (i.e. things > like "can we use this C type? Do we need to use another type instead?"). >

[GENERAL] PostgreSQL 8.1.4 on Vista RC1

2006-09-29 Thread Ets ROLLAND
I receive Windows Vista RC1 for testing, so I try to install PG 8.1.4.The installer fails : - On the creation of the user Postgres, - On the creation of the service. I found workaround for that : - I create manually the Postgres user with a password, - I install PG 8.1.4 WITHOUT creating th

Re: [GENERAL] PostgreSQL 8.1.4 on Vista RC1

2006-09-29 Thread Magnus Hagander
> I receive Windows Vista RC1 for testing, so I try to install PG > 8.1.4.The installer fails : > - On the creation of the user Postgres, > - On the creation of the service. > I found workaround for that : > - I create manually the Postgres user with a password, > - I install PG 8.1.4 WITHOUT creat

Re: [GENERAL] Expected accuracy of planner statistics

2006-09-29 Thread Arturo Perez
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Jim C. Nasby") wrote: > The problem is that you can't actually get > a good n_distinct estimate if you're sampling less than a very large > chunk of the table. Since our sampling maxes out at something like 30k > pages, at some point the n_disti

Re: [GENERAL] Expected accuracy of planner statistics

2006-09-29 Thread Jorge Godoy
Arturo Perez <[EMAIL PROTECTED]> writes: > Can the DBA just set n_distinct? Sometimes s/he just knows what the > value should be. Having an expensive process run once in a while and setting this value also sounds interesting. If it has to be calculated every time then this is a bad thing, but

Re: [GENERAL] Expected accuracy of planner statistics

2006-09-29 Thread Csaba Nagy
> [snip] Having an expensive process run once in a while and setting this value > also > sounds interesting. [snip] What about externalizing the statistics calculation ? I mean, would it make sense to have for e.g. a WAL-fed standby which has an additional process which keeps the statistics in sy

Re: [GENERAL] Can i see server SQL commands ?

2006-09-29 Thread Shane Ambler
On 29/9/2006 11:47, "Adnan DURSUN" <[EMAIL PROTECTED]> wrote: > - Original Message - > From: "Jim C. Nasby" <[EMAIL PROTECTED]> > >> Didn't someone just ask this yesterday? > > Yes. i did it :-) > >> I believe you can get that info by increasing client_min_messages. >> What you specif

[GENERAL] Foreign key constraint delete fire order

2006-09-29 Thread CN
Hi! I wish foreign key constraint trigger guarantees that rows in referensing table are deleted before the rows in referenced table is deleted. Here are one inventory table and two transaction tables serving to explain the reasons: CREATE TABLE inv( warehouse TEXT ,item TEXT

Re: [GENERAL] using schema's for data separation

2006-09-29 Thread Matthew T. O'Connor
snacktime wrote: This has worked well so far but it's a real pain to manage and as we ramp up I'm not sure it's going to scale that well. So anyways my questions is this. Am I being too paranoid about putting all the data into one set of tables in a common schema? For thousands of clients what

[GENERAL] benchmark suite

2006-09-29 Thread km
Hi all, Is there any good benchmark suite for testing postgresql performance? i tried to work with pgbench but found pgbench source (v 8.0.x and 7.4.x) but couldnt compile with gcc ($gcc -o pgbench pgbench.8.0.x.c) postgres 8.1.4 is on AMDx86_64 platform. regards, KM ---

Re: [GENERAL] benchmark suite

2006-09-29 Thread Andrew Sullivan
On Fri, Sep 29, 2006 at 07:27:49PM +0530, km wrote: > Is there any good benchmark suite for testing postgresql performance? I suggest looking at the excellent software provided by OSDL. http://www.osdl.org/lab_activities/kernel_testing/osdl_database_test_suite/ A -- Andrew Sullivan | [EMAIL

Re: [GENERAL] using schema's for data separation

2006-09-29 Thread Shane Ambler
On 29/9/2006 15:29, "snacktime" <[EMAIL PROTECTED]> wrote: > This has worked well so far but it's a real pain to manage and as we > ramp up I'm not sure it's going to scale that well. So anyways my > questions is this. Am I being too paranoid about putting all the data > into one set of tables i

Re: [GENERAL] benchmark suite

2006-09-29 Thread km
> On Fri, Sep 29, 2006 at 07:27:49PM +0530, km wrote: > > Is there any good benchmark suite for testing postgresql performance? > > I suggest looking at the excellent software provided by OSDL. > > http://www.osdl.org/lab_activities/kernel_testing/osdl_database_test_suite/ > ya i have tried th

Re: [GENERAL] using schema's for data separation

2006-09-29 Thread Jorge Godoy
Shane Ambler <[EMAIL PROTECTED]> writes: > Thinking about it - it should only be a small source change to the sql > parser to stop it from running a statement that didn't include clientID in > the where clause. > A small change that is easy to add again to new versions as they are > released. I'd

Re: [GENERAL] using schema's for data separation

2006-09-29 Thread Just Someone
I am using a similar solution, and I tested it with a test containing 20K+ different schemas. Postgres didn't show slowness at all even after the 20K (over 2 million total tables) were created. So I have feeling it can grow even more. Guy. On 9/28/06, snacktime <[EMAIL PROTECTED]> wrote: I'm r

Re: [GENERAL] using schema's for data separation

2006-09-29 Thread Erik Jones
snacktime wrote: I'm re evaluating a few design choices I made a while back, and one that keeps coming to the forefront is data separation. We store sensitive information for clients. A database for each client isn't really workable, or at least I've never though of a way to make it workable, a

Re: [GENERAL] 8.1.4 compile problem

2006-09-29 Thread km
> > I'd say, this is expected output from configure. Configure is just a > > mechanism > > to help constructing an abstraction for different types of OS (i.e. things > > like "can we use this C type? Do we need to use another type instead?"). > > | how can i add int8,uint8,int64 and uint64 functi

Re: [GENERAL] Expected accuracy of planner statistics

2006-09-29 Thread John D. Burger
Tom Lane wrote: The information we've seen says that the only statistically reliable way to arrive at an accurate n_distinct estimate is to examine most of the table :-(. IIRC I picked an equation out of the literature partially on the basis of it being simple and fairly cheap to compute...

Re: [GENERAL] 8.1.4 compile problem

2006-09-29 Thread Tom Lane
km <[EMAIL PROTECTED]> writes: > i have compiled postgres 8.1.4 even if configure didnt detect > int8,uint8,int64 and uint64. i have tried to create a test table with > datattype as int64 , but it says no such datatype, same is with uint8 > an uint64 datatypes. At the SQL level, these datatypes a

Re: [GENERAL] Foreign key constraint delete fire order

2006-09-29 Thread Tom Lane
"CN" <[EMAIL PROTECTED]> writes: > I wish foreign key constraint trigger guarantees that rows in > referensing table are deleted before the rows in referenced table is > deleted. > ... > Does my wish make sense or violate any standard? Sorry, the SQL standard says that it happens in the current or

Re: [GENERAL] benchmark suite

2006-09-29 Thread Andrew Sullivan
On Fri, Sep 29, 2006 at 07:58:01PM +0530, km wrote: > > > ya i have tried the dbt1 (database test 1 - which is what i > require) from the ODSL site but couldnt compile as i got the error: > > cache.c: In function `main': > cache.c:134: error: `sname2' undeclared (first use in this function) Is

Re: [GENERAL] 8.1.4 compile problem

2006-09-29 Thread km
> At the SQL level, these datatypes are named after byte sizes not bit > sizes, ie, int2, int4, int8. Or you might prefer smallint, int, bigint. > There are no unsigned types. > > regards, tom lane > oh!! that makes it clear :) thanks! regards, KM --

Re: [GENERAL] Expected accuracy of planner statistics

2006-09-29 Thread Tom Lane
"John D. Burger" <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> IIRC I picked an equation out of the literature partially on the basis >> of it being simple and fairly cheap to compute... > I'm very curious about this - can you recall where you got this, or > at least point me to where in the

[GENERAL] Array assignment behavior (was Re: [ADMIN] Stored procedure array limits)

2006-09-29 Thread Tom Lane
[ expanding this thread, as it now needs wider discussion ] "Paul B. Anderson" <[EMAIL PROTECTED]> writes: > Actually, I was not filling all of the arrays in sequential order. I > added code to initialize them in order and the function seems to be > working now. Is that a known problem? Well

Re: [GENERAL] Expected accuracy of planner statistics

2006-09-29 Thread John D. Burger
src/backend/commands/analyze.c, around line 1930 as of CVS HEAD: /*-- * Estimate the number of distinct values using the estimator * proposed by Haas and Stokes in IBM Research Report RJ 10025: Thanks for the pointer, Tom. I shouldn't have been

Re: [GENERAL] Array assignment behavior (was Re: [ADMIN] Stored procedure array limits)

2006-09-29 Thread Casey Duncan
On Sep 29, 2006, at 9:14 AM, Tom Lane wrote: [ expanding this thread, as it now needs wider discussion ] "Paul B. Anderson" <[EMAIL PROTECTED]> writes: Actually, I was not filling all of the arrays in sequential order. I added code to initialize them in order and the function seems to be work

Re: [GENERAL] Array assignment behavior (was Re: [ADMIN] Stored procedure array limits)

2006-09-29 Thread John D. Burger
As of 8.2 we could allow assignment to arbitrary positions by filling the intermediate positions with nulls. The code hasn't actually been changed to allow that, but it's something we could consider doing now. At first blush, this strikes me as a bit too magical/implicit. Are there other la

Re: [GENERAL] benchmark suite

2006-09-29 Thread Dimitri Fontaine
Le vendredi 29 septembre 2006 15:54, Andrew Sullivan a écrit : > On Fri, Sep 29, 2006 at 07:27:49PM +0530, km wrote: > > Is there any good benchmark suite for testing postgresql performance? > I suggest looking at the excellent software provided by OSDL. > http://www.osdl.org/lab_activities/kernel_

Re: [GENERAL] Array assignment behavior (was Re: [ADMIN] Stored procedure array

2006-09-29 Thread Paul B. Anderson
It seems that the suggestion to fill intermediate positions with NULLs would be preferable to the current behavior.  I know of no requirement to populate arrays in sequence in any other language so I think other programmers would be surprised too by the current behavior. Paul Tom Lane wrot

Re: [GENERAL] Array assignment behavior (was Re: [ADMIN] Stored procedure

2006-09-29 Thread Erik Jones
Yep, that definitely threw me the first time I encountered it. Paul B. Anderson wrote: It seems that the suggestion to fill intermediate positions with NULLs would be preferable to the current behavior. I know of no requirement to populate arrays in sequence in any other language so I think o

[GENERAL] pg web hosting with tsearch2?

2006-09-29 Thread Rick Schumeyer
I hope pg-general is the correct forum for this question…if not please let me know the correct location.   I have a pg application that uses tsearch2.  I would like to move this application off my local machine and onto a web host somewhere.  I have some questions regarding this:   1)  

Re: [GENERAL] Array assignment behavior (was Re: [ADMIN] Stored procedure array limits)

2006-09-29 Thread Tom Lane
"John D. Burger" <[EMAIL PROTECTED]> writes: >>> As of 8.2 we could allow assignment to >>> arbitrary positions by filling the intermediate positions with nulls. >>> The code hasn't actually been changed to allow that, but it's >>> something we could consider doing now. >> >> At first blush, thi

Re: [GENERAL] using schema's for data separation

2006-09-29 Thread snacktime
On 9/29/06, Just Someone <[EMAIL PROTECTED]> wrote: I am using a similar solution, and I tested it with a test containing 20K+ different schemas. Postgres didn't show slowness at all even after the 20K (over 2 million total tables) were created. So I have feeling it can grow even more. That's g

Re: [GENERAL] [NOVICE] Do non-sequential primary keys slow performance significantly??

2006-09-29 Thread Brandon Aiken
I would expect no performance difference at all. All primary keys automatically get an index, and the index is effectively an optimized dictionary, hash, two-dimensional array, or list of tuples of the key values and the address of the record for that key. Indexes are designed to eliminate the ph

Re: [GENERAL] pg web hosting with tsearch2?

2006-09-29 Thread Joshua D. Drake
Rick Schumeyer wrote: > I hope pg-general is the correct forum for this question.if not please let > me know the correct location. > > > > I have a pg application that uses tsearch2. I would like to move this > application off my local machine and onto a web host somewhere. I have some > ques

Re: [GENERAL] pg web hosting with tsearch2?

2006-09-29 Thread Rick Schumeyer
I guess I should have mentioned this initially...I also need a web host that offers that other database (my***). We are using the Joomla content management system which only works with my***. Although, I'm not as picky about which version of my*** is offered. I'm examining that commandprompt...m

Re: [GENERAL] pg web hosting with tsearch2?

2006-09-29 Thread Jean-Christophe Roux
I don't know if A2webhosting.com specifically supports tsearch2, but they say they offer 8.1 with procedural language installed.JCR- Original Message From: Joshua D. Drake <[EMAIL PROTECTED]>To: Rick Schumeyer <[EMAIL PROTECTED]>Cc: pgsql-general@postgresql.orgSent: Friday, September 29, 20

Re: [GENERAL] pg web hosting with tsearch2?

2006-09-29 Thread Joshua D. Drake
Rick Schumeyer wrote: > I guess I should have mentioned this initially...I also need a web host that > offers that other database (my***). We are using the Joomla content Well that pretty much blows us out of the water :). > I'm examining that commandprompt...my initial guess is they do not supp

Re: [GENERAL] Array assignment behavior (was Re: [ADMIN] Stored procedure

2006-09-29 Thread Erik Jones
Ok, just so I can be sure I understand what I just read: i. says that you can assign to an array that has not been initialized. ii. states that the index of an insertion into an array should not be limited by the current range of index values of the array and requires any gaps in the index

[GENERAL] Backslashes in 8.2 still escape, hwo to disable?

2006-09-29 Thread Ken Johanson
Hi, I'm trying out the new 8.2 beta; the following query: select 'ab\cd'; yields: abcd, not ab\cd. Is there a setting I'd need to switch to enable the ANSI/ISO escape behavior? I am using the JDBC driver; not sure if that could be the culprit.. Thanks, Ken ---(end

Re: [GENERAL] Backslashes in 8.2 still escape, hwo to disable?

2006-09-29 Thread Jeff Davis
On Fri, 2006-09-29 at 18:12 -0600, Ken Johanson wrote: > Hi, > > I'm trying out the new 8.2 beta; the following query: > > select 'ab\cd'; yields: abcd, not ab\cd. > > Is there a setting I'd need to switch to enable the ANSI/ISO escape > behavior? I am using the JDBC driver; not sure if t

Re: [GENERAL] using schema's for data separation

2006-09-29 Thread Reece Hart
On Fri, 2006-09-29 at 09:39 -0500, Erik Jones wrote: > What we've done is to use table inheritance. So, > we have a group of base account data tables and whenever a new account > is added they get a set of tables that inherit from these base tables. > This works well in that whenever we need a gl

Re: [GENERAL] PG Rocks! (was:Backslashes in 8.2 still escape, hwo

2006-09-29 Thread Ken Johanson
You guys, and PG ROCK!! The standard_conforming_strings mode works beautifully... it is (was) the last low-level barrier to using PG in a really professional/interop environment. And as I become familiar, again, with how PG and it's tools have come along, I am SUPER impressed. Many, many kudos!