Re: [HACKERS] Indexed views?

2004-09-11 Thread Greg Stark

Mischa Sandberg [EMAIL PROTECTED] writes:

 I take it that it is a very reasonable assumption that only a small proportion
 of index records are actually invalid (else Yurk why use the index?). 

That's faulty logic, the percentage of tuples that are valid is entirely
independent from the percentage of tuples that match your range criterion. Ie,
I could be selecting 100 tuples out of a million -- even if 99 are invalid
it's still worthwhile to use the index.

 Since you're using an index at all, the planner must be expecting a restricted
 set of rows to make it up through to the root. If there is any  filter criteria
 against the values from the index rows, you won't even have to check rows for
 tuple visibility, that don't pass that filter.

It's an interesting idea though. But I can't think of many queries where it
would be interesting. The query would still have to visit every page
containing a record used in the final result. So the only time this would be a
significant win is if you're applying very selective restrictions to columns
that were in the index but weren't able to put in the index condition. 

This seems like a pretty rare situation; usually the reason you put columns in
an index definition is because it is going to be useful for index conditions--
especially if it's a particularly selective column.

-- 
greg


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [HACKERS] Help with check_pqsql PLUGIN!

2004-09-11 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
On Thu, 9 Sep 2004, [koi8-r] ??? ?.  wrote:
Hello, Hackers! I use Nagios - monitoring system. Can you help, please? 
I want to compile plugin for Nagios named 'check_pqsql'.
Which libraries I need to compile it successful? Thank you.
If you're using rpm-based distros, installing postgresql-libs package will 
help you.

While compiling both of'em from source, you need to specify PostgreSQL 
libdir to configure script of Nagios:

- --with-pgsql-lib=$PGDATA/lib
where $PGDATA is the directory that PostgreSQL is installed. i.e.:
./configure --with-pgsql-lib=/usr/local/pgsql/lib --with-pgsql-status 
- --with-pgsql-xdata --with-pgsql-comments  --with-pgsql-extinfo 
- --with-pgsql-retention --with-pgsql-downtime

(with additional options for nagios...)
Also, you could check Nagios mailing lists for further help.
Regards,
- --
Devrim GUNDUZ 
devrim~gunduz.orgdevrim.gunduz~linux.org.tr
			http://www.tdmsoft.com
			http://www.gunduz.org
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFBQqiftl86P3SPfQ4RAnB9AJ9ZgFy8aLoqG4hYbdM/oWsAy9Az5QCgyJyt
EJj3jWi7f7MdXa9T5Zor0sA=
=VscW
-END PGP SIGNATURE-
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
 joining column's datatypes do not match


Re: [pgsql-hackers-win32] [HACKERS] more dirmod CYGWIN

2004-09-11 Thread Dave Page



-Original Message-
From: [EMAIL PROTECTED] on behalf of Tom Lane
Sent: Fri 9/10/2004 10:20 PM
To: Bruce Momjian
Cc: Reini Urban; PostgreSQL-development; PostgreSQL Win32 port list
Subject: Re: [pgsql-hackers-win32] [HACKERS] more dirmod CYGWIN 

 We don't --- apparently the win32 crowd hadn't bothered to try it until
 recently.  There are a couple of patches in the queue that claim to make
 individual modules work, but I dunno what the overall situation is.

I posted a list of a 8-10 a few days ago that didn't compile. Most do, and as Tom 
says, a few patches have been posted. There are some such as pg_logger that I believe 
are now obsolete on all platforms incidently.

Regards, Dave

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html


Re: [HACKERS] Error starting PostgreSQL on Win XP: failed to get token information: 122

2004-09-11 Thread Magnus Hagander
Hi

Thanks for PostgreSQL Beta 8.0!

I try to use the native Win32 build 
(http://pgfoundry.org/projects/pginstaller)
(Beta 1) but i get an error during DB startup.

failed to get token information: 122


Maybe this is related to 
http://groups.google.com/groups?hl=enlr=ie=UTF-8selm=cftihc%
247uk%241%40sea.gmane.org


 My computer is part of 8 security groups
 My user is part of 35 security groups
 (used gpresult.exe to figure out)


This is a known issue that has been fixed in beta-2.


//Magnus

---(end of broadcast)---
TIP 8: explain analyze is your friend


Re: [HACKERS] beta2 and blob's

2004-09-11 Thread Tom Lane
Daniel Schuchardt [EMAIL PROTECTED] writes:
 Hi with beta2 i get
 leak:relation pg_largeobject_loid_pn_index has refcnt 1 instead of 0

Fixed, thanks.

regards, tom lane

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [HACKERS] beta 2 crash with unique constraints

2004-09-11 Thread Tom Lane
Daniel Schuchardt [EMAIL PROTECTED] writes:
 duplicate key violates unique constraint ferber_rust_params_pkey
 FATAL:  block 0 of 1663/19335/476756 is still referenced (local 2)
 server closed the connection unexpectedly

This is already fixed, but thanks for the report!

regards, tom lane

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [HACKERS] Adding columns in the middle (Was: Developers page is down)

2004-09-11 Thread Gaetano Mendola
Michael Glaesemann wrote:
On Sep 4, 2004, at 10:07 PM, Christopher Browne wrote:
Centuries ago, Nostradamus foresaw when [EMAIL PROTECTED] (Jaime 
Casanova) would write:

By the way, will be a way in postgresql 8 to add a
column in a middle of a table. just curious.

What do you mean by in a middle of a table?  A relation is simply a
set of attributes that _don't_ forcibly have an order, because sets
are unordered.

In the SQL spec, columns are ordered, iirc, as sad as that is. Writing 
application code that depends on column order is asking for pain and 
suffering.
All we agree on this, the only reason this feature is needed is to continue
to have a well table structure, see my last post.
Regards
Gaetano Mendola

---(end of broadcast)---
TIP 8: explain analyze is your friend


Re: [HACKERS] x86_64 configure problem

2004-09-11 Thread Gaetano Mendola
Joe Conway wrote:
Gaetano Mendola wrote:
Joe Conway wrote:
# python -c from distutils.sysconfig import get_python_lib as f; 
import os; print 
os.path.join(f(plat_specific=1,standard_lib=1),'config')
/usr/lib64/python2.3/config

Any other proposals? If not, any objections to the attached patch?

No one, we have to check also for the presence of distutils package 
installation.
It's not installed by default and I was bitten by it during the RPM 
building for
RH AS 2.1

What version of python comes with RH2.1?
1.5.2

In any case, the online documentation for python suggests that it is 
reasonable to expect that distutils is already installed (by default for 
python = 1.6, and by the user for python 1.5.2). See:
  http://www.python.org/doc/2.2.3/dist/intro.html

If there are no other objections, I'll commit the attached in about 24 
hours.
Are you going also to change the configure so it will check the distutils
package installation ?

Regards
Gaetano Mendola

---(end of broadcast)---
TIP 8: explain analyze is your friend


Re: [HACKERS] x86_64 configure problem

2004-09-11 Thread Joe Conway
Gaetano Mendola wrote:
Joe Conway wrote:
What version of python comes with RH2.1?
1.5.2
In any case, the online documentation for python suggests that it is 
reasonable to expect that distutils is already installed (by default 
for python = 1.6, and by the user for python 1.5.2). See:
  http://www.python.org/doc/2.2.3/dist/intro.html

If there are no other objections, I'll commit the attached in about 24 
hours.
Are you going also to change the configure so it will check the distutils
package installation ?
I wasn't going to -- python's own docs say I shouldn't need to. From the 
link above:

the Distutils work just fine with Python 1.5.2, and it is reasonable 
(and expected to become commonplace) to expect users of Python 1.5.2 to 
download and install the Distutils separately before they can install 
your modules

Joe
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [HACKERS] x86_64 configure problem

2004-09-11 Thread Joe Conway
Gaetano Mendola wrote:
Joe Conway wrote:
I wasn't going to -- python's own docs say I shouldn't need to. From 
the link above:

the Distutils work just fine with Python 1.5.2, and it is reasonable 
(and expected to become commonplace) to expect users of Python 1.5.2 
to download and install the Distutils separately before they can 
install your modules
I'm not native english speakers but that sentence above doesn't imply
Python 1.5.2 = Distutils. So instead of an error like this:
checking Python installation directories... Traceback (innermost last):
  File string, line 1, in ?
ImportError: No module named distutils
Traceback (innermost last):
  File string, line 1, in ?
ImportError: No module named distutils
/usr/
checking how to link an embedded Python application... no
configure: error: Python Makefile not found
error: Bad exit status from /var/tmp/rpm-tmp.56347 (%build)
is better have:
Error: you need to have Distutil installed
Perhaps. The first error message seems clear enough to me, but if you 
want to send me the necessary distutils test, I can incorporate it. Any 
other opinions out there?

Joe
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
  http://www.postgresql.org/docs/faqs/FAQ.html


Re: [HACKERS] x86_64 configure problem

2004-09-11 Thread Gaetano Mendola
Joe Conway wrote:
Gaetano Mendola wrote:
Joe Conway wrote:
What version of python comes with RH2.1?

1.5.2
In any case, the online documentation for python suggests that it is 
reasonable to expect that distutils is already installed (by default 
for python = 1.6, and by the user for python 1.5.2). See:
  http://www.python.org/doc/2.2.3/dist/intro.html

If there are no other objections, I'll commit the attached in about 
24 hours.

Are you going also to change the configure so it will check the distutils
package installation ?

I wasn't going to -- python's own docs say I shouldn't need to. From the 
link above:

the Distutils work just fine with Python 1.5.2, and it is reasonable 
(and expected to become commonplace) to expect users of Python 1.5.2 to 
download and install the Distutils separately before they can install 
your modules
I'm not native english speakers but that sentence above doesn't imply
Python 1.5.2 = Distutils. So instead of an error like this:
checking Python installation directories... Traceback (innermost last):
  File string, line 1, in ?
ImportError: No module named distutils
Traceback (innermost last):
  File string, line 1, in ?
ImportError: No module named distutils
/usr/
checking how to link an embedded Python application... no
configure: error: Python Makefile not found
error: Bad exit status from /var/tmp/rpm-tmp.56347 (%build)
is better have:
Error: you need to have Distutil installed

Regards
Gaetano Mendola








---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
 joining column's datatypes do not match


Re: [HACKERS] x86_64 configure problem

2004-09-11 Thread James William Pye
On Sat, 2004-09-11 at 14:05, Joe Conway wrote:
 Perhaps. The first error message seems clear enough to me, but if you 
 want to send me the necessary distutils test, I can incorporate it. Any 
 other opinions out there?

AC_MSG_CHECKING([for Python distutils module])
if ${PYTHON} 2- -c 'import distutils'
then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
AC_MSG_ERROR([distutils module not found])
fi

That should work.

While I'm of the opinion that installations without distutils are
antiquated, I see no reason why we couldn't check for it anyways.
(Gaetano requested it so there would probably be others who would
appreciate it.)

-- 
Regards,
James William Pye


signature.asc
Description: This is a digitally signed message part


Re: [HACKERS] x86_64 configure problem

2004-09-11 Thread Gaetano Mendola
Joe Conway wrote:
Gaetano Mendola wrote:
Joe Conway wrote:
I wasn't going to -- python's own docs say I shouldn't need to. From 
the link above:

the Distutils work just fine with Python 1.5.2, and it is reasonable 
(and expected to become commonplace) to expect users of Python 1.5.2 
to download and install the Distutils separately before they can 
install your modules

I'm not native english speakers but that sentence above doesn't imply
Python 1.5.2 = Distutils. So instead of an error like this:
checking Python installation directories... Traceback (innermost last):
  File string, line 1, in ?
ImportError: No module named distutils
Traceback (innermost last):
  File string, line 1, in ?
ImportError: No module named distutils
/usr/
checking how to link an embedded Python application... no
configure: error: Python Makefile not found
error: Bad exit status from /var/tmp/rpm-tmp.56347 (%build)
is better have:
Error: you need to have Distutil installed

Perhaps. The first error message seems clear enough to me, but if you 
want to send me the necessary distutils test, I can incorporate it. Any 
other opinions out there?
python -c from distutils import *  /dev/null 21 || (echo You need distutils 
installed; exit 1)

Regards
Gaetano Mendola




---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
 subscribe-nomail command to [EMAIL PROTECTED] so that your
 message can get through to the mailing list cleanly


[HACKERS] beta1 beta2 Windows heavy load

2004-09-11 Thread Daniel Schuchardt
Hi list,
is it is known that postgres 8.0 (beta1 and beta2 both same behavoir) 
will eat tons of memory on Windows under heavy load?

Scenario:
I have a big delete with about 56000 rows. (DELETE FROM mytable;)
There are triggers (after delete) updating 2 or 3 other tables. (there 
are triggers on this tables too).

first everything seems ok but after a short tine postgres starts eating 
memory. On my mashine one postgres.exe sometimes eates 300MB or more.

prob one : everything becomes slow because windows is swapping...
main problem : if there is to less virutal memory postgres will abort 
because of to less memory. For a 56000 row delete you need  500MB of 
virtual ram or postgres aborts.

I noticed the same behavoir when do lets say 75000 rows in a table 
(triggers updating other tables also).

In both situations without transactions.
Is this is a bug?
Daniel.
---(end of broadcast)---
TIP 6: Have you searched our list archives?
  http://archives.postgresql.org