Re: [GENERAL] query is taking longer time after a while

2009-09-30 Thread tomrevam
Bill Moran wrote: The OP did mention that he's using autovac, which will take care of both vacuum and analyze for him. However, he didn't provide his autovac config, and it happens at times that the defaults are not aggressive enough to keep a table well-maintained. Here are my

Re: [GENERAL] query is taking longer time after a while

2009-09-30 Thread tomrevam
Scott Marlowe-2 wrote: Just wondering, what version of pgsql are you running? I noticed a lot less degradation from heavily updated tables when I went to 8.3 and set the fill % for tables / indexes to 90% or so. If you're running an older version, the upgrade to 8.3 may well be worth

Re: [GENERAL] query is taking longer time after a while

2009-09-30 Thread A. Kretschmer
In response to tomrevam : Scott Marlowe-2 wrote: Just wondering, what version of pgsql are you running? I noticed a lot less degradation from heavily updated tables when I went to 8.3 and set the fill % for tables / indexes to 90% or so. If you're running an older version, the

Re: [GENERAL] Delphi connection ?

2009-09-30 Thread Mark Morgan Lloyd
Raymond O'Donnell wrote: I fully agree I still use Delphi 6 a lot, and there's an ease of use about it that leaves other IDEs I've used in the shade. It's just a pity that it's so expensive Ray. -- Raymond O'Donnell,

Re: [GENERAL] Delphi connection ?

2009-09-30 Thread Mark Morgan Lloyd
John R Pierce wrote: Nico Callewaert wrote: The thing you always hear about ODBC is, that it is very slow ? ADO is significantly faster than ODBC, so the preferred stack would be delphi - ado - postgres ole db - libpq -postgres I believe there exists a delphi-ado wrapper (at least my

Re: [GENERAL] Postgresql Web Hosting

2009-09-30 Thread Eduardo Morras
At 01:22 30/09/2009, Matt Friedman wrote: Hi, I'm trying to migrate a site to a new hosting company. The backend uses postgresql 8 and php. Anyone have thoughts on decent hosting companies for this sort of thing? I'm just looking at shared hosting as this isn't a resource intensive site. I use

[GENERAL] Where can I get the number of plans that considered by Planner?

2009-09-30 Thread 纪晓曦
Where can I add a integer counter to count the plans considered by planner. In my opinion, it is in the src/backend/optimizer/path directorty.

Re: [GENERAL] Collation in ORDER BY not lexicographical

2009-09-30 Thread Peter Eisentraut
On Tue, 2009-09-29 at 03:21 -0600, Scott Marlowe wrote: On Tue, Sep 29, 2009 at 2:52 AM, Paul Gaspar devl...@revolversoft.com wrote: Hi! We have big problems with collation in ORDER BY, which happens in binary order, not alphabetic (lexicographical), like:. A B Z a z Ä Ö

[GENERAL] PostgreSQL Macro Query

2009-09-30 Thread Bronagh Grimes
Hi there, I have written some code to calculate basic summary stats and wish to then incorporate this code within a macro... I want to run the code many multiple times and define the variables (on which the summary statistics are calculated) outside of the basic code. For example, see some

Re: [GENERAL] PostgreSQL Macro Query

2009-09-30 Thread Sam Mason
On Wed, Sep 30, 2009 at 11:13:06AM +0100, Bronagh Grimes wrote: I have written some code to calculate basic summary stats and wish to then incorporate this code within a macro... I want to run the code many multiple times and define the variables (on which the summary statistics are

Re: [GENERAL] Postgresql Web Hosting

2009-09-30 Thread Devrim GÜNDÜZ
On Tue, 2009-09-29 at 19:22 -0400, Matt Friedman wrote: I'm trying to migrate a site to a new hosting company. The backend uses postgresql 8 and php. Anyone have thoughts on decent hosting companies for this sort of thing? Here is the list at postgresql.org :

Re: [GENERAL] query is taking longer time after a while

2009-09-30 Thread Bill Moran
In response to tomrevam to...@fabrix.tv: My apologies, I should have asked for the output of VACUUM VERBOSE on the problem table in conjunction with these settings. (make sure you do VACUUM VERBOSE when the table is exhibiting the speed problem) Bill Moran wrote: The OP did mention

Re: [GENERAL] query is taking longer time after a while

2009-09-30 Thread Bill Moran
In response to Vick Khera vi...@khera.org: On Tue, Sep 29, 2009 at 9:48 AM, Bill Moran wmo...@potentialtech.com wrote: There has (over the last few years) been a lot of speculation from people who think that indexes may suffer performance degradation under some workloads.  I've yet to see

Re: [GENERAL] do I need a rollback() after commit that fails?

2009-09-30 Thread Alban Hertroys
On 30 Sep 2009, at 4:01, Vick Khera wrote: The question still stands: if the COMMIT fails, ROLLBACK is not required in Postgres. Is this portable to other databases? I don't think so. I recall messages on this list claiming that some databases (MS SQL, MySQL if memory serves me) commit

[GENERAL] Updating row with updating function, bug or feature?

2009-09-30 Thread Thomas Jacob
Hello List, I've run into some weirdness in PSQL 8.3.8 (Ubuntu 8.04 LTS x86_64 package). When I update a row while using a function result that updates that very same row in the WHERE part of the update, the main update no longer takes place, even though the WHERE conditions should match. But if

Re: [GENERAL] Where can I get the number of plans that considered by Planner?

2009-09-30 Thread Tom Lane
=?UTF-8?B?57qq5pmT5pum?= sheep...@gmail.com writes: Where can I add a integer counter to count the plans considered by planner. Well, you could count the number of calls to add_path, but a path is hardly the same thing as a complete plan. regards, tom lane -- Sent via

[GENERAL] ms-sql - pg 8.x

2009-09-30 Thread Sydney Puente
Hello, It seems that very shortly I will have to extract some data from ms-sql server and load it into postgres. It seems that the ms-sql is getting bigger with increasingly more users and performance is getting worse n worse. And a local copy of data is required for and application that needs

Re: [GENERAL] INSERT with RETURNING clause inside SQL function

2009-09-30 Thread rintaant
you can try: CREATE OR REPLACE FUNCTION add_something(text, text) RETURNS integer AS $BODY$ DECLARE somevariable integer; BEGIN INSERT INTO sometable (id, foo, bar ) VALUES (DEFAULT, $1, $2 ) RETURNING id INTO somevariable; return somevariable; END;$BODY$ LANGUAGE 'plpgsql' VOLATILE; -- View

Re: [GENERAL] Updating row with updating function, bug or feature?

2009-09-30 Thread Tom Lane
Thomas Jacob ja...@internet24.de writes: I've run into some weirdness in PSQL 8.3.8 (Ubuntu 8.04 LTS x86_64 package). When I update a row while using a function result that updates that very same row in the WHERE part of the update, the main update no longer takes place, even though the WHERE

Re: [GENERAL] ms-sql - pg 8.x

2009-09-30 Thread John R Pierce
Sydney Puente wrote: Hello, It seems that very shortly I will have to extract some data from ms-sql server and load it into postgres. It seems that the ms-sql is getting bigger with increasingly more users and performance is getting worse n worse. And a local copy of data is required for and

Re: [GENERAL] Updating row with updating function, bug or feature?

2009-09-30 Thread Thomas Jacob
On Wed, 2009-09-30 at 10:17 -0400, Tom Lane wrote: Thomas Jacob ja...@internet24.de writes: I've run into some weirdness in PSQL 8.3.8 (Ubuntu 8.04 LTS x86_64 package). When I update a row while using a function result that updates that very same row in the WHERE part of the update, the

[GENERAL] automated row deletion

2009-09-30 Thread Dave Huber
I am inserting 250 rows of data (~2kbytes/row) every 5 seconds into a table (the primary key is a big serial). I need to be able to limit the size of the table to prevent filling up the disk. Is there a way to setup the table to do this automatically or do I have to periodically figure out how

Re: [GENERAL] automated row deletion

2009-09-30 Thread John R Pierce
Dave Huber wrote: I am inserting 250 rows of data (~2kbytes/row) every 5 seconds into a table (the primary key is a big serial). I need to be able to limit the size of the table to prevent filling up the disk. Is there a way to setup the table to do this automatically or do I have to

Re: [GENERAL] automated row deletion

2009-09-30 Thread 纪晓曦
I think there no better way you can get around this problem. You need to check the disk periodically and it is not to hard. 2009/10/1 Dave Huber dhu...@letourneautechnologies.com I am inserting 250 rows of data (~2kbytes/row) every 5 seconds into a table (the primary key is a big serial). I

Re: [GENERAL] ms-sql - pg 8.x

2009-09-30 Thread Tom Lane
John R Pierce pie...@hogranch.com writes: Sydney Puente wrote: The first isssue that occurs to me is that CP1252 is used throughout the data and there is a lot of european special characters, e acute for example. But the column names etc are regular chars [a-zA-Z]. CP1252 aka Windows-1252

[GENERAL] error message and documentation

2009-09-30 Thread Ivano Luberti
Hi all, I use PostgresSQL 8.3 through JDBC Recently one transaction has failed with the following error message: Detail: Process 10660 waits for AccessShareLock on relation 36036 of database 34187; blocked by process 2212. Process 2212 waits for AccessExclusiveLock on relation 36044 of database

Re: [GENERAL] error message and documentation

2009-09-30 Thread Tom Lane
Ivano Luberti lube...@archicoop.it writes: I'm trying to understand why I can have this kind or error (it is probably some programming mistake) but reading the PostgresSQL manual I cannot find any trace of AccessExclusiveLock , while I have found explanation of what AccessShareLock is. First

Re: [GENERAL] error message and documentation

2009-09-30 Thread Ivano Luberti
Tom, thanks for your answer: the reason I failed to find AccessExclusiveLock is beacuse that string of character is never written in the manual while AccessShareLock is written as it is written above in the manual in the section about index lockin. Not knowing the manual in detail I

Re: [GENERAL] error message and documentation

2009-09-30 Thread Tom Lane
Ivano Luberti lube...@archicoop.it writes: My problem is I know what query has failed , but I don't know the other one that caused the deadlock condition. Ah. Is it practical for you to upgrade to PG 8.4? IIRC the deadlock reporting code got improved in 8.4 to log all the queries involved.

Re: [GENERAL] error message and documentation

2009-09-30 Thread Ivano Luberti
I don't know: I'm not subscribed to the anno9unce list so I was not aware 8.4 has now a production release. In the past upgrading from 8.2 to 8.3 solved a big issues but at the time the application is not in production. So we are going to evaluate this option. Anyway after reading the manual in

[GENERAL] I can not drop a user/role because an object depent on it.

2009-09-30 Thread Ricky Tompu Breaky
Dear my friends I can not drop a user because another object need it. How can I know which object need it? I really want to drop everything inside my PostgreSQL, to reset my installation really from beginning. postgres=# drop user ivia; FEHLER: kann Rolle »ivia« nicht löschen, weil andere

Re: [GENERAL] I can not drop a user/role because an object depent on it.

2009-09-30 Thread Bill Moran
In response to Ricky Tompu Breaky ricky.bre...@uni.de: Dear my friends I can not drop a user because another object need it. How can I know which object need it? I really want to drop everything inside my PostgreSQL, to reset my installation really from beginning. The easiest way to

[GENERAL] Weird behavior with sensitive cursors.

2009-09-30 Thread Daniel F
Hi - I'm seeing a behavior with updatable cursors that matches neither the behavior of a sensitive cursor nor an insensitive one. In summary, I'm running with serializable as the isolation level and rows updated within the same transaction seem to disappear under the cursor. From the postgres

Re: [GENERAL] Weird behavior with sensitive cursors.

2009-09-30 Thread Alvaro Herrera
Daniel F escribió: SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL SERIALIZABLE; begin; show transaction isolation level; create table foo (a bigint); insert into foo select generate_series(0, 9); declare c1 no scroll cursor for select * from foo for update; update foo set

Re: [GENERAL] Performance evaluation of PostgreSQL's historic releases

2009-09-30 Thread György Vilmos
2009/9/29 Amitabh Kant amitabhk...@gmail.com On Tue, Sep 29, 2009 at 1:06 PM, György Vilmos vilmos.gyo...@gmail.comwrote: Hello, I've done a benchmark of recent versions of PostgreSQL's last five major releases to see, how performance has changed during the past years from version to

Re: [GENERAL] Performance evaluation of PostgreSQL's historic releases

2009-09-30 Thread György Vilmos
2009/9/29 Grzegorz Jaśkiewicz gryz...@gmail.com any chance you can test the recent postgresql Cvs-head build (to be 8.5). Sadly, no, the machine was not mine and I had to give it back. -- http://suckit.blog.hu/

Re: [GENERAL] Performance evaluation of PostgreSQL's historic releases

2009-09-30 Thread György Vilmos
2009/9/30 Greg Smith gsm...@gregsmith.com On Tue, 29 Sep 2009, Gy?rgy Vilmos wrote: I've done a benchmark of recent versions of PostgreSQL's last five major releases to see, how performance has changed during the past years from version to version. Your comments suggest V8.4 moves

Re: [GENERAL] Performance evaluation of PostgreSQL's historic releases

2009-09-30 Thread György Vilmos
2009/9/30 Scott Marlowe scott.marl...@gmail.com On Tue, Sep 29, 2009 at 4:47 PM, Greg Smith gsm...@gregsmith.com wrote: P.S. On your write-heavy tests, increasing checkpoint_segments a lot should improve overall performance, if you re-test at some point. Just wanted to add that in order

Re: [GENERAL] I can not drop a user/role because an object depent on it.

2009-09-30 Thread Ricky Tompu Breaky
You've solved my Problem, Bill. I thank you very much, my friend Bill Moran. Highly appreciated. On Wed, 30 Sep 2009 13:45:52 -0400 Bill Moran wmo...@potentialtech.com wrote: In response to Ricky Tompu Breaky ricky.bre...@uni.de: Dear my friends I can not drop a user because

Re: [GENERAL] I can not drop a user/role because an object depent on it.

2009-09-30 Thread Adrian Klaver
On Wednesday 30 September 2009 10:43:35 am Ricky Tompu Breaky wrote: Dear my friends I can not drop a user because another object need it. How can I know which object need it? I really want to drop everything inside my PostgreSQL, to reset my installation really from beginning.

Re: [GENERAL] Weird behavior with sensitive cursors.

2009-09-30 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: Interesting. If I create an non-unique index on the table before declaring the cursor, FETCH throws an error: alvherre=# fetch all from c1; ERROR: attempted to lock invisible tuple I get that in 8.4 and HEAD even without any index, just

Re: [GENERAL] Weird behavior with sensitive cursors.

2009-09-30 Thread Alvaro Herrera
Tom Lane escribió: Alvaro Herrera alvhe...@commandprompt.com writes: Interesting. If I create an non-unique index on the table before declaring the cursor, FETCH throws an error: alvherre=# fetch all from c1; ERROR: attempted to lock invisible tuple I get that in 8.4 and HEAD even

Re: [GENERAL] Weird behavior with sensitive cursors.

2009-09-30 Thread Alvaro Herrera
Alvaro Herrera escribió: I played a bit with doing this only when the OPT_CURSOR_INSENSITIVE bit is set, but I'm not ever seeing it set -- with or with FOR UPDATE ... Oh, I see, that's a grammar only bit. I need to check rowMarks == NIL instead. It doesn't help anyway but at least I figured

Re: [GENERAL] Weird behavior with sensitive cursors.

2009-09-30 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: Tom Lane escribió: I think we need to ensure that when a cursor is created, it obtains a private copy of the current snapshot ... but I'm not sure where that ought to happen. Thoughts? Maybe you are right, but I don't think that's the only

Re: [GENERAL] Weird behavior with sensitive cursors.

2009-09-30 Thread Alvaro Herrera
Tom Lane escribió: Alvaro Herrera alvhe...@commandprompt.com writes: Tom Lane escribi�: I think we need to ensure that when a cursor is created, it obtains a private copy of the current snapshot ... but I'm not sure where that ought to happen. Thoughts? Maybe you are right, but I

Re: [GENERAL] Weird behavior with sensitive cursors.

2009-09-30 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: Tom Lane escribió: Well, the first problem is that 8.4 is failing to duplicate the historical behavior. Oh! That's easy. I don't think that testing rowMarks is the right thing at all here. That tells you whether it's a SELECT FOR UPDATE,