Re: [GENERAL] identify database process given client process

2008-03-17 Thread Shane Ambler
Joey K. wrote: On Mon, Mar 17, 2008 at 6:58 AM, hogcia <[EMAIL PROTECTED]> wrote: Hi, I have to find a Postgres database process pid (or other identification) for a given client process pid. Or client processes for a database process. How are they connected? I was suggested maybe netstat could

Re: [GENERAL] Problem with async notifications of table updates

2008-03-17 Thread Tyler, Mark
Tom Lane wrote: >"Tyler, Mark" <[EMAIL PROTECTED]> writes: >> Secondly, the lack of any delivery guarantee means my subscriber >> applications may miss event notifications. This is a very bad thing >> for my particular application. > > What makes you think NOTIFY doesn't guarantee delivery? If t

Re: [GENERAL] Is autovacuum on?

2008-03-17 Thread Filip Rembiałkowski
2008/3/18, Blair Bethwaite <[EMAIL PROTECTED]>: > Hi all, > > I've just upgraded to 8.3 and am looking at using autovacuum. We have > a long running application with high update frequency that > periodically issues vacuum commands itself. I'd like to be able to add > code to the app like: > if

Re: [GENERAL] Problem with async notifications of table updates

2008-03-17 Thread Tom Lane
"Tyler, Mark" <[EMAIL PROTECTED]> writes: > Secondly, the lack of any delivery guarantee means my subscriber > applications may miss event notifications. This is a very bad thing for > my particular application. What makes you think NOTIFY doesn't guarantee delivery? If the transaction commits th

Re: [GENERAL] Problem with async notifications of table updates

2008-03-17 Thread Tyler, Mark
Tom Lane wrote: >"Tyler, Mark" <[EMAIL PROTECTED]> writes: >> What I want to do is to guarantee that the row is available for >> selection prior to sending the message. > > You cannot do that with an AFTER trigger, because whatever it > does necessarily happens before your transaction commits.

Re: [GENERAL] Problem with async notifications of table updates

2008-03-17 Thread Tom Lane
"Tyler, Mark" <[EMAIL PROTECTED]> writes: > What I want to do is to guarantee that the row is available for > selection prior to sending the message. You cannot do that with an AFTER trigger, because whatever it does necessarily happens before your transaction commits. I suggest rethinking your d

Re: [GENERAL] 8.3.0 upgrade

2008-03-17 Thread Adam Rich
Thanks to Pavan for the answer regarding HOT. Does anybody have an answer regarding the postgres role or compat lib ? > > * From: "Adam Rich" > * To: > * Subject: 8.3.0 upgrade > * Date: Mon, 17 Mar 2008 02:13:55 -0500 > > > I just finished upgrading my production DB to 8

Re: [GENERAL] Using PL/R for predictive analysis of data.

2008-03-17 Thread Josh Tolley
On Mon, Mar 17, 2008 at 2:27 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi Sam, > > Thankyou for the suggestions. They make perfect sense to me. I > appreciate your time and input. The lack of optimiser usage was > something that I had not considered, and I thank you for making me > awa

Re: [GENERAL] Problem with async notifications of table updates

2008-03-17 Thread Tyler, Mark
Rodrigo Gonzalez wrote: > I am almost sure you've defined a BEFORE trigger and > you need and AFTER trigger, so it's fired after commiting. No - I am definitely using an AFTER trigger. Following is a simplified version of what I am trying to do. /* messages - log messages */ CREATE TABLE messag

Re: [GENERAL] Updating

2008-03-17 Thread Tom Lane
Bob Pawley <[EMAIL PROTECTED]> writes: > If NEW.p_id.association.monitoring_fluid is distinct from > Old.p_id.association.monitoring_fluid Then Surely this should just be if new.monitoring_fluid is distinct from old.monitoring_fluid then Also, I think you forgot an "end if" and a "retu

[GENERAL] Is autovacuum on?

2008-03-17 Thread Blair Bethwaite
Hi all, I've just upgraded to 8.3 and am looking at using autovacuum. We have a long running application with high update frequency that periodically issues vacuum commands itself. I'd like to be able to add code to the app like: if pg.autovacuum == "on": self.routine_vacuuming = False else:

Re: [GENERAL] storage size of "bit" data type..

2008-03-17 Thread Bruce Momjian
Added to TODO: * Reduce BIT data type overhead using short varlena headers http://archives.postgresql.org/pgsql-general/2007-12/msg00273.php --- Decibel! wrote: > On Dec 5, 2007, at 7:23 PM, Michael Glaesemann wrote: >

Re: [GENERAL] Moving pgstat.stat and pgstat.tmp

2008-03-17 Thread Bruce Momjian
Added to TODO: * Reduce file system activity overhead of statistics file pgstat.stat http://archives.postgresql.org/pgsql-general/2007-12/msg00106.php --- Erik Jones wrote: > Hi, I'm currently doctoring a situation wher

Re: [GENERAL] Updating

2008-03-17 Thread Bob Pawley
Following is the code that gives me the error. CREATE OR REPLACE FUNCTION monitor_install() RETURNS trigger AS $$ Begin If NEW.p_id.association.monitoring_fluid is distinct from Old.p_id.association.monitoring_fluid Then INSERT INTO p_id.devices (device_number) (Select mon_function from p_id.

Re: [GENERAL] Problem with async notifications of table updates

2008-03-17 Thread Rodrigo Gonzalez
Tyler, Mark escribió: Hi, I am trying to set up a PostGreSQL database to send asynchronous notifications when certain inserts or updates are performed on the tables. The idea is I want to have publish / subscirbe model with the database in the centre as the information hub. An application wi

Re: [GENERAL] Updating

2008-03-17 Thread Daniel Verite
Bob Pawley wrote: I am attempting to use the following code but I get - "ERROR: NEW used in query that is not in a rule". This implies that I create a rule for NEW and OLD (which I haven't needed before). No, but are you sure you're using these keywords in the context of a plpgsql

[GENERAL] Problem with async notifications of table updates

2008-03-17 Thread Tyler, Mark
Hi, I am trying to set up a PostGreSQL database to send asynchronous notifications when certain inserts or updates are performed on the tables. The idea is I want to have publish / subscirbe model with the database in the centre as the information hub. An application will insert a record into a ta

Re: [GENERAL] Fragments in tsearch2 headline

2008-03-17 Thread Teodor Sigaev
Teodor, Oleg, do we want this? http://archives.postgresql.org/pgsql-general/2007-11/msg00508.php I suppose, we want it. But there are a questions/issues: - Is it needed to introduce new function? may be it will be better to add option to existing headline function. I'd like to keep cu

Re: [GENERAL] identify database process given client process

2008-03-17 Thread Joey K.
On Mon, Mar 17, 2008 at 6:58 AM, hogcia <[EMAIL PROTECTED]> wrote: > Hi, > I have to find a Postgres database process pid (or other > identification) for a given client process pid. Or client processes > for a database process. How are they connected? I was suggested maybe > netstat could give me

Re: [GENERAL] Updating

2008-03-17 Thread Bob Pawley
I am attempting to use the following code but I get - "ERROR: NEW used in query that is not in a rule". This implies that I create a rule for NEW and OLD (which I haven't needed before). Could someone point me to the proper synatx for such a rule? BTW I noticed that Adrian used != . Is this s

Re: [GENERAL] Fragments in tsearch2 headline

2008-03-17 Thread Bruce Momjian
Teodor, Oleg, do we want this? http://archives.postgresql.org/pgsql-general/2007-11/msg00508.php --- Sushant Sinha wrote: > I wrote a headline generation function for my app and I have attached > the patch (against

[GENERAL] Re: [GENERAL] large object import

2008-03-17 Thread postgre
> Původní zpráva > Od: Albe Laurenz <[EMAIL PROTECTED]> > Předmět: Re: [GENERAL] large object import > Datum: 10.3.2008 08:44:30 > > > [EMAIL PROTECTED] wrote: > > I am having a stored function in plperlU which is called from > > p

[GENERAL] identify database process given client process

2008-03-17 Thread hogcia
Hi, I have to find a Postgres database process pid (or other identification) for a given client process pid. Or client processes for a database process. How are they connected? I was suggested maybe netstat could give me the answer and I think those are two pf_unix processes. But maybe there are so

Re: [GENERAL] Catch-22

2008-03-17 Thread Tom Lane
"Gauthier, Dave" <[EMAIL PROTECTED]> writes: > Woops, sorry > mmdcc228> more global/pg_database > "postgres" 10819 1663 524 > "template1" 1 1663 524 > "template0" 10818 1663 524 > "cells_dev" 823888 1663 524 > "stdb2" 19810 1663 524 > "stdb" 597974 1663 524 > "stdb_standby" 19882 1663 524 > "ce

Re: [GENERAL] Catch-22

2008-03-17 Thread Gauthier, Dave
Woops, sorry mmdcc228> more global/pg_database "postgres" 10819 1663 524 "template1" 1 1663 524 "template0" 10818 1663 524 "cells_dev" 823888 1663 524 "stdb2" 19810 1663 524 "stdb" 597974 1663 524 "stdb_standby" 19882 1663 524 "cells" 16384 1663 524 mmdcc228> ls base/ 1 10818 10819 16384

Re: [GENERAL] Catch-22

2008-03-17 Thread hubert depesz lubaczewski
On Mon, Mar 17, 2008 at 08:45:59AM -0700, Gauthier, Dave wrote: > stdb=# select oid,ctid,xmin,xmax,datname from pg_database > stdb-# ; > oid | ctid | xmin | xmax | datname > ++-+--+-- > 10819 | (0,1) | 592 |0 | postgres > 1 | (0,6)

Re: [GENERAL] Catch-22

2008-03-17 Thread Erik Jones
"Gauthier, Dave" <[EMAIL PROTECTED]> writes: After running intoa problem last week where I cannot rename an existing DB because it's reported to not exist (I can attach to it and query OK, but rename gives... "database foo does not exist"), Would you show the results of select oid,ctid,x

Re: [GENERAL] Catch-22

2008-03-17 Thread Gauthier, Dave
stdb=# select oid,ctid,xmin,xmax,datname from pg_database stdb-# ; oid | ctid | xmin | xmax | datname ++-+--+-- 10819 | (0,1) | 592 |0 | postgres 1 | (0,6) | 585 |0 | template1 10818 | (0,7) | 586 |0 | template0

Re: [GENERAL] postgre vs MySQL

2008-03-17 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, 17 Mar 2008 09:26:35 -0500 Erik Jones <[EMAIL PROTECTED]> wrote: > > While I agree companies are likely to get annoyed - just like fast > > food companies do when you say how much trans-fats their products > > contain; I'm rather curious what

Re: [GENERAL] shared memory/max_locks_per_transaction error

2008-03-17 Thread Kynn Jones
Tom, Alvaro: Thank you much for the clarification. It's "back to the drawing board" for me! Kynn On Mon, Mar 17, 2008 at 10:55 AM, Tom Lane <[EMAIL PROTECTED]> wrote: > "Kynn Jones" <[EMAIL PROTECTED]> writes: > > I'm leaning towards the re-design option, primarily because I really > don't > >

Re: [GENERAL] Catch-22

2008-03-17 Thread Tom Lane
"Gauthier, Dave" <[EMAIL PROTECTED]> writes: > After running intoa problem last week where I cannot rename an existing > DB because it's reported to not exist (I can attach to it and query OK, > but rename gives... "database foo does not exist"), Would you show the results of select oid,ctid,xmin

Re: [GENERAL] Get info about indexes

2008-03-17 Thread A. Kretschmer
am Mon, dem 17.03.2008, um 17:07:20 +0300 mailte AlannY folgendes: > Hello, there. > > I need a method of extracting information about indexes of any table > from information_schema. > > Have you any suggestions? Yes, http://www.alberton.info/postgresql_meta_info.html Andreas -- Andreas Kre

Re: [GENERAL] Using PL/R for predictive analysis of data.

2008-03-17 Thread [EMAIL PROTECTED]
Hi Sam, Thankyou for the suggestions. They make perfect sense to me. I appreciate your time and input. The lack of optimiser usage was something that I had not considered, and I thank you for making me aware of it. Cheers The Frog -- Sent via pgsql-general mailing list (pgsql-general@postgresq

Re: [GENERAL] shared memory/max_locks_per_transaction error

2008-03-17 Thread Erik Jones
On Mar 17, 2008, at 9:55 AM, Tom Lane wrote: "Kynn Jones" <[EMAIL PROTECTED]> writes: I'm leaning towards the re-design option, primarily because I really don't really understand the consequences of cranking up max_locks_per_transaction. E.g. Why is its default value 2^6, instead of, say, 2

Re: [GENERAL] beginner: what permissions required to install on windows 2000+

2008-03-17 Thread Dee
Anybody else have any other suggestions? Please CC me on any responses, so I can respond promptly. Details: == The error occurs during the installation of version postgresql-8.3.msi (8.3.0-1). - I was logged in as a user with admin rights. Firew

Re: [GENERAL] Get info about indexes

2008-03-17 Thread Tom Lane
AlannY <[EMAIL PROTECTED]> writes: > I need a method of extracting information about indexes of any table > from information_schema. There is nothing about indexes in the information_schema (this is not a bug, it's an intentional decision by the standards committee). If you want to know about ind

[GENERAL] Get index information from information_schema?

2008-03-17 Thread AlannY
Hello, there. I need a method of extracting information about indexes of any table from information_schema. Have you any suggestions? Thank you. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsq

[GENERAL] postgresql performance tuning tools

2008-03-17 Thread sathiya psql
hi all, I want this mail to be continued about summary of performance tuning tools... or other postgres related tools.. I ll start with saying there is a tool SCHEMASPY ( i got to know about this from another group ), this will draw ER diagram and gives interesting informations about our postgres

[GENERAL] Get info about indexes

2008-03-17 Thread AlannY
Hello, there. I need a method of extracting information about indexes of any table from information_schema. Have you any suggestions? Thank you. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsq

Re: [GENERAL] shared memory/max_locks_per_transaction error

2008-03-17 Thread Tom Lane
"Kynn Jones" <[EMAIL PROTECTED]> writes: > I'm leaning towards the re-design option, primarily because I really don't > really understand the consequences of cranking up max_locks_per_transaction. > E.g. Why is its default value 2^6, instead of, say, 2^15? In fact, why is > there a ceiling on the

Re: [GENERAL] shared memory/max_locks_per_transaction error

2008-03-17 Thread Alvaro Herrera
Kynn Jones escribió: > I'm leaning towards the re-design option, primarily because I really don't > really understand the consequences of cranking up max_locks_per_transaction. > E.g. Why is its default value 2^6, instead of, say, 2^15? It's because it (partly) defines how much shared memory the

[GENERAL] Catch-22

2008-03-17 Thread Gauthier, Dave
Hi: After running intoa problem last week where I cannot rename an existing DB because it's reported to not exist (I can attach to it and query OK, but rename gives... "database foo does not exist"), I've done a full dump of the DB and want to delete/recreate it with the backup. But I can't "dr

Re: [GENERAL] postgre vs MySQL

2008-03-17 Thread Erik Jones
On Mar 15, 2008, at 8:58 AM, Ron Mayer wrote: Greg Smith wrote: On Fri, 14 Mar 2008, Andrej Ricnik-Bay wrote: A silly question in this context: If we know of a company that does use PostgreSQL but doesn't list it anywhere ... can we take the liberty to publicise this somewhere anyway? I

Re: [GENERAL] shared memory/max_locks_per_transaction error

2008-03-17 Thread Kynn Jones
On Fri, Mar 14, 2008 at 7:12 PM, Tom Lane <[EMAIL PROTECTED]> wrote: > "Kynn Jones" <[EMAIL PROTECTED]> writes: > > Initially I didn't know what our max_locks_per_transaction was (nor even > a > > typical value for it), but in light of the procedure's failure after > 3500 > > iterations, I figured

Re: [GENERAL] How to silence psql notices, warnings, etc.?

2008-03-17 Thread Kynn Jones
Tom, Albe, Thanks for the client_min_messages pointer; it did the trick. On Sun, Mar 16, 2008 at 2:53 PM, Scott Marlowe <[EMAIL PROTECTED]> wrote: > > If you start postgresql from the pg_ctl command line and it's set to > log to stdout, then continue to use that terminal for psql afterwards, > yo

Re: [GENERAL] Updating

2008-03-17 Thread Adrian Klaver
On Monday 17 March 2008 4:54 am, Daniel Verite wrote: > Adrian Klaver wrote: > > CREATE FUNCTION foo() RETURNS trigger AS > > $Body$ > > BEGIN > > IF NEW.colname != OLD.colname THEN > > ..."Do something"..; > > RETURN whatever; > > ELSE > > RETURN NEW:

Re: [GENERAL] Cannot Install PostgreSQL on Windows 2000 Server

2008-03-17 Thread Dee
Were you ever able to install PostgreSQL on windows 2000? I am having similar problems on 2000 Pro and have absolutely zero luck with it. Dee - Looking for last minute shopping deals? Find them fast with Yahoo! Search.

Re: [GENERAL] LOCK TABLE HELP

2008-03-17 Thread Alvaro Herrera
[EMAIL PROTECTED] wrote: > Sorry for delay in my answer. The problem is that with the lock > instructions my app remain in a freeze state. It resembling a MUTEX > deadlock.Anyway, as soon as possible I'll test yuor idea to use a > separate PQexec. Freeze state? Oh, you mean like somebody already

Re: [GENERAL] 8.3.0 upgrade

2008-03-17 Thread Pavan Deolasee
On Mon, Mar 17, 2008 at 12:43 PM, Adam Rich <[EMAIL PROTECTED]> wrote: > > Finally, regarding the new "HOT" feature. The release notes say that > benefits are realized "if no changes are made to indexed columns". > If my updates include *all columns* (the SQL is generated dynamically) > but t

Re: [GENERAL] Updating

2008-03-17 Thread Daniel Verite
Adrian Klaver wrote: CREATE FUNCTION foo() RETURNS trigger AS $Body$ BEGIN IF NEW.colname != OLD.colname THEN ..."Do something"..; RETURN whatever; ELSE RETURN NEW: END IF; END; $Body$ LANGUAGE plpgsql; Beware t

[GENERAL] 8.3.0 upgrade

2008-03-17 Thread Adam Rich
I just finished upgrading my production DB to 8.3.0. Everything went smoothly, but I thought of a few questions. After the upgrade, while restoring my backup to the new version, I got this error message: ERROR: role "postgres" already exists I assume this is nothing to be concerned about. B

Re: [GENERAL] LOCK TABLE HELP

2008-03-17 Thread luca . ciciriello
per te: http://www.email.it/f Sponsor: Scopri le tue passioni con Leonardo.it! Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7615&d=20080317

Re: [GENERAL] restore_command %r option

2008-03-17 Thread Steven Flatt
So I had been using the "Time of latest checkpoint" value from pg_controldata, and freely deleting any archive files that were archived prior to this time, but it appears as though this is not safe since after restoring the ".backup" archive file at the start of recovery, I've accidentally deleted

Re: [GENERAL] How to silence psql notices, warnings, etc.?

2008-03-17 Thread Albe Laurenz
Kynn Jones wrote: > How does one silence NOTICE and WARNING messages in psql? > I've tried \set QUIET on, \set VERBOSITY terse, and even \o /dev/null, > but I still get them! Have you tried SET client_min_messages = ERROR; ? Yours, Laurenz Albe -- Sent via pgsql-general mailing list (pgsql-gen

Re: [GENERAL] PG secure for financial applications ...

2008-03-17 Thread Albe Laurenz
Micah Yoder wrote: > I was also thinking a bit more broad than just finance. Could PG be used, for > example, as a multiplayer strategy game server where clients can directly > connect without another middleware daemon? Seems to me like it has > everything necessary, except for this problem. Eac