Re: [GENERAL] target list evaluation wrt sequences

2004-04-29 Thread Tom Lane
> elein <[EMAIL PROTECTED]> wrote: >> Is the order of the target list guaranteed? AFAIR, all current and past Postgres versions evaluate target lists left-to-right. This is not guaranteed to remain true forever, since neither the SQL spec nor our own docs promise it anywhere... but offhand I ca

Re: [GENERAL] TCP only listening on localhost???

2004-04-29 Thread Tom Lane
Richard Gass <[EMAIL PROTECTED]> writes: > This was all working fine until I recently. It has been a long time since I > have restarted the server ( 5:05pm up 377 days, 18:36, 7 users, load > average: 0.00, 0.00, 0.00) and it has been a long time since I restarted the > postgres DB. I wonder

Re: [GENERAL] Unable to use index?

2004-04-29 Thread Tom Lane
Edmund Dengler <[EMAIL PROTECTED]> writes: > Hmm, interesting as I have that table clustered starting with the > rep_component, so 'ps_probe' will definitely appear later in a sequential > scan. So why does the force the use of the index? It does not "force" anything, it simply alters the cost es

Re: [GENERAL] postgresql idle

2004-04-29 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Several things. I think I wrote them along with my previous patch. The > visibility rules and the pg_clog protocol are what comes to mind > immediately. This is the difficult part. Difficult part? I think those are easy --- they are narrow and alrea

Re: [GENERAL] postgresql idle

2004-04-29 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: >> Yeah. We agreed in principle awhile back to "fix" this on the backend >> side by postponing the actual transaction start until the first command >> after BEGIN. > Actually, my patch is waiting for you to review it ;-) On the other > hand, since I'm a

Re: [GENERAL] Plpgsql problem passing ROWTYPE to function

2004-04-29 Thread Tom Lane
"Karl O. Pinc" <[EMAIL PROTECTED]> writes: > What a drag. The documentation says it supports this. No it doesn't ... > "Parameters to a function can be composite types (complete table > rows). In that case, the corresponding identifier $n will be a row > variable, and fields can be selected

Re: [GENERAL] postgresql idle

2004-04-29 Thread Kris Jurka
On Thu, 29 Apr 2004, Andrew Rawnsley wrote: > > I find that some clients (DBVisualizer for one) do exactly that - > execute the COMMIT;BEGIN sequence, and leaves idle > transactions on a consistent basis. > The 7.5 JDBC driver has been fixed to avoid this problem. Kris Jurka ---

Re: [GENERAL] postgresql idle

2004-04-29 Thread Alvaro Herrera
On Thu, Apr 29, 2004 at 10:31:07PM -0400, Bruce Momjian wrote: > Alvaro Herrera wrote: > > > > Yeah. We agreed in principle awhile back to "fix" this on the backend > > > > side by postponing the actual transaction start until the first command > > > > after BEGIN. I looked at this just before 7.

Re: [GENERAL] postgresql idle

2004-04-29 Thread Bruce Momjian
Alvaro Herrera wrote: > > > Yeah. We agreed in principle awhile back to "fix" this on the backend > > > side by postponing the actual transaction start until the first command > > > after BEGIN. I looked at this just before 7.4 feature freeze, but > > > decided it wasn't quite trivial and I hadn'

Re: [GENERAL] postgresql idle

2004-04-29 Thread Alvaro Herrera
On Thu, Apr 29, 2004 at 09:54:08PM -0400, Bruce Momjian wrote: > Tom Lane wrote: > > Andrew Sullivan <[EMAIL PROTECTED]> writes: > > > On Thu, Apr 29, 2004 at 03:57:59PM -0400, Andrew Rawnsley wrote: > > >> I find that some clients (DBVisualizer for one) do exactly that - > > >> execute the COMMI

Re: [GENERAL] "Idle in Transaction" and hung connections

2004-04-29 Thread Kris Jurka
On Thu, 29 Apr 2004, Gregory S. Williamson wrote: > Tom -- > > Thanks for the suggestion, and the rapid response on something which may > not be truely a postgres issue (perhaps more a JDBC thing)! > This behavior is fixed in the 7.5 cvs version of the JDBC driver if you'd like to try it out.

Re: [GENERAL] postgresql idle

2004-04-29 Thread Bruce Momjian
Is this a TODO? --- Tom Lane wrote: > Andrew Sullivan <[EMAIL PROTECTED]> writes: > > On Thu, Apr 29, 2004 at 03:57:59PM -0400, Andrew Rawnsley wrote: > >> I find that some clients (DBVisualizer for one) do exactly that - >

Re: [GENERAL] Postgre and Web Request

2004-04-29 Thread Tatsuo Ishii
> On Thu, 29 Apr 2004, Tatsuo Ishii wrote: > > > > > Depending on your web development environment (java, php, .NET) etc, > > > > you should be able to use some mechanism that will provide a pool of > > > > connections to the database. Each request does not open a new > > > > connection (and then

Re: [GENERAL] Timestamp problems...wrong weeks.

2004-04-29 Thread Campano, Troy
Is there any way with SQL to get what I'm trying to get? Where (in this month, April): April 1 - 3 (Week 1) April 4 - 10 (Week 2) April 11 - 17 (Week 3) April 18 - 24 (Week 4) April 25 - 30 (Week 5) Thank you! ~ Troy Campano ~ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL P

Re: [GENERAL] trying to restore after a server failure...need some help

2004-04-29 Thread Tom Lane
"David A. Ulevitch" <[EMAIL PROTECTED]> writes: > I did the normal debian binary install of postgresql-server and copies > everything from the old server's /var/lib/postgres to the new > /var/lib/postgres. I then copied everything from /etc/postgresql from the > old server to the new server too. (

Re: [GENERAL] Timestamp problems...wrong weeks.

2004-04-29 Thread Andrew Sullivan
On Thu, Apr 29, 2004 at 02:42:49PM -0400, Campano, Troy wrote: > > This is causing my reports to print out incorrect data. > Do you know why this would happen? Am I doing something wrong? I think you may be misunderstanding what "W" means: week of month (1-5) (The first week starts on the first

Re: [GENERAL] postgresql idle

2004-04-29 Thread Andrew Rawnsley
I find that some clients (DBVisualizer for one) do exactly that - execute the COMMIT;BEGIN sequence, and leaves idle transactions on a consistent basis. On Apr 29, 2004, at 3:19 PM, Andrew Sullivan wrote: On Thu, Apr 29, 2004 at 02:04:47PM -0400, Jon Pastore wrote: pgsql thought there was a tran

[GENERAL] "Idle in Transaction" and hung connections

2004-04-29 Thread Gregory S. Williamson
Dear peoples, Periodically we are getting runaway postgres processes on our Linux (2.4.21-0.13 on Dell servers), using 7.4 and GIS (0.8 USE_GEOS=1 USE_PROJ=1 USE_STATS=1). All of the queries come in from remote servers using JDBC/proxool; once every 4 hours we have a process on the client side

Re: [GENERAL] postgresql idle

2004-04-29 Thread Andrew Sullivan
On Thu, Apr 29, 2004 at 02:04:47PM -0400, Jon Pastore wrote: > pgsql thought there was a transaction in progress and was waiting > for it to complete when in fact the commit had already taken place. Come again? That doesn't sound possible. What ismore likely is that somebody issues COMMIT;BEGIN;

Re: [GENERAL] Arbitrary precision modulo operation

2004-04-29 Thread Dann Corbit
> -Original Message- > From: Tom Lane [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 28, 2004 9:14 PM > To: Dann Corbit > Cc: Bruno Wolff III; Paul Tillotson; [EMAIL PROTECTED] > Subject: Re: [GENERAL] Arbitrary precision modulo operation > > > "Dann Corbit" <[EMAIL PROTECTED]> writ

[GENERAL] Timestamp problems...wrong weeks.

2004-04-29 Thread Campano, Troy
Title: Timestamp problems...wrong weeks. Hello, I’m having a problem with timestamps in postgresql. I run the following query to pull dates in this format: WEEK/MONTH/YEAR However the data says that April 28th 2004 was in week 4 of April and that April 29th 2004 was in week 5 of april.

Re: [GENERAL] postgresql idle

2004-04-29 Thread Jon Pastore
Thank you for your response...and you are correct that is something to be concerned about but after much frustration we found that pgsql thought there was a transaction in progress and was waiting for it to complete when in fact the commit had already taken place. What we ended up doing was after

[GENERAL] Follow-up to original post, more information:

2004-04-29 Thread David A. Ulevitch
I tried again with some more debugging enabled and I get this dump in my logs. -davidu --- what I think is "bad" output --- 2004-04-29 11:41:32 [9307] DEBUG: open of /var/lib/postgres/data/pg_xlog/ (log file 0, segment 0) failed: No such file or directory 2004-04-29 11:41:32

Re: [GENERAL] trying to restore after a server failure...need

2004-04-29 Thread Lincoln Yeoh
I've no suggestions, except that I hope you still have a copy of the original /var/lib/postgres/data files and didn't run postgresql on your only copy... At 12:19 PM 4/29/2004 -0500, David A. Ulevitch wrote: Hi fellow pgsql users, I am helping my university's student union get back up and runni

[GENERAL] trying to restore after a server failure...need some help

2004-04-29 Thread David A. Ulevitch
Hi fellow pgsql users, I am helping my university's student union get back up and running after some major server issues they had. They had serious disk issues on a server, but not on the /var partition where all of the /var/lib/postgres/data files were. I was able to recover all of it, at the

[GENERAL] Syntax error at or near "$1"

2004-04-29 Thread Ryan Booz
I'm working with different functions and following an example of iterating through rows from a returned query. It's not a complicated function, but I can't get past this parse error. I've tried numerous things and searched for some help. I can't find any reason for the error below: ERROR: synt

Re: [GENERAL] Unable to use index?

2004-04-29 Thread Manfred Koizar
On Thu, 29 Apr 2004 09:48:10 -0400 (EDT), Edmund Dengler <[EMAIL PROTECTED]> wrote: >=> explain analyze select * from replicated where rep_component = 'ps_probe' limit 1; >---

Re: [GENERAL] Postgre and Web Request

2004-04-29 Thread Oleg Bartunov
On Thu, 29 Apr 2004, Tatsuo Ishii wrote: > > > Depending on your web development environment (java, php, .NET) etc, > > > you should be able to use some mechanism that will provide a pool of > > > connections to the database. Each request does not open a new > > > connection (and then release it),

Re: [GENERAL] Anyone using pgreplicator?

2004-04-29 Thread Richard Welty
On Tue, 20 Apr 2004 23:47:26 +0800 Alan Graham <[EMAIL PROTECTED]> wrote: > I fixed my problem with pgReplicator, so the test system is merrily > replicating between Perth and Brisbane as I type. Bandwidth usage is > low at the moment. The problem was embarrassingly simple once I checked > the ac

Re: [GENERAL] Performance problem with correlated sub-query

2004-04-29 Thread Shridhar Daithankar
Howard, Steven (US - Tulsa) wrote: I have created a web app that stores and displays all the messages from my database maintenance jobs that run each night. The web app uses Java servlets and has PostgreSQL 7.0 as the back end. When the user requests the first page, he gets a list of all the ser

Re: [GENERAL] Performance problem with correlated sub-query

2004-04-29 Thread Howard, Steven (US - Tulsa)
I apologize for my mistake in the version. I have 7.3, and not 7.0. However, I'll upgrade to 7.4. and work with some of the other suggestions made also. -Original Message- From: Paul Thomas [mailto:[EMAIL PROTECTED] Sent: Thursday, April 29, 2004 9:20 AM To: Howard, Steven (US - Tulsa) C

Re: [GENERAL] Performance problem with correlated sub-query

2004-04-29 Thread Paul Thomas
On 29/04/2004 14:34 "Howard, Steven (US - Tulsa)" wrote: I have created a web app that stores and displays all the messages from my database maintenance jobs that run each night. The web app uses Java servlets and has PostgreSQL 7.0 as the back end. 7.0? That's positively ancient! When the user req

Re: [GENERAL] Performance problem with correlated sub-query

2004-04-29 Thread Stephan Szabo
On Thu, 29 Apr 2004, Howard, Steven (US - Tulsa) wrote: > I have created a web app that stores and displays all the messages from > my database maintenance jobs that run each night. The web app uses Java > servlets and has PostgreSQL 7.0 as the back end. Step 1 is upgrade. ;) > However, if the w

Re: [GENERAL] Postgre and Web Request

2004-04-29 Thread Mike Mascari
Bill Moran wrote: Stefan Sturm wrote: Hello, Depending on your web development environment (java, php, .NET) etc, you should be able to use some mechanism that will provide a pool of connections to the database. Each request does not open a new connection (and then release it), but insteads gets a

Re: [GENERAL] Performance problem with correlated sub-query

2004-04-29 Thread Mike Mascari
Howard, Steven (US - Tulsa) wrote: select servername, databasename, message from messages o where o.date_of_msg = (select max(date_of_msg) from messages i where i.servername = o.servername); And this is a dog. It takes 15 – 20 minutes to execute the query (there are about 200,000 rows in the table)

[GENERAL] Unable to use index?

2004-04-29 Thread Edmund Dengler
Hi folks! A query I am running does not seem to use indexes that are available (running version 7.4.2). I have the following table: => \d replicated Table "public.replicated" Column | Type | Modifiers -+

Re: [GENERAL] Partial index question

2004-04-29 Thread John Sidney-Woollett
Anton Nikiforov said: > Dear All, > I have a question about using partial indexes. > Lets say i have a table containing data types (table_datatype) and the > table containing data entrys (table_data). > While inserting into data entrys i have to number the entrys according > to it's type, so i alwa

[GENERAL] Performance problem with correlated sub-query

2004-04-29 Thread Howard, Steven (US - Tulsa)
I have created a web app that stores and displays all the messages from my database maintenance jobs that run each night. The web app uses Java servlets and has PostgreSQL 7.0 as the back end.   When the user requests the first page, he gets a list of all the servers with maintenance reco

Re: [GENERAL] Postgre and Web Request

2004-04-29 Thread Tatsuo Ishii
> > Depending on your web development environment (java, php, .NET) etc, > > you should be able to use some mechanism that will provide a pool of > > connections to the database. Each request does not open a new > > connection (and then release it), but insteads gets a connection from > > the p

Re: [GENERAL] Postgre and Web Request

2004-04-29 Thread Bill Moran
Stefan Sturm wrote: Hello, Depending on your web development environment (java, php, .NET) etc, you should be able to use some mechanism that will provide a pool of connections to the database. Each request does not open a new connection (and then release it), but insteads gets a connection from

Re: [GENERAL] Postgre and Web Request

2004-04-29 Thread Robert Treat
On Wed, 2004-04-28 at 17:58, Chris Browne wrote: > [EMAIL PROTECTED] ("Kilmer C. de Souza") writes: > > Oww ... sorry man ... > > I make a mistake ... there are 10.000 users and 1.000 from 10.000 try to > > access at the same time the database. > > Can you help me again with this condit

Re: [GENERAL] Postgre and Web Request

2004-04-29 Thread Stefan Sturm
Hello, > Depending on your web development environment (java, php, .NET) etc, > you should be able to use some mechanism that will provide a pool of > connections to the database. Each request does not open a new > connection (and then release it), but insteads gets a connection from > the poo

Re: [GENERAL] Partial index question

2004-04-29 Thread Anton Nikiforov
Paul Thomas пишет: On 29/04/2004 09:53 Anton Nikiforov wrote: looks like after a few tests that i've done i'm confused more than before. I did create a table and inserted 20 random records of two different types of data into it. Did you analyze the table afterwards? Hello and thanks for the