Re: [GENERAL] Resurrected data files - problem?

2007-11-09 Thread Albe Laurenz
So if we perform our database backups with incremental backups as described above, we could end up with additional files after the restore, because PostgreSQL files can get deleted (e.g. during DROP TABLE or TRUNCATE TABLE). Could such resurrected files (data files, files in pg_xlog,

Re: [GENERAL] Resurrected data files - problem?

2007-11-09 Thread Simon Riggs
On Fri, 2007-11-09 at 09:24 +0100, Albe Laurenz wrote: So if we perform our database backups with incremental backups as described above, we could end up with additional files after the restore, because PostgreSQL files can get deleted (e.g. during DROP TABLE or TRUNCATE TABLE). Could

Re: [GENERAL] (Never?) Kill Postmaster?

2007-11-09 Thread Christian Schröder
Tom Lane wrote: =?ISO-8859-1?Q?Christian_Schr=F6der?= [EMAIL PROTECTED] writes: I don't want to kill -9 the processes because the last time I did this the database was in recovery mode for a substantial amount of time. A useful tip on that: if you perform a manual CHECKPOINT just

Re: [GENERAL] Resurrected data files - problem?

2007-11-09 Thread Albe Laurenz
Simon Riggs wrote: So if we perform our database backups with incremental backups as described above, we could end up with additional files after the restore, because PostgreSQL files can get deleted (e.g. during DROP TABLE or TRUNCATE TABLE). Could such resurrected files (data files, files

Re: [GENERAL] Resurrected data files - problem?

2007-11-09 Thread Simon Riggs
On Fri, 2007-11-09 at 10:28 +0100, Albe Laurenz wrote: Simon Riggs wrote: So if we perform our database backups with incremental backups as described above, we could end up with additional files after the restore, because PostgreSQL files can get deleted (e.g. during DROP TABLE or

Re: [GENERAL] configure using libxml

2007-11-09 Thread Pavel Stehule
Hello have you libxml2 on your computer? Send full configure output, please Regards Pavel Stehule On 09/11/2007, König, Monika [EMAIL PROTECTED] wrote: Hey, I try to configure postgresql 8.3beta with libxml by the comand: LDFLAGS=-lstdc++ ./configure --with-tcl --without-zlib

[GENERAL] Warning about max_fsm_pages: what's that?

2007-11-09 Thread Reg Me Please
Hi all. During a routine VACUUM ANALYZE I've got this message in the logs: WARNING: relation public.t_dati contains more than max_fsm_pages pages with useful free space HINT: Consider compacting this relation or increasing the configuration parameter max_fsm_pages. The table in question

[GENERAL] configure using libxml

2007-11-09 Thread König, Monika
Hey, I try to configure postgresql 8.3beta with libxml by the comand: LDFLAGS=-lstdc++ ./configure --with-tcl --without-zlib --with-libxml -prefix=/usr/local/postgresql-8.3beta It works fine, but after make and make install I can't use the xml-functions. The error message is: ERROR:

Re: [GENERAL] (Never?) Kill Postmaster?

2007-11-09 Thread Christian Schröder
Tom Lane wrote: control has already returned from the kernel. What I think is that the perl stuff your session has done has included some action that changed the condition of the backend process ... exactly what, I have no idea. Can you show us the plperl functions that were used in these

Re: [GENERAL] any way for ORDER BY x to imply NULLS FIRST in 8.3?

2007-11-09 Thread rihad
Em Wednesday 07 November 2007 13:54:32 rihad escreveu: May I, as an outsider, comment? :) I really think of ASC NULLS FIRST (and DESC NULLS LAST) as the way to go. Imagine a last_login column that sorts users that have not logged in as the most recently logged in, which is not very intuitive. I

Re: [GENERAL] any way for ORDER BY x to imply NULLS FIRST in 8.3?

2007-11-09 Thread Leif B. Kristensen
On Friday 9. November 2007, rihad wrote: It's not an easy thing to do with for example Propel 1.2 ORM (written in PHP): $criteria-addDescendingOrderByColumn(myPeer::LAST_LOGIN); // no place to shove database-specific attributes in. which was my main point. Which mainly goes to show that ORM

Re: [GENERAL] INSERT performance deteriorates quickly during a large import

2007-11-09 Thread Márcio Geovani Jasinski
Hello Krasimir, You got a lot of good advices above and I would like to add another one: d) Make sure of your PHP code is not recursive. As you said the memory is stable so I think your method is iterative. A recursive method certainly will increase a little time for each insert using more

Re: [GENERAL] Warning about max_fsm_pages: what's that?

2007-11-09 Thread Karsten Hilbert
On Fri, Nov 09, 2007 at 11:26:21AM +0100, Reg Me Please wrote: WARNING: relation public.t_dati contains more than max_fsm_pages pages with useful free space HINT: Consider compacting this relation or increasing the configuration parameter max_fsm_pages. Would it be possible to get some

Re: [GENERAL] Warning about max_fsm_pages: what's that?

2007-11-09 Thread Alvaro Herrera
Reg Me Please wrote: Hi all. During a routine VACUUM ANALYZE I've got this message in the logs: WARNING: relation public.t_dati contains more than max_fsm_pages pages with useful free space HINT: Consider compacting this relation or increasing the configuration parameter max_fsm_pages.

[GENERAL] PIPELINED Functions

2007-11-09 Thread Cesar Alvarez
Hello every one, im working in a proyect that uses Oracle 10g, and nice concept i learn is the PIPELINED functions and Functions that return a Table, is there something alike in Postgres? begin:vcard fn:Cesar Alvarez n:;Cesar Alvarez title:Web Development Asesor and Software Enginner

Re: [GENERAL] configure using libxml

2007-11-09 Thread Albe Laurenz
Monika König wrote: I try to configure postgresql 8.3beta with libxml by the comand: LDFLAGS=-lstdc++ ./configure --with-tcl --without-zlib --with-libxml -prefix=/usr/local/postgresql-8.3beta It works fine, but after make and make install I can't use the xml-functions. The error

Re: [GENERAL] PIPELINED Functions

2007-11-09 Thread Reg Me Please
Il Friday 09 November 2007 16:06:34 Cesar Alvarez ha scritto: Hello every one, im working in a proyect that uses Oracle 10g, and nice concept i learn is the PIPELINED functions and Functions that return a Table, is there something alike in Postgres? You do have functions returning set of

Re: [GENERAL] PIPELINED Functions

2007-11-09 Thread Cesar Alvarez
Reg Me Please wrote: Il Friday 09 November 2007 16:06:34 Cesar Alvarez ha scritto: Hello every one, im working in a proyect that uses Oracle 10g, and nice concept i learn is the PIPELINED functions and Functions that return a Table, is there something alike in Postgres? You do have

Re: [GENERAL] PIPELINED Functions

2007-11-09 Thread Raymond O'Donnell
On 09/11/2007 15:32, Cesar Alvarez wrote: the Pipelined is the statement so the functions knows he is returning rows. Yes, you can write functions returning rows in pl/pgsql - see the docs, specifically the RETURN NEXT statement. Then the syntax is: select * from my_function(); - the

Re: [GENERAL] Resurrected data files - problem?

2007-11-09 Thread Tom Lane
Simon Riggs [EMAIL PROTECTED] writes: On Fri, 2007-11-09 at 10:28 +0100, Albe Laurenz wrote: I think that understanding is finally dawning here. The problem you see is that the backup software might decide that the file has not been changed, skip it and go on backing up other files, but the

Re: [GENERAL] Resurrected data files - problem?

2007-11-09 Thread Albe Laurenz
Tom Lane wrote: The problem you see is that the backup software might decide that the file has not been changed, skip it and go on backing up other files, but the file can still be modified before pg_stop_backup(), correct? Correct. Surely that's nonsense --- otherwise a time-extended

Re: [GENERAL] INSERT performance deteriorates quickly during a large import

2007-11-09 Thread Krasimir Hristozov (InterMedia Ltd)
Thanks to all who responded. Using COPY instead of INSERT really solved the problem - the whole process took about 1h 20min on an indexed table, with constraints (which is close to our initial expectations). We're performing some additional tests now. I'll post some more observations when

Re: [GENERAL] Optimal time series sampling.

2007-11-09 Thread Ted Byers
--- Gregory Stark [EMAIL PROTECTED] wrote: Ted Byers [EMAIL PROTECTED] writes: As a prelude to where I really want to go, please consider the following SELECT statement. SELECT close_price FROM stockprices A WHERE price_date = (SELECT MAX(price_date) FROM stockprices B

[GENERAL] pg_dumpall and authentication

2007-11-09 Thread Tom Hart
I'm sure you guys have heard this about 100 times, and I've done some research on Google and found out some things, but I still have a couple questions. As I'm sure you may have guessed from the subject, I'm trying to schedule (under windows) pg_dumpall to run each night/morning/full

Re: [GENERAL] Optimal time series sampling.

2007-11-09 Thread brian
Ted Byers wrote: --- Gregory Stark [EMAIL PROTECTED] wrote: I think you'll have to post the actual explain analyze output you're getting and the precise schema you have. OK, it is challenging to present it in plain text, but here is the HTML exported by MySQL Query Browser. If you cut

Re: [GENERAL] pg_dumpall and authentication

2007-11-09 Thread Steve Atkins
On Nov 9, 2007, at 8:52 AM, Tom Hart wrote: I'm sure you guys have heard this about 100 times, and I've done some research on Google and found out some things, but I still have a couple questions. As I'm sure you may have guessed from the subject, I'm trying to schedule (under windows)

Re: [GENERAL] pg_dumpall and authentication

2007-11-09 Thread Tom Hart
Steve Atkins wrote: On Nov 9, 2007, at 8:52 AM, Tom Hart wrote: I'm sure you guys have heard this about 100 times, and I've done some research on Google and found out some things, but I still have a couple questions. As I'm sure you may have guessed from the subject, I'm trying to

Re: [GENERAL] Optimal time series sampling.

2007-11-09 Thread Tom Lane
Ted Byers [EMAIL PROTECTED] writes: OK, it is challenging to present it in plain text, but here is the HTML exported by MySQL Query Browser. Why are you asking this list for help with a MySQL performance problem? regards, tom lane ---(end of

Re: [GENERAL] Optimal time series sampling.

2007-11-09 Thread Ted Byers
--- Tom Lane [EMAIL PROTECTED] wrote: Ted Byers [EMAIL PROTECTED] writes: OK, it is challenging to present it in plain text, but here is the HTML exported by MySQL Query Browser. Why are you asking this list for help with a MySQL performance problem? because my question isn't really

Re: [GENERAL] Optimal time series sampling.

2007-11-09 Thread Tom Lane
Ted Byers [EMAIL PROTECTED] writes: --- Tom Lane [EMAIL PROTECTED] wrote: Why are you asking this list for help with a MySQL performance problem? because my question isn't really about MySQL, but rather about how best to construct the SQL required to get the job done, regardless of what

Re: [GENERAL] Insert statements really slow

2007-11-09 Thread Andrew Sullivan
On Fri, Nov 09, 2007 at 11:53:08AM -0600, Waller, David wrote: The data is web log data and each line has a variable amount of the fields (mostly because of cookies) so I am using a lot of insert statements. In MySQL I go through a file in about 2 minutes and it is taking about 30 in PG.

[GENERAL] Insert statements really slow

2007-11-09 Thread Waller, David
I have an application that I am porting from MySQL to PostgreSQL and I am working on the import Perl script that process the data. The data is web log data and each line has a variable amount of the fields (mostly because of cookies) so I am using a lot of insert statements. In MySQL I go

Re: [GENERAL] Insert statements really slow

2007-11-09 Thread Scott Marlowe
On Nov 9, 2007 11:53 AM, Waller, David [EMAIL PROTECTED] wrote: In MySQL I go through a file in about 2 minutes and it is taking about 30 in PG. I have removed all but the primary key index and have done a BEGIN and COMMIT after turning off AUTOCOMMIT. How many rows are you wrapping in

Re: [GENERAL] Optimal time series sampling.

2007-11-09 Thread Scott Marlowe
On Nov 9, 2007 11:47 AM, Ted Byers [EMAIL PROTECTED] wrote: --- Tom Lane [EMAIL PROTECTED] wrote: Ted Byers [EMAIL PROTECTED] writes: OK, it is challenging to present it in plain text, but here is the HTML exported by MySQL Query Browser. Why are you asking this list for help with

Re: [GENERAL] INSERT performance deteriorates quickly during a large import

2007-11-09 Thread Tomas Vondra
Try to one of these: a) don't use INSERT statements, use a COPY instead b) from time to time run ANALYZE on the public table (say 1000 inserts, then one analyze) c) create the table without constraints (primary / foreign keys in this case), import all the data, and then create the

[GENERAL] Importance of CPU floating point performance...

2007-11-09 Thread Nathan Wilhelmi
Hello - Trying to find out how much floating point operation performance effects Postgres in general. Looking at some lower power machines that have good integer performance but not great floating point performance, shared FPU across cpus. If we store, but don't use in query criteria, floating

Re: [GENERAL] Optimal time series sampling.

2007-11-09 Thread Ted Byers
--- Scott Marlowe [EMAIL PROTECTED] wrote: On Nov 9, 2007 11:47 AM, Ted Byers [EMAIL PROTECTED] wrote: --- Tom Lane [EMAIL PROTECTED] wrote: Ted Byers [EMAIL PROTECTED] writes: [snip] Which is better depends largely on how your database is built. MySQL still uses loops for all

[GENERAL] Is query a reserved word in 8.3 plpgsql?

2007-11-09 Thread Todd A. Cook
Hi, I saw the item in the release notes about the new return query syntax in pl/pgsql, but I didn't see any note about query being reserved now. Perhaps an explicit mention should be added? I loaded a dump from 8.2.4 into 8.3b2 without error. However, every function that uses query as a

Re: [GENERAL] Importance of CPU floating point performance...

2007-11-09 Thread Dann Corbit
-Original Message- From: [EMAIL PROTECTED] [mailto:pgsql-general- [EMAIL PROTECTED] On Behalf Of Nathan Wilhelmi Sent: Friday, November 09, 2007 12:01 PM To: pgsql-general@postgresql.org Subject: [GENERAL] Importance of CPU floating point performance... Hello - Trying to find out

Re: [GENERAL] Resurrected data files - problem?

2007-11-09 Thread Simon Riggs
On Fri, 2007-11-09 at 10:59 -0500, Tom Lane wrote: Simon Riggs [EMAIL PROTECTED] writes: On Fri, 2007-11-09 at 10:28 +0100, Albe Laurenz wrote: I think that understanding is finally dawning here. The problem you see is that the backup software might decide that the file has not been

[GENERAL] any way to query for current connections to db?

2007-11-09 Thread Coarr, Matt
Hi, Is there any way to query the database to identify what the current connections are (connections, sessions, or whatever you want to call them)? This would be something similar to oracle's v$session view. Thanks, Matt

Re: [GENERAL] any way to query for current connections to db?

2007-11-09 Thread Jeff Larsen
Is there any way to query the database to identify what the current connections are (connections, sessions, or whatever you want to call them)? select * from pg_stat_activity; ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] any way to query for current connections to db?

2007-11-09 Thread Bruce Momjian
Jeff Larsen wrote: Is there any way to query the database to identify what the current connections are (connections, sessions, or whatever you want to call them)? select * from pg_stat_activity; Is this an FAQ? -- Bruce Momjian [EMAIL PROTECTED]http://momjian.us EnterpriseDB

Re: [GENERAL] any way to query for current connections to db?

2007-11-09 Thread Scott Marlowe
On Nov 9, 2007 4:36 PM, Coarr, Matt [EMAIL PROTECTED] wrote: Is there any way to query the database to identify what the current connections are (connections, sessions, or whatever you want to call them)? This would be something similar to oracle's v$session view. select * from

Re: [GENERAL] any way to query for current connections to db?

2007-11-09 Thread Scott Marlowe
On Nov 9, 2007 4:57 PM, Bruce Momjian [EMAIL PROTECTED] wrote: Jeff Larsen wrote: Is there any way to query the database to identify what the current connections are (connections, sessions, or whatever you want to call them)? select * from pg_stat_activity; Is this an FAQ? Yes,

Re: [GENERAL] any way to query for current connections to db?

2007-11-09 Thread volunteer
select * from pg_stat_activity where datname = ( select * from current_database() ); Original Message Subject: [GENERAL] any way to query for current connections to db? From: Coarr, Matt [EMAIL PROTECTED] Date: Fri, November 09, 2007 5:36 pm To:

Re: [GENERAL] any way to query for current connections to db?

2007-11-09 Thread Jeff Larsen
Is this an FAQ? Yes, it gets asked a lot. Is it in the FAQ? Don't know. In the FAQ? No In the Manual? Yes ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your

Re: [GENERAL] any way to query for current connections to db?

2007-11-09 Thread Bruce Momjian
Scott Marlowe wrote: On Nov 9, 2007 4:57 PM, Bruce Momjian [EMAIL PROTECTED] wrote: Jeff Larsen wrote: Is there any way to query the database to identify what the current connections are (connections, sessions, or whatever you want to call them)? select * from

Re: [GENERAL] Is query a reserved word in 8.3 plpgsql?

2007-11-09 Thread Tom Lane
Todd A. Cook [EMAIL PROTECTED] writes: I saw the item in the release notes about the new return query syntax in pl/pgsql, but I didn't see any note about query being reserved now. Perhaps an explicit mention should be added? Yeah, I got burnt by that too. I have a bad feeling that that

[GENERAL] Enabling password complexity for password authentication

2007-11-09 Thread paul rivers
Is there an existing way to enforce password complexity for password authentication? I am not seeing anything in the docs, and I can only turn up this reference to a pending patch for 8.2 (bottom of page): http://www.postgresql.org/community/weeklynews/pwn20061210 Thanks in advance for

Re: [GENERAL] Is query a reserved word in 8.3 plpgsql?

2007-11-09 Thread Scott Marlowe
On Nov 9, 2007 5:14 PM, Tom Lane [EMAIL PROTECTED] wrote: Todd A. Cook [EMAIL PROTECTED] writes: I saw the item in the release notes about the new return query syntax in pl/pgsql, but I didn't see any note about query being reserved now. Perhaps an explicit mention should be added? Yeah,

Re: [HACKERS] [GENERAL] Is query a reserved word in 8.3 plpgsql?

2007-11-09 Thread Tom Lane
Scott Marlowe [EMAIL PROTECTED] writes: On Nov 9, 2007 5:14 PM, Tom Lane [EMAIL PROTECTED] wrote: [ thinks for a bit... ] It might be possible to get rid of the keyword and have RETURN QUERY be recognized by an ad-hoc strcmp test, much like the various direction keywords in FETCH have been

[GENERAL] looping over the rows in a table

2007-11-09 Thread Rajarshi Guha
Hi, this is slightly offtopic, but is based on Postgres: I have a table with 10M rows and I have a Python script using psycopg that needs to look at each row of the table. My current strategy is to do in the Python script cursor.execute(select acol from atable) while True: ret =

Re: [HACKERS] [GENERAL] Is query a reserved word in 8.3 plpgsql?

2007-11-09 Thread Scott Marlowe
On Nov 9, 2007 6:07 PM, Tom Lane [EMAIL PROTECTED] wrote: Scott Marlowe [EMAIL PROTECTED] writes: On Nov 9, 2007 5:14 PM, Tom Lane [EMAIL PROTECTED] wrote: [ thinks for a bit... ] It might be possible to get rid of the keyword and have RETURN QUERY be recognized by an ad-hoc strcmp test,

Re: [GENERAL] looping over the rows in a table

2007-11-09 Thread Scott Marlowe
On Nov 9, 2007 6:12 PM, Rajarshi Guha [EMAIL PROTECTED] wrote: Hi, this is slightly offtopic, but is based on Postgres: I have a table with 10M rows and I have a Python script using psycopg that needs to look at each row of the table. My current strategy is to do in the Python script

Re: [GENERAL] (Never?) Kill Postmaster?

2007-11-09 Thread Tom Lane
=?ISO-8859-1?Q?Christian_Schr=F6der?= [EMAIL PROTECTED] writes: [ ongoing saga ] I don't think you ever mentioned exactly what platform you're running on; it seems to be some 64-bit Linux variant but you didn't say which. I've been futilely trying to reproduce the hang on a Xeon Fedora Core 6