Re: [GENERAL] Weird behavior with "sensitive" cursors.

2009-09-30 Thread Tom Lane
Alvaro Herrera 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, but actually we want an

Re: [GENERAL] Weird behavior with "sensitive" cursors.

2009-09-30 Thread Alvaro Herrera
Tom Lane escribió: > Alvaro Herrera 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 tha

Re: [GENERAL] Weird behavior with "sensitive" cursors.

2009-09-30 Thread Tom Lane
Alvaro Herrera 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 bug here. Well, the

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 Alvaro Herrera
Tom Lane escribió: > Alvaro Herrera 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 ind

Re: [GENERAL] Weird behavior with "sensitive" cursors.

2009-09-30 Thread Tom Lane
Alvaro Herrera 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 trying the given case. It

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. > > po

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 wrote: > In response to Ricky Tompu Breaky : > > > Dear my friends > > > > I can not drop a user because another object need it. How can I know >

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

2009-09-30 Thread György Vilmos
2009/9/30 Scott Marlowe > On Tue, Sep 29, 2009 at 4:47 PM, Greg Smith 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 to really test a db, you need a > ben

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

2009-09-30 Thread György Vilmos
2009/9/30 Greg Smith > 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 backwards as far

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

2009-09-30 Thread György Vilmos
2009/9/29 Grzegorz Jaśkiewicz > 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/29 Amitabh Kant > On Tue, Sep 29, 2009 at 1:06 PM, György Vilmos wrote: > >> 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 version. >> You can find the article h

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

[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 d

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 : > 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 accomplish this i

[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 Ob

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 th

Re: [GENERAL] error message and documentation

2009-09-30 Thread Tom Lane
Ivano Luberti 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
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 didn't

Re: [GENERAL] error message and documentation

2009-09-30 Thread Tom Lane
Ivano Luberti 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 question: is th

[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 34

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

2009-09-30 Thread Tom Lane
John R Pierce 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 is actually

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 > 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

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 periodi

[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 m

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 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 updat

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 a

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

2009-09-30 Thread Tom Lane
Thomas Jacob 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" > conditions

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

[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 p

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

2009-09-30 Thread Tom Lane
=?UTF-8?B?57qq5pmT5pum?= 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 pgsql-general mai

[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

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 the

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

2009-09-30 Thread Bill Moran
In response to Vick Khera : > On Tue, Sep 29, 2009 at 9:48 AM, Bill Moran 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 any actual evidence. > > Just la

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

2009-09-30 Thread Bill Moran
In response to tomrevam : > 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 that he's u

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 : http://www.postgresql.org/

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 calcula

[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 ve

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 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] 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] 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.

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 leas

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, Direc