Re: [GENERAL] the eternal tunnig question

2005-04-29 Thread mmiranda
Tom Lane wrote: > [EMAIL PROTECTED] writes: >> Hi, iam running postgresql on two identical dl380 2.4 Xeon with 3gb >> RAM, i have recently upgraded one of then from redhat 7.3 (kernel >> 2.4) to gentoo (kernel 2.6), at the same time i upgraded postgres >> from 7.3 to 8.1, im very disapointed, all t

Re: [GENERAL] Fatal error

2005-04-29 Thread mmiranda
Tom Lane wrote: > [EMAIL PROTECTED] writes: >> LOG: redo starts at F1/A0A4E09C >> PANIC: Invalid page header in block 68122 of 17006 >> LOG: startup process (pid 1959) was terminated by signal 6 >> LOG: aborting startup due to startup process failure > > Which PG version is this exactly? If i

Re: [GENERAL] temp tables ORACLE/PGSQL

2005-04-29 Thread Neil Conway
Dennis Sacks wrote: The disadvantage is, you'll have to have some process for deleting old data from the table, as it will stay around and it will bite you when you get the same pg_backend_pid() again down the road. Rather than use pg_backend_id(), why not just assign session IDs from a sequence?

Re: [GENERAL] Tuning queries inside a function

2005-04-29 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > On Fri, Apr 29, 2005 at 12:32:26PM -0500, Mike Nolan wrote: >> Any ideas on how to tune a user function? > Maybe you could return a refcursor pointing to the EXPLAIN ANALYZE of > the query inside the function. The raw materials exist to do this: if you

Re: [GENERAL] the eternal tunnig question

2005-04-29 Thread Tom Lane
[EMAIL PROTECTED] writes: > Hi, iam running postgresql on two identical dl380 2.4 Xeon with 3gb RAM, i > have recently upgraded one of then from redhat 7.3 (kernel 2.4) to gentoo > (kernel 2.6), at the same time i upgraded postgres from 7.3 to 8.1, im very > disapointed, all the querys are 20-25% s

Re: [GENERAL] Fatal error

2005-04-29 Thread Tom Lane
[EMAIL PROTECTED] writes: > LOG: redo starts at F1/A0A4E09C > PANIC: Invalid page header in block 68122 of 17006 > LOG: startup process (pid 1959) was terminated by signal 6 > LOG: aborting startup due to startup process failure Which PG version is this exactly? If it's not the very latest in

Re: [GENERAL] "Other users on Template1" when there aren't any

2005-04-29 Thread Tom Lane
"John D. Tiedeman" <[EMAIL PROTECTED]> writes: >I have 8.0 on a Linux machine and a w2k box but only have this > problem on w2k. I have rebooted in case an earlier effort left a loose > end but that didn't help. I haven't been able to create a db at all on > the w2k but have one on Linux. Th

Re: [GENERAL] Tuning queries inside a function

2005-04-29 Thread Tony Caduto
We have functions with upwards of 800 lines and we simply pull the queries out and stick them in the PG Lighting Admin or PG Admin III query editor. We then substitue any vars etc with real values. Works ok. > What's the best way to tune the queries inside a user function? > > I have a fairl

[GENERAL] the eternal tunnig question

2005-04-29 Thread mmiranda
Hi, iam running postgresql on two identical dl380 2.4 Xeon with 3gb RAM, i have recently upgraded one of then from redhat 7.3 (kernel 2.4) to gentoo (kernel 2.6), at the same time i upgraded postgres from 7.3 to 8.1, im very disapointed, all the querys are 20-25% slower using the new versions, the

Re: [GENERAL] Problem: message type 0xxx arrived from server while idle

2005-04-29 Thread Keatis
"Michael Fuhr" <[EMAIL PROTECTED]> wrote: news:[EMAIL PROTECTED] >> >> i'm using PostgreSQL 7.4 (though problem applies to 8.0 too) on >> FreeBSD 5.2.1 with Apache 1.3.31 (DBI 1.43 and DBD-Pg 1.32). > > Is the code running under mod_perl? If so, what versions of Perl > and mod_perl? Perl 5.8.5 mo

Re: [GENERAL] Tuning queries inside a function

2005-04-29 Thread Mike Nolan
> select * from foo('bar','debug') But how do I do that inside a pl/pgsql function? 'select into' doesn't seem to work properly. > I would have to check be able to include a timestamp at the beginning > of each notice. You can do that from the config file, but it only gives the time to the ne

[GENERAL] Fatal error

2005-04-29 Thread mmiranda
Hi , my server crashed this morning, aparently by a power failure, postgres refeses to start, this is the boot log LOG: database system was interrupted being in recovery at 2005-04-29 14:10:43 CST This probably means that some data blocks are corrupted and you will have to use th

Re: [GENERAL] Postgres filling up hard drive with swap files

2005-04-29 Thread Joe Lester
http://archives.postgresql.org/pgsql-general/2004-08/msg00972.php This bug appears to be fixed in Tiger (Mac OS 10.4). That's great, if it's really true. Can anyone confirm? ---(end of broadcast)--- TIP 7: don't forget to increase your free space m

[GENERAL] success with p2p ip connection

2005-04-29 Thread typing80wpm
I looked at the server machine, in a section regarding ip connections, and saw that security was set to prevent other machines from connecting, so once I set it to no security, I could connect now all I need to do is figure out how to define high security, but allow 192.0.0.101 (the client mach

[GENERAL] more experiments with p2p ip connection

2005-04-29 Thread typing80wpm
I just now installed the free windows version of Rekall from the totalrekall folks.  I wanted to see if perhaps I would have more success testing my connection with rekall than with pg explorer.  Rekall simply asks for the ip address in order to connect, whereas pg explorer asks for some other thin

[GENERAL] "Other users on Template1" when there aren't any

2005-04-29 Thread John D. Tiedeman
I have 8.0 on a Linux machine and a w2k box but only have this problem on w2k. I have rebooted in case an earlier effort left a loose end but that didn't help. I haven't been able to create a db at all on the w2k but have one on Linux. This is my first experience with pgsql on win32. ---

[GENERAL] p2p ip connection problems

2005-04-29 Thread typing80wpm
I can connect to the database on the server machine using pgadminIII and, it installed as a windows service. And I created one test database called usfo   I have not succeeded in getting it to work yet using pg explorer from another client machine on the p2p. I followed Tony's suggestions namely I

Re: [GENERAL] Tuning queries inside a function

2005-04-29 Thread Joshua D. Drake
Huh, sorry, this doesn't work ... we don't allow DECLARE for EXPLAIN. It'd be neat though ... What about having a debug mode for the function. E.g: selet * from foo('bar','debug') When you run with debug it actually runs the function but outputs notices that are the explain anaylze of each function

Re: [GENERAL] Tuning queries inside a function

2005-04-29 Thread Alvaro Herrera
On Fri, Apr 29, 2005 at 02:38:30PM -0400, Alvaro Herrera wrote: > On Fri, Apr 29, 2005 at 12:32:26PM -0500, Mike Nolan wrote: > > > I need to find out if the function can be tuned further, but 'explain' > > doesn't really tell much about what's happening inside the function. > > > > Any ideas on

Re: [GENERAL] ip connection on local p2p network

2005-04-29 Thread Tony Caduto
add the following to pg_hba.conf hostall all 192.0.0.0/8 md5 this will let every PC on you network access the PC or you could add one entry for each host you would like to have access hostall all 192.0.0.101/32 md5 hostall all

Re: [GENERAL] Tuning queries inside a function

2005-04-29 Thread Alvaro Herrera
On Fri, Apr 29, 2005 at 12:32:26PM -0500, Mike Nolan wrote: > I need to find out if the function can be tuned further, but 'explain' > doesn't really tell much about what's happening inside the function. > > Any ideas on how to tune a user function? Maybe you could return a refcursor pointing to

Re: [GENERAL] out of memory for query result

2005-04-29 Thread Tim
On Fri, Apr 29, 2005 at 10:58:08AM -0600, Michael Fuhr wrote: > Have you considered using a cursor to fetch the query results? That > should prevent the API from trying to load the entire result set > into memory. I can do that. I didn't know the API would try to load the entire result set int

Re: [GENERAL] ip connection on local p2p network

2005-04-29 Thread Shelby Cain
--- [EMAIL PROTECTED] wrote: > I just installed the windows postgresql on one of > the five machines in our office, which happens to be > 192.0.0.9 according to ipconfig. I have installed > pg explorer on another machine which happens to be > 192.0.0.101 What changes do I have to make >

[GENERAL] ip connection on local p2p network

2005-04-29 Thread typing80wpm
I just installed the windows postgresql on one of the five machines in our office, which happens to be 192.0.0.9 according to ipconfig.   I have installed pg explorer on another machine which happens to be 192.0.0.101     What changes do I have to make in the various .conf files for the postgre

[GENERAL] win-1251 cyrillic support ?

2005-04-29 Thread raptor
hi, I have setup postgres db with WIN ecnoding (i.e. win1251)...but when i enter data the cyrillic is not preserverd and all that goes in/out the DB is garbage-characters ? Why is this that way is there any solution ? I'm entering data via web-perl app and via pgadmin3 .. if any additional in

[GENERAL] Tuning queries inside a function

2005-04-29 Thread Mike Nolan
What's the best way to tune the queries inside a user function? I have a fairly complicated function that may make as many as 10 queries on several tables, some of which involve multiple joins. Further, in the PHP program that needs this function, it can be called as many as 400,000 times. The

Re: [GENERAL] Increasing statistics results in worse estimates

2005-04-29 Thread Tom Lane
Shelby Cain <[EMAIL PROTECTED]> writes: > I had already removed proprietary data to try and > whittle down the number of columns I needed to > demonstrate the weirdness so I can host a dump of the > table. However, before I take that step I should > mention that this is the native Windows port so

Re: [GENERAL] Composite types as columns used in production?

2005-04-29 Thread Tom Lane
James Robinson <[EMAIL PROTECTED]> writes: > That said -- anyone stepping up to claiming using 'em? Are these things > seen as against the data normalization grain? One strike against 'em is the fairly high overhead involved --- a composite value is stored as effectively its own tuple, so there's

[GENERAL] Slowness of Big Graphical Arrays

2005-04-29 Thread Chris Browne
Christopher Browne <[EMAIL PROTECTED]> writes: > A long time ago, in a galaxy far, far away, [EMAIL PROTECTED] wrote: >> I must say one intereting thing. When I downloaded the trial version >> from TheKompany, and asked it to browse a test file in PGSql which I >> loaded with 250,000 rows, it start

Re: [GENERAL] out of memory for query result

2005-04-29 Thread Michael Fuhr
On Fri, Apr 29, 2005 at 10:47:36AM -0500, [EMAIL PROTECTED] wrote: > > DBD::Pg::st execute failed: out of memory for query result Have you considered using a cursor to fetch the query results? That should prevent the API from trying to load the entire result set into memory. -- Michael Fuhr htt

Re: [GENERAL] Increasing statistics results in worse estimates

2005-04-29 Thread Shelby Cain
--- Tom Lane <[EMAIL PROTECTED]> wrote: > Hm. I should have realized why correlation wouldn't > be high for the > city name: given the ordering by zipcode, city name > values may be > pretty well clumped, but they aren't in any kind of > alphabetical > order --- and it's the overall ordering, not

Re: [GENERAL] Composite types as columns used in production?

2005-04-29 Thread James Robinson
On Apr 29, 2005, at 12:21 PM, Tom Lane wrote: My recollection is that there are some pretty serious limitations on what you can do in this line, but basic cases do work. I think the lack of an ALTER TYPE that can handle the same cases is just a matter of lack of round tuits. regards, tom lan

Re: [GENERAL] Composite types as columns used in production?

2005-04-29 Thread Tom Lane
James Robinson <[EMAIL PROTECTED]> writes: > Hmm -- I see that if the composite type was created via a table > definition, then you _can_ actually add and drop columns, and the > tables using the composite type seem to get updated, as in > http://archives.postgresql.org/pgsql-hackers/2005-

Re: [GENERAL] Increasing statistics results in worse estimates

2005-04-29 Thread Tom Lane
Shelby Cain <[EMAIL PROTECTED]> writes: > --- Tom Lane <[EMAIL PROTECTED]> wrote: >> What did you increase it to, exactly? Could we see >> the contents of >> pg_stats for these two columns at both target >> settings? > Generally, the more I increased the stats target the > better the correlation

[GENERAL] Composite types as columns used in production?

2005-04-29 Thread James Robinson
Folks, Composite types look so seductive for mapping application-level non-scalar objects to columns: o) Directly mappable to a client-side datatype via oid w/o any heavyweight O/R code. o) Such mapping persists through any use of views, joins, etc from ad-hoc queries. o) Using Domains as co

[GENERAL] out of memory for query result

2005-04-29 Thread ttsai
I have a Postgis table with about 2 million polyline records. The most number of points I have in the geometry field is about 500. I have a simple DBD::Pg Perl program that does a select for most of these records and do some processing with them before writing them to a file. Unfortunately, I see

Re: [GENERAL] Problem with GIST-index and timestamps

2005-04-29 Thread Sebastian Böck
Oleg Bartunov wrote: On Thu, 28 Apr 2005, [ISO-8859-1] Sebastian B?ck wrote: Hello, i wanted to define and GIST-index on a table with a timestamp-column containing 'infinity' values, and it throws the following error: ERROR: cannot subtract infinite timestamps Is this a known limitation? I don't

Re: [GENERAL] Clustering

2005-04-29 Thread Patrick Haugen
From the title alone, "pgCluster" sounded like the perfect choice for PostgreSQL clustering. However on their homepage they provide very little information is a rough english traslation from what it sounds like. Also: http://pgcluster.projects.postgresql.org/feature.html What happens when the lo

Re: [GENERAL] temp tables ORACLE/PGSQL

2005-04-29 Thread Tony Caduto
I am assuming you need "session varables" for a web based app right? For a standard client/server app created in something like VB or Delphi all you really need is a single connection(because most db apps are single threaded), and a temp table will stay around until that connection is closed, and

Re: [GENERAL] Problem: message type 0xxx arrived from server while idle

2005-04-29 Thread Michael Fuhr
On Fri, Apr 29, 2005 at 12:52:21AM +0400, Keatis wrote: > > i'm using PostgreSQL 7.4 (though problem applies to 8.0 too) on > FreeBSD 5.2.1 with Apache 1.3.31 (DBI 1.43 and DBD-Pg 1.32). Is the code running under mod_perl? If so, what versions of Perl and mod_perl? > And I have some script, whi

Re: [GENERAL] Increasing statistics results in worse estimates

2005-04-29 Thread Tom Lane
Shelby Cain <[EMAIL PROTECTED]> writes: > Increasing the statistics target on the city column > and re-analyzing the table seems to make the > correlation estimate better (shows about 0.5) but the > row count estimates are thrown off by 2 orders of > magnitude in some cases. What did you increase

[GENERAL] Problem: message type 0xxx arrived from server while idle

2005-04-29 Thread Keatis
Hello, i've encountered such problem: i'm using PostgreSQL 7.4 (though problem applies to 8.0 too) on FreeBSD 5.2.1 with Apache 1.3.31 (DBI 1.43 and DBD-Pg 1.32). I have, lets say Module.pm with such function: sub get_users{ my @res; #$dbh is defined in other module, but is visible and valid h

[GENERAL] temp tables ORACLE/PGSQL

2005-04-29 Thread fisher
Hi Thank You very much. As I mentioned I need temp tables for storing "sesssion variables". I plan to write functions to return suitable column value and I need them to be availabele during whole session. That makes deleteing on commit not the best solution. For example I want to keep emp_id in on

[GENERAL] casting unnamed row types

2005-04-29 Thread elein
I am trying to cast unnamed row types to a known type using SQL. There seems to be some syntactic sugar that is missing or I haven't found it. A stored procedure can be cast to an unnamed row type with select * from proc() as (A text, B text, C text). What I have is a text represenation of a ROW

Re: [GENERAL] GUITools update

2005-04-29 Thread Ian Harding
I haven't tried many of them, but I didn't like how they scribbled on my database. Hopefully now they are creating/using their own either database or at least schema for all their data. On 4/29/05, John DeSoi <[EMAIL PROTECTED]> wrote: > > On Apr 29, 2005, at 4:27 AM, Stephane Bortzmeyer wrote:

Re: [GENERAL] Postgresql and VBA vs Python

2005-04-29 Thread Scott Marlowe
On Thu, 2005-04-28 at 23:23, John DeSoi wrote: > On Apr 28, 2005, at 5:04 PM, [EMAIL PROTECTED] wrote: > > > I would just like to find a free, or low cost basic like language that > > would let easily paint GUI forms in some IDE, and then easily add my > > own script to interact with the Postgre

Re: [GENERAL] Postgresql and VBA vs Python

2005-04-29 Thread Relyea, Mike
FWIW, I'm using PostgreSQL on Windows with an Access/VBA FE that is currently under development.  My PostgreSQL BE has 29 tables and several of them currently have anywhere from 1 to 8 million records and growing.  For me, Access was really the only choice.  In our corporate environment, eve

Re: [GENERAL] info on strange error messages on postgresql

2005-04-29 Thread Joe Maldonado
Tom Lane wrote: >Joe Maldonado <[EMAIL PROTECTED]> writes: > > >>I have these messages on my 7.4.7 database log... >>TopMemoryContext: 87494704 total in 10676 blocks; 179400 free (61 >>chunks); 87315304 used >>TopTransactionContext: 57344 total in 3 blocks; 648 free (5 chunks); >>56696 used >>De

Re: [GENERAL] GUITools update

2005-04-29 Thread John DeSoi
On Apr 29, 2005, at 4:27 AM, Stephane Bortzmeyer wrote: * Freeness of the code (which is much more important than price: switching tools is *hard* because of the lack of standards, so a small price at the beginning can lock you for a long time). It seems like this is a minimal issue with most Postg

Re: [GENERAL] oid or schema name of current plpgsql function

2005-04-29 Thread Matko Andjelinic
On Thu, Apr 28, 2005 at 08:51:50PM -0600, Michael Fuhr wrote: > > I'm not aware of a way to get the current function's OID in PL/pgSQL, > but you can do it in C. Yeah, i know that...I was hoping it would be possible from pl/pgsql :-( > Why do you need to know the function's schema? What are you

Re: [GENERAL] GUITools update

2005-04-29 Thread Alvar Freude
Hi, -- Brennan Stewart <[EMAIL PROTECTED]> wrote: > Before I analyze these tools, I would appreciate input from the community > on what sort of information is important for Postgresql users to know about > these design&administration tools. Sample list (just a few from my own) > operating system

Re: [GENERAL] GUITools update

2005-04-29 Thread Stephane Bortzmeyer
On Mon, Apr 18, 2005 at 04:26:56AM -0400, Brennan Stewart <[EMAIL PROTECTED]> wrote a message of 37 lines which said: > Sample list (just a few from my own) * Freeness of the code (which is much more important than price: switching tools is *hard* because of the lack of standards, so a small p