Re: [Fwd: Re: [GENERAL] Python client + select = locked resources???]

2009-07-01 Thread Craig Ringer
On Wed, 2009-07-01 at 09:23 +0200, durumdara wrote: > > > In this world I was everytime in transaction, because of reads are > > > also working under transactions. > > > > > > > Just like PostgreSQL. You can't run a query without a transaction in > > PostgreSQL; if you don't issue an explici

Re: [GENERAL] Python client + select = locked resources???

2009-07-01 Thread Scott Marlowe
Hey. You should turn on all statement logging and tail the postgresql logs to see what your python app is really doing. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] High consumns memory

2009-07-01 Thread Albe Laurenz
Anderson Valadares wrote: [this is on Windows, DB is accessed with ODBC driver 8.4.3] > Thanks for the answer ... > > But honestly I think that was a misunderstood. > > > > The memory increase issue is showed in the DATA column. > > Look how day by day it increases exponencially. > > In

[GENERAL] Multi - table statistics

2009-07-01 Thread Scara Maccai
Hi, I query is using Index scan instead of Bitmap Index Scan because it "thinks" that the number of rows returned will be low (12). In fact, the number of rows returned is 120. This happens because there are some WHERE conditions that check cross-tables values (something like taba.col1 < tabb

[GENERAL] cache reads vs. disk reads

2009-07-01 Thread Gerd König
Hello, I'm currently have to investigate some time to anyalyze how often the database has to read data from disk compared to the number of cache(shared buffer) accesses. I got the following key figures for an example table: a) pg_statio_user_indexes=> -[ RECORD 12 ]+

Re: [GENERAL] Regex Character-Class

2009-07-01 Thread Henry
Quoting "A. Kretschmer" : Try: test=*# SELECT '1.1.1.1' ~ E'^\\d+'; Ag, of course, thanks Andreas. Cheers Henry pgp5XMelkfQ4Y.pgp Description: PGP Digital Signature

Re: [GENERAL] Switching from MySQL: ON DUPLICATE KEY UPDATE, plpgsql function

2009-07-01 Thread Chris Spotts
> > > > Wouldn't you just be looking for something like: > > > > BEGIN; > > EXECUTE 'insert into forums_readposts values ('...')'; > >EXCEPTION when unique_violation THEN > >EXECUTE 'update forums_readposts set lastpostread = > '...' '; > > END; > > The logic as i read you

[GENERAL] Big Delete Consistently Causes a Crash

2009-07-01 Thread Tony Webb
Hi all, I have a 8.3 cluster running under VM. It seems fine for most activities (a bit slow but error free) but if the developer issues a delete statement it consistently kills the database. If the database is running in archive mode then it kills the archiver, else it kills the client sess

Re: [Fwd: Re: [GENERAL] Python client + select = locked resources???]

2009-07-01 Thread durumdara
Hi! 2009.07.01. 9:43 keltezéssel, Craig Ringer írta: On Wed, 2009-07-01 at 09:23 +0200, durumdara wrote: Firebird have repeatable read, but PG is not have it. Hmmm... Then that is meaning that every statement is in new transaction context which can makes inconsistency in the views... For

Re: [GENERAL] WAL and master multi-slave replication

2009-07-01 Thread Scot Kreienkamp
Thanks, Scot Kreienkamp La-Z-Boy Inc. skre...@la-z-boy.com 734-242-1444 ext 6379 -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Alvaro Herrera Sent: Wednesday, June 24, 2009 1:51 PM To: Eduardo Morras Cc: Scott Marl

Re: [GENERAL] Big Delete Consistently Causes a Crash

2009-07-01 Thread Tom Lane
Tony Webb writes: > I have a 8.3 cluster running under VM. It seems fine for most activities > (a bit slow but error free) but if the developer issues a delete > statement it consistently kills the database. >>> 2009-06-25 03:34:26 BST LOG: 0: server process (PID 8379) was >>> terminated by

Re: FW: [GENERAL] lack in psql console

2009-07-01 Thread Juan Camilo Marín
Hello . The problem was fix it , it was a PROMPT1 issue, I was using color in the prompt .. #\set PROMPT1 '%[%033[1;33;40m%...@%/%R%[%033[0m%#%] ' and I changed by #\set PROMPT1 '%...@%/%R%[%033[0m%#%]' and the problem was fixed :D Thx to all! On Wed, May 13, 2009 at 8:27 PM, Edmundo Robles

Re: [GENERAL] Python client + select = locked resources???

2009-07-01 Thread johnf
On Monday 29 June 2009 09:26:24 am Craig Ringer wrote: > Try connecting to the database with psql and running >   "select * from pg_stat_activity" > while the web app is running. You should see only "IDLE" or working > connections, never idle in transaction. If you have anything idle in a > transac

Re: [GENERAL] Python client + select = locked resources???

2009-07-01 Thread Scott Mead
On Wed, Jul 1, 2009 at 12:21 PM, johnf wrote: > On Monday 29 June 2009 09:26:24 am Craig Ringer wrote: > > Try connecting to the database with psql and running > > "select * from pg_stat_activity" > > while the web app is running. You should see only "IDLE" or working > > connections, never idl

[GENERAL] Preventing a user to use implicit casts

2009-07-01 Thread Stéphane A. Schildknecht
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, Is there a way to define some implicit casts so that only one specific database user can use them, and they're not visible to others? I'm facing the case where to have same behaviour as in 8.2 for this "Non-character data types are no longer auto

Re: [GENERAL] Preventing a user to use implicit casts

2009-07-01 Thread Scott Marlowe
On Wed, Jul 1, 2009 at 11:57 AM, "Stéphane A. Schildknecht" wrote: > Problem yet is I can't use slony any more to replicate data, as it falls in > I'm quit disappointed, as if I let slony replicate the application, still in a > process of migration to 8.3 correct behaviour can't be used, on the ot

Re: [GENERAL] Preventing a user to use implicit casts

2009-07-01 Thread Stéphane A. Schildknecht
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Scott Marlowe a écrit : > On Wed, Jul 1, 2009 at 11:57 AM, "Stéphane A. > Schildknecht" wrote: >> Problem yet is I can't use slony any more to replicate data, as it falls in > >> I'm quit disappointed, as if I let slony replicate the application, stil

Re: [GENERAL] Preventing a user to use implicit casts

2009-07-01 Thread Pavel Stehule
2009/7/1 "Stéphane A. Schildknecht" : > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi, > > Is there a way to define some implicit casts so that only one specific > database > user can use them, and they're not visible to others? no - it's not possible - maybe with some very ugly hacks -

Re: [GENERAL] High consumns memory

2009-07-01 Thread Merlin Moncure
On Mon, Jun 29, 2009 at 8:14 PM, Anderson Valadares wrote: > Hi all >  I have a software developed in Delphi as a Windows Service, but, i don't > know why, it consumns an unexpected large system memory (515m). > The service access PostgresSQL by ODBC driver (psqlodbc_08_03_0400) and it > consist si

[GENERAL] Does anyone know of a job scheduler that uses PostgreSQL?

2009-07-01 Thread Anthony Caduto
I am looking for something similar to: http://www.arcanadev.com/adtempus/ but without the MS SQL server dependency. Thanks, Tony -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Python client + select = locked resources???

2009-07-01 Thread Erik Jones
On Jul 1, 2009, at 9:21 AM, johnf wrote: On Monday 29 June 2009 09:26:24 am Craig Ringer wrote: Try connecting to the database with psql and running "select * from pg_stat_activity" while the web app is running. You should see only "IDLE" or working connections, never idle in transaction. If

Re: [GENERAL] Preventing a user to use implicit casts

2009-07-01 Thread Scott Marlowe
On Wed, Jul 1, 2009 at 12:11 PM, "Stéphane A. Schildknecht" wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Scott Marlowe a écrit : >> On Wed, Jul 1, 2009 at 11:57 AM, "Stéphane A. >> Schildknecht" wrote: >>> Problem yet is I can't use slony any more to replicate data, as it falls in >

Re: [GENERAL] datestyle no effect in 8.3.7

2009-07-01 Thread Bruce Momjian
johnf wrote: > I added "datestyle = 'SQL,MDY' to the postgres.conf (restarted the server). > But it does not appear to work with any setting. Is this a bug? Did I do > it wrong? > > openSUSE 11.0 postgres 8.3.7 Please show us a complete example of "not work", using SHOW datestyle and a quer

[GENERAL] 1 Sequence per Row i.e. each customer's first order starts at 1

2009-07-01 Thread Merrick
I have been using postgresql for 8 years in web projects and ran into a problem that I could not find a solution for in the archives or through Google. Here is a generalized example of what I want to happen. I have a customers table, and an orders table. I would like for each customer to have orde

[GENERAL] Problem search on text arrays, using the overlaps (&&) operator

2009-07-01 Thread John Cheng
We use text[] on one of our tables. This text[] column allows us to search for records that matches a keyword in a set of keywords. For example, if we want to find records that has a keyword of "foo" or "bar", we can use the condition: keywords && '{foo, bar}'::text[] Another wau is to do this

Re: [GENERAL] 1 Sequence per Row i.e. each customer's first order starts at 1

2009-07-01 Thread Greg Stark
On Thu, Jul 2, 2009 at 1:04 AM, Merrick wrote: > I would like for each customer > to have orders that start at 1 and move up sequentially. I realize > it's probably not efficient to create a new sequence for each > customer, so am looking for alternate ways to accomplish the same > thing. You coul

Re: [GENERAL] 1 Sequence per Row i.e. each customer's first order starts at 1

2009-07-01 Thread Scott Marlowe
On Wed, Jul 1, 2009 at 6:04 PM, Merrick wrote: > I have been using postgresql for 8 years in web projects and ran into > a problem that I could not find a solution for in the archives or > through Google. > > Here is a generalized example of what I want to happen. I have a > customers table, and an

Re: [GENERAL] 1 Sequence per Row i.e. each customer's first order starts at 1

2009-07-01 Thread Merrick
I was hoping there would be a way to add a field the sequence table postgresql automatically generates so I could rely on whatever mechanism postgresql uses to avoid the problems described thus far. I should have included more info, it's highly likely that multiple users will be accessing using sa

Re: [GENERAL] 1 Sequence per Row i.e. each customer's first order starts at 1

2009-07-01 Thread Scott Marlowe
I'm sure a trigger could be written to do what I just said. On Wed, Jul 1, 2009 at 7:46 PM, Merrick wrote: > I was hoping there would be a way to add a field the sequence table > postgresql automatically generates so I could rely on whatever > mechanism postgresql uses to avoid the problems descri

Re: [GENERAL] Bug in ecpg lib ?

2009-07-01 Thread leif
Hi Laurenz, I have now generate a rather small example where I experience the problem, attached. It is linked with the mudflapth library using the commands below. You may have to change the DBNAME and DBUSER. The delay just before the pthread_cancel(), i.e. sleep(10), is rather critical f

Re: [GENERAL] 1 Sequence per Row i.e. each customer's first order starts at 1

2009-07-01 Thread Scott Marlowe
On Wed, Jul 1, 2009 at 7:46 PM, Merrick wrote: > I was hoping there would be a way to add a field the sequence table > postgresql automatically generates so I could rely on whatever > mechanism postgresql uses to avoid the problems described thus far. > > I should have included more info, it's high

Re: [GENERAL] 1 Sequence per Row i.e. each customer's first order starts at 1

2009-07-01 Thread Merrick
Thank you, this helps get me on the right path. On Wed, Jul 1, 2009 at 7:12 PM, Scott Marlowe wrote: > On Wed, Jul 1, 2009 at 7:46 PM, Merrick wrote: >> I was hoping there would be a way to add a field the sequence table >> postgresql automatically generates so I could rely on whatever >> mechanis

R: [GENERAL] Does anyone know of a job scheduler that uses PostgreSQL?

2009-07-01 Thread Scara Maccai
> I am looking for something similar > to: > http://www.arcanadev.com/adtempus/  but without > the MS SQL server dependency. http://www.pgadmin.org/docs/1.4/pgagent.html -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.p