Re: [GENERAL] Lock out PostgreSQL users for maintenance

2012-05-11 Thread Frank Lanitz
On Sat, 12 May 2012 06:29:54 +0200 Alexander Farber wrote: > Or should I edit pg_hba.conf and restart the process? At least this is what we are doing. We are having a normal pg_hba.conf and a pg_hba.conf for maintenance and switching on demand. Maybe not the best solution, but its working ;) C

[GENERAL] Variables inside plpythonu

2012-05-11 Thread Frank Lanitz
Hi folks, I did check the documentation but seem to didn't found the best way to use plpythonu with a variable inside a query. Let's say I want to run this query SELECT id FROM some_table WHERE date= How a CREATE FUNCTION stateent have to look like? I already figured out that the python code s

[GENERAL] Lock out PostgreSQL users for maintenance

2012-05-11 Thread Alexander Farber
Hello, In PostgreSQL 8.4.9 with pgbouncer 1.3.4 in pool_mode = session (but some users connect to the database directly) - when I login as "super user" with psql -U postgres -W postgres What is the command please to disconnect all "normal users" and prevent them from connecting again while I

Re: [GENERAL] backup script

2012-05-11 Thread Steve Crawford
On 05/11/2012 12:38 PM, Vo, Catherine CTR DTIC Z wrote: We are using Sun Solaris 64bits version 10. postgresql-9.1.3-S10.sparc-6 I downloaded the script from some of the website and try to test out but didn't work at all. Don't know how to create a backup user (I know the syntax but where shoul

Re: [GENERAL] backup script

2012-05-11 Thread Stefan Tzeggai
Hi Am 11.05.2012 21:38, schrieb Vo, Catherine CTR DTIC Z: > We are using Sun Solaris 64bits version 10. > postgresql-9.1.3-S10.sparc-6 > > Don't know how to create a backup user (I know the > syntax but where should I create it?) I don't know Solaris, but with the installation of Postgres on L

Re: [GENERAL] backup script

2012-05-11 Thread Vo, Catherine CTR DTIC Z
We are using Sun Solaris 64bits version 10. postgresql-9.1.3-S10.sparc-6 I downloaded the script from some of the website and try to test out but didn't work at all. Don't know how to create a backup user (I know the syntax but where should I create it?) Normall, we goes to sqlplus / as sysdba o

Re: [GENERAL] backup script

2012-05-11 Thread Raymond O'Donnell
On 11/05/2012 16:23, Vo, Catherine CTR DTIC Z wrote: > GM, > > First where can I post my question on the forum? Couldn't find the > forum for discussion. Hi there, Not sure what forum you mean you're writing to the pgsql-general mailing list, so you're already in the right place. > Second,

Re: [GENERAL] UDF in C slow

2012-05-11 Thread Inanc Seylan
I'm quite new to Postgres so I don't know how to read the execution plans. However it is obvious that the plans for the query with and without the function are different. I added some indices to the table roleassertions and it seems to solve this big difference in the execution times of both qu

Re: [GENERAL] UDF in C slow

2012-05-11 Thread Tom Lane
Inanc Seylan writes: > It is IMMUTABLE. I attach the output of EXPLAIN both with and without > the simple function (returning true only) in the query. EXPLAIN ANALYZE would have been far more helpful. However, the thing that jumps out at me here is all the seqscans on table "symbols". Do you no

[GENERAL] backup script

2012-05-11 Thread Vo, Catherine CTR DTIC Z
GM, First where can I post my question on the forum? Couldn't find the forum for discussion. Second, I'm new with postgres. Try to evaluate this new db software before the company can switch all oracle and mysql to postgres. I don't understand the concept how to create backup user, tablespace,

Re: [GENERAL] avoiding CONTEXT messages

2012-05-11 Thread Filip Rembiałkowski
On Fri, May 11, 2012 at 9:41 AM, hubert depesz lubaczewski < dep...@depesz.com> wrote: > On Fri, May 11, 2012 at 09:09:46AM -0500, Filip Rembiałkowski wrote: > > I am using PostgreSQL 9.0 and I want to suppress CONTEXT part of error > > message for selected user defined Pl/PgSQL functions. > > Is

Re: [GENERAL] avoiding CONTEXT messages

2012-05-11 Thread hubert depesz lubaczewski
On Fri, May 11, 2012 at 09:09:46AM -0500, Filip Rembiałkowski wrote: > I am using PostgreSQL 9.0 and I want to suppress CONTEXT part of error > message for selected user defined Pl/PgSQL functions. > Is this possible? it's up to application to hide it. for example - in psql, you do it by setting:

Re: [GENERAL] UDF in C slow

2012-05-11 Thread Inanc Seylan
It is IMMUTABLE. I attach the output of EXPLAIN both with and without the simple function (returning true only) in the query. On 5/11/12 4:21 PM, Alban Hertroys wrote: On 11 May 2012 15:57, Inanc Seylan wrote: Hi all, I have implemented a user-defined function in C that returns a boolean val

Re: [GENERAL] UDF in C slow

2012-05-11 Thread Alban Hertroys
On 11 May 2012 15:57, Inanc Seylan wrote: > Hi all, > > I have implemented a user-defined function in C that returns a boolean value > after some computation. Now I have a query Q such that when I specify the > function in the WHERE clause of Q, Q runs in 40 secs and if I don't use the > function

Re: [GENERAL] avoiding CONTEXT messages

2012-05-11 Thread Pavel Stehule
2012/5/11 Filip Rembiałkowski : > Hi, > > I am using PostgreSQL 9.0 and I want to suppress CONTEXT part of error > message for selected user defined Pl/PgSQL functions. > Is this possible? probably no. context is detected before filtering is applyed Pavel > > http://www.postgresql.org/docs/9.0

[GENERAL] avoiding CONTEXT messages

2012-05-11 Thread Filip Rembiałkowski
Hi, I am using PostgreSQL 9.0 and I want to suppress CONTEXT part of error message for selected user defined Pl/PgSQL functions. Is this possible? http://www.postgresql.org/docs/9.0/static/runtime-config-logging.html#GUC-LOG-ERROR-VERBOSITYsuggests it is... My function is running on superuser acc

[GENERAL] UDF in C slow

2012-05-11 Thread Inanc Seylan
Hi all, I have implemented a user-defined function in C that returns a boolean value after some computation. Now I have a query Q such that when I specify the function in the WHERE clause of Q, Q runs in 40 secs and if I don't use the function it runs in 4 secs. Then I thought that my impleme

Re: [GENERAL] Why is RELEASE SAVEPOINT sometimes slow?

2012-05-11 Thread Simon Riggs
On 11 May 2012 11:16, Evan Martin wrote: > I'm running a bulk import application against PostgreSQL 9.1.3, which has > several stages and each stage follows the same general pattern: > > BEGIN TRANSACTION > DELETE (many rows) > > CREATE SAVEPOINT > INSERT > ... > RELEASE SAVEPOINT > > CREATE SAVEP

[GENERAL] Why is RELEASE SAVEPOINT sometimes slow?

2012-05-11 Thread Evan Martin
I'm running a bulk import application against PostgreSQL 9.1.3, which has several stages and each stage follows the same general pattern: BEGIN TRANSACTION DELETE (many rows) CREATE SAVEPOINT INSERT ... RELEASE SAVEPOINT CREATE SAVEPOINT INSERT INSERT ... half an hour of inserts later ... RELE

Re: [GENERAL] Sequence scan if "OR Condition" in where statement

2012-05-11 Thread Albe Laurenz
Prashant Bharucha wrote: > Could you please help me , index is not using if have "OR condition in where statement" ? > > Always have sequence scan. You need to provide more details, see http://wiki.postgresql.org/wiki/SlowQueryQuestions to get an idea. Yours, Laurenz Albe -- Sent via pgsql-gen