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

2007-11-08 Thread Tom Lane
=?ISO-8859-1?Q?Christian_Schr=F6der?= <[EMAIL PROTECTED]> writes: > any news about this issue? Not a lot. I've been able to confirm on my own Fedora 6 machine that the mere act of loading plperl.so into the backend causes the process to have one thread instead of no threads, as reported by gdb.

Re: [GENERAL] pg_ctl & show all

2007-11-08 Thread smiley2211
I was able to figure this out... Thanks all...Michelle smiley2211 wrote: > > Hello all, > > I changed my postgresql.conf settings and restarted postmaster show > changes would take affect however when I type 'show all' I don't see the > changes reflected...how do I get this file to be reloade

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

2007-11-08 Thread Tom Lane
=?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 before issuing the ki

[GENERAL] pg_ctl & show all

2007-11-08 Thread smiley2211
Hello all, I changed my postgresql.conf settings and restarted postmaster show changes would take affect however when I type 'show all' I don't see the changes reflected...how do I get this file to be reloaded?? effective_cache (requires restart) shared_buffers (requires restart) version 8.2.5

Re: [GENERAL] Optimal time series sampling.

2007-11-08 Thread Gregory Stark
"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 > WHERE A.stock_id = B.stock_id AND A.st

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

2007-11-08 Thread Christian Schröder
Hi all, any news about this issue? Anything else that I can do to help you? Meanwhile there are 4 connections in the same state. (I did not do the whole investigation on all 4, but since they all do not respond on a SIGINT I assume that they all have the same problem.) It may also be interestin

Re: [GENERAL] "Resurrected" data files - problem?

2007-11-08 Thread Simon Riggs
On Thu, 2007-11-08 at 17:11 +0100, Albe Laurenz wrote: > Tom Lane 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 TAB

Re: [GENERAL] subselect field "problem"

2007-11-08 Thread Thomas H.
i was writing the query below containing a subquery. by mistake, i referenced a field from the main table in the subquery, leading to a very strange (but working??) result. the planner announced a insanely high startup cost, but the query itself finished pretty quickly. Pick up any SQL

Re: [GENERAL] subselect field "problem"

2007-11-08 Thread Martijn van Oosterhout
On Thu, Nov 08, 2007 at 09:35:19PM +0100, Thomas H. wrote: > i was writing the query below containing a subquery. by mistake, i > referenced a field from the main table in the subquery, leading to a > very strange (but working??) result. the planner announced a insanely > high startup cost, but

Re: [GENERAL] System V IPC on Windows

2007-11-08 Thread Magnus Hagander
Lee Keel wrote: >> -Original Message- >> From: [EMAIL PROTECTED] [mailto:pgsql-general- >> [EMAIL PROTECTED] On Behalf Of Magnus Hagander >> Sent: Thursday, November 08, 2007 1:30 PM >> To: Kevin Neufeld >> Cc: Tom Lane; pgsql-general@postgresql.org >> Subject: Re: [GENERAL] System V IPC on

[GENERAL] subselect field "problem"

2007-11-08 Thread Thomas H.
hi list i was writing the query below containing a subquery. by mistake, i referenced a field from the main table in the subquery, leading to a very strange (but working??) result. the planner announced a insanely high startup cost, but the query itself finished pretty quickly. nevertheless,

Re: [GENERAL] what is the date format in binary query results

2007-11-08 Thread Alvaro Herrera
Reg Me Please wrote: > Il Thursday 08 November 2007 16:18:58 Tom Lane ha scritto: > > It's either an int8 representing microseconds away from 2000-01-01 > > 00:00:00 UTC, or a float8 representing seconds away from the same > > origin. > > Does this mean that negative numbers are for timestamps bef

Re: [GENERAL] System V IPC on Windows

2007-11-08 Thread Lee Keel
> -Original Message- > From: [EMAIL PROTECTED] [mailto:pgsql-general- > [EMAIL PROTECTED] On Behalf Of Magnus Hagander > Sent: Thursday, November 08, 2007 1:30 PM > To: Kevin Neufeld > Cc: Tom Lane; pgsql-general@postgresql.org > Subject: Re: [GENERAL] System V IPC on Windows > > Pg on win

Re: [GENERAL] System V IPC on Windows

2007-11-08 Thread Magnus Hagander
Kevin Neufeld wrote: > That makes sense, thanx. > Another individual was having problems adjusting the shared_memory > settings higher than 1.2GB on a 8GB 64bit machine running Vista. Pg on win32 is 32-bit. It has a total address space of 2Gb, minus the OS overhead, minus the code, minus local me

Re: [GENERAL] System V IPC on Windows

2007-11-08 Thread Magnus Hagander
Lee Keel wrote: >> -Original Message- >> From: [EMAIL PROTECTED] [mailto:pgsql-general- >> [EMAIL PROTECTED] On Behalf Of Magnus Hagander >> Sent: Thursday, November 08, 2007 12:47 AM >> To: Tom Lane >> Cc: Kevin Neufeld; pgsql-general@postgresql.org >> Subject: Re: [GENERAL] System V IPC o

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

2007-11-08 Thread Chris Browne
[EMAIL PROTECTED] ("=?UTF-8?B?VG9tw6HFoSBWb25kcmE=?=") writes: > 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 / fo

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

2007-11-08 Thread Bill Moran
In response to "Krasimir Hristozov \(InterMedia Ltd\)" <[EMAIL PROTECTED]>: > We need to import data from a relatively large MySQL database into an > existing PostgreSQL database, using a PHP5 script that SELECTs from MySQL > and INSERTs in PostgreSQL. A part of the import involves moving about >

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

2007-11-08 Thread Tom Lane
"Krasimir Hristozov \(InterMedia Ltd\)" <[EMAIL PROTECTED]> writes: > We need to import data from a relatively large MySQL database into an > existing PostgreSQL database, using a PHP5 script that SELECTs from MySQL > and INSERTs in PostgreSQL. A part of the import involves moving about > 1,300,000

Re: [GENERAL] what is the date format in binary query results

2007-11-08 Thread Tom Lane
Reg Me Please <[EMAIL PROTECTED]> writes: > Il Thursday 08 November 2007 17:09:22 Tom Lane ha scritto: >> configure --enable-integer-datetimes. > How can I tell which one has been choosen by my distribution (Ubuntu)? "show integer_datetimes". For programmatic purposes, try PQparameterStatus(pgco

Re: [GENERAL] why there is no interval / interval operator?

2007-11-08 Thread Pavel Stehule
one possible implementation http://www.pgsql.cz/index.php/PL/pgSQL_%28en%29#Usage_of_PL.2FpgSQL_functions_for_designing_own_operators Pavel On 08/11/2007, hubert depesz lubaczewski <[EMAIL PROTECTED]> wrote: > is it just a simple ommission, or am i missing something? > > we have interval / float8

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

2007-11-08 Thread Tomáš 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 const

[GENERAL] Optimal time series sampling.

2007-11-08 Thread Ted Byers
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 WHERE A.stock_id = B.stock_id AND A.stock_id = id); stockprices has a primary key comprised

Re: [GENERAL] Calculation for Max_FSM_pages : Any rules of thumb?

2007-11-08 Thread Bill Moran
In response to Vivek Khera <[EMAIL PROTECTED]>: > > On Nov 1, 2007, at 8:51 PM, Ow Mun Heng wrote: > > > Another question is, based on what I've read in the archives (in my > > laptop.. No-Inet conn @ work) Since I've overran my max_FSM, I'm > > basically screwed and will have to do a vacuum ver

[GENERAL] INSERT performance deteriorates quickly during a large import

2007-11-08 Thread Krasimir Hristozov (InterMedia Ltd)
We need to import data from a relatively large MySQL database into an existing PostgreSQL database, using a PHP5 script that SELECTs from MySQL and INSERTs in PostgreSQL. A part of the import involves moving about 1,300,000 records from one MySQL table to one of our PostgreSQL tables. The problem

Re: [GENERAL] "Resurrected" data files - problem?

2007-11-08 Thread Albe Laurenz
Tom Lane 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 (d

Re: [GENERAL] System V IPC on Windows

2007-11-08 Thread Kevin Neufeld
> > Does anyone know how to adjust the IPC settings in Windows? There aren't any such settings in Windows, AFAIK. Correct. The only real adjustable limit is the size of the Windows pagefile, but that one is normally dynamic. [Lee Keel] What if the page file exceeds the sh

Re: [GENERAL] what is the date format in binary query results

2007-11-08 Thread Tom Lane
Reg Me Please <[EMAIL PROTECTED]> writes: > Il Thursday 08 November 2007 16:18:58 Tom Lane ha scritto: >> It's either an int8 representing microseconds away from 2000-01-01 >> 00:00:00 UTC, or a float8 representing seconds away from the same >> origin. > Does this mean that negative numbers are fo

Re: [GENERAL] "Resurrected" data files - problem?

2007-11-08 Thread Alan Hodgson
On Thursday 08 November 2007, "Albe Laurenz" <[EMAIL PROTECTED]> wrote: > Can you give me a good reason why? > > > Try re-reading the instructions on backup in the manual. > > I know them well. That is why I ask if this questionable procedure > could lead to damage. You cannot backup a live datab

Re: [GENERAL] System V IPC on Windows

2007-11-08 Thread Kevin Neufeld
That makes sense, thanx. Another individual was having problems adjusting the shared_memory settings higher than 1.2GB on a 8GB 64bit machine running Vista. Whenever he would adjust higher than that, the postgresql service wouldn't start throwing some kind of error. In linux, one would simpl

Re: [GENERAL] "Resurrected" data files - problem?

2007-11-08 Thread Scott Marlowe
On Nov 8, 2007 9:39 AM, Tom Lane <[EMAIL PROTECTED]> wrote: > "Peter Childs" <[EMAIL PROTECTED]> writes: > > On 08/11/2007, Albe Laurenz <[EMAIL PROTECTED]> wrote: > >> So if we perform our database backups with incremental > >> backups as described above, we could end up with additional > >> files

Re: [GENERAL] what is the date format in binary query results

2007-11-08 Thread Reg Me Please
Il Thursday 08 November 2007 17:09:22 Tom Lane ha scritto: > Reg Me Please <[EMAIL PROTECTED]> writes: > > Il Thursday 08 November 2007 16:18:58 Tom Lane ha scritto: > >> It's either an int8 representing microseconds away from 2000-01-01 > >> 00:00:00 UTC, or a float8 representing seconds away from

Re: [GENERAL] Strange variable behaviour when using it in limit clause in plpgsql stored procedure

2007-11-08 Thread Tom Lane
"Sergey Moroz" <[EMAIL PROTECTED]> writes: > I tested performance of my query with limit clause inside plpgsql procedure. > 2 slightly different situations: > 1. Sql with limit clause and literal variable (for example 'select field1 > from table1 limit 100') > 2. The same sql with limit clause and

Re: [GENERAL] System V IPC on Windows

2007-11-08 Thread Lee Keel
> -Original Message- > From: [EMAIL PROTECTED] [mailto:pgsql-general- > [EMAIL PROTECTED] On Behalf Of Magnus Hagander > Sent: Thursday, November 08, 2007 12:47 AM > To: Tom Lane > Cc: Kevin Neufeld; pgsql-general@postgresql.org > Subject: Re: [GENERAL] System V IPC on Windows > > > > Doe

Re: [GENERAL] why there is no interval / interval operator?

2007-11-08 Thread hubert depesz lubaczewski
On Thu, Nov 08, 2007 at 10:50:39AM -0500, Tom Lane wrote: > hubert depesz lubaczewski <[EMAIL PROTECTED]> writes: > > we have interval / float8 ( = interval), so i think that adding interval > > / interval ( = float8) should be possible. > What would you define it to mean, keeping in mind that an i

Re: [GENERAL] what is the date format in binary query results

2007-11-08 Thread Reg Me Please
Il Thursday 08 November 2007 16:18:58 Tom Lane ha scritto: > It's either an int8 representing microseconds away from 2000-01-01 > 00:00:00 UTC, or a float8 representing seconds away from the same > origin. Does this mean that negative numbers are for timestamps before y2k? Why and when there is a

Re: [GENERAL] Calculation for Max_FSM_pages : Any rules of thumb?

2007-11-08 Thread Vivek Khera
On Nov 1, 2007, at 8:51 PM, Ow Mun Heng wrote: Another question is, based on what I've read in the archives (in my laptop.. No-Inet conn @ work) Since I've overran my max_FSM, I'm basically screwed and will have to do a vacuum verbose FULL on the entire DB. Crap.. I've seen this repeated many

Re: [GENERAL] why there is no interval / interval operator?

2007-11-08 Thread Tom Lane
hubert depesz lubaczewski <[EMAIL PROTECTED]> writes: > we have interval / float8 ( = interval), so i think that adding interval > / interval ( = float8) should be possible. What would you define it to mean, keeping in mind that an interval has three components not one? re

Re: [GENERAL] "Resurrected" data files - problem?

2007-11-08 Thread Albe Laurenz
Peter Childs wrote: >> We use a tape backup software that does "incremental backups" [...] >> 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 DR

Re: [GENERAL] "Resurrected" data files - problem?

2007-11-08 Thread Tom Lane
"Peter Childs" <[EMAIL PROTECTED]> writes: > On 08/11/2007, Albe Laurenz <[EMAIL PROTECTED]> 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.

Re: [GENERAL] what is the date format in binary query results

2007-11-08 Thread Tom Lane
Samantha Atkins <[EMAIL PROTECTED]> writes: > What can I expect for a date format from a PGresult containing binary > results? Specifically the Oid type is TIMESTAMPTZOID. It's either an int8 representing microseconds away from 2000-01-01 00:00:00 UTC, or a float8 representing seconds away from

[GENERAL] why there is no interval / interval operator?

2007-11-08 Thread hubert depesz lubaczewski
is it just a simple ommission, or am i missing something? we have interval / float8 ( = interval), so i think that adding interval / interval ( = float8) should be possible. depesz -- quicksil1er: "postgres is excellent, but like any DB it requires a highly paid DBA. here's my CV!" :) http://w

Re: [GENERAL] "Resurrected" data files - problem?

2007-11-08 Thread Peter Childs
On 08/11/2007, Albe Laurenz <[EMAIL PROTECTED]> wrote: > > We use a tape backup software that does "incremental backups" > as follows: > > - In a full backup, all files are backed up. > - In an incremental backup, only the files with modification > date after the last backup are backed up. > > No

[GENERAL] Strange variable behaviour when using it in limit clause in plpgsql stored procedure

2007-11-08 Thread Sergey Moroz
I tested performance of my query with limit clause inside plpgsql procedure. 2 slightly different situations: 1. Sql with limit clause and literal variable (for example 'select field1 from table1 limit 100') 2. The same sql with limit clause and pgplsql variable (for example 'select field1 from t

[GENERAL] "Resurrected" data files - problem?

2007-11-08 Thread Albe Laurenz
We use a tape backup software that does "incremental backups" as follows: - In a full backup, all files are backed up. - In an incremental backup, only the files with modification date after the last backup are backed up. Now when such a backup is restored, you first have to restore the full ba

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

2007-11-08 Thread Jorge Godoy
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 intuit