Re: [BUGS] RHEL4 RPM packages

2007-04-11 Thread Devrim GÜNDÜZ
Hi,

On Fri, 2007-03-02 at 09:17 -0800, John R Pierce wrote:
 looks like the RPMs for libpq.so.4 and libpq.so.3 can't coexist.

Ok, I got lots of complaints about this. I will work on this today and
announce new sets.

Regards,
-- 
Devrim GÜNDÜZ
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, ODBCng - http://www.commandprompt.com/




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


Re: [BUGS] RHEL4 RPM packages

2007-04-11 Thread Guillaume Smet

On 4/11/07, Devrim GÜNDÜZ [EMAIL PROTECTED] wrote:

On Fri, 2007-03-02 at 09:17 -0800, John R Pierce wrote:
 looks like the RPMs for libpq.so.4 and libpq.so.3 can't coexist.

Ok, I got lots of complaints about this. I will work on this today and
announce new sets.


It's not a real problem IMHO. AFAIR the compat RPMs were designed to
provide a compatibility layer between newer versions of PostgreSQL and
the distribution standard packages and you won't have both libpq
versions used by the distro.

It's probably easy to fix it but I don't think it's so important. At
least it doesn't prevent anyone to have a working system.

--
Guillaume

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


Re: [BUGS] RHEL4 RPM packages

2007-04-11 Thread Devrim GÜNDÜZ
Hi,

On Wed, 2007-04-11 at 01:10 -0700, John R Pierce wrote:

 well, it makes it VERY hard to install 8.2.3 on a RHEL4/CentOS4 system
 that also has, say, RH's build of Apache + PHP + PG access, as thats
 linked to the -3 libraries

Uh? So installing only compat-3 and PostgreSQL 8.2.3 doesn't work?

Regards,
-- 
Devrim GÜNDÜZ
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, ODBCng - http://www.commandprompt.com/




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


[BUGS] setseed accepts bad seeds

2007-04-11 Thread Kris Jurka


Why doesn't setseed complain when given a seed value outside of its 
expected range?  The documentation claims that 0 - 1 should be used, 
but shouldn't it actually be -1 - 1 to get the full range of the seed? 
If passed a value outside this range you always get the same value which 
isn't going to produce a good random number stream.


Kris Jurka


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


Re: [BUGS] RHEL4 RPM packages

2007-04-11 Thread Guillaume Smet

On 4/11/07, John R Pierce [EMAIL PROTECTED] wrote:

I think what -I- ran into was that there was no compat-3 in the public
repositories, just compat-4... this was about a month ago.  devrim
indicated he was going to upload compat-3, and showed me where to find
it, but I'd already installed compat-4, so -3 refused to install.

on the grounds that there are undoutablly software out there which WAS
linked with libpq.so.4, it seems to me there should just be one
compat-postgresql-libs RPM which provides both 3 and 4 and coexists with
current 8.2.3 rpms.


There's no software linked with libpq.so.4 on standard RHEL 4. They
are all built on libpq.so.3.
IMHO, your problem is that it seems to the RPM database that compat 4
is newer than compat. I think we should have 2 different packages with
different names compat-3 and compat-4.

But you only need the compat package with libpq.so.3 to install 8.1
and 8.2 on RHEL 4.

--
Guillaume

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [BUGS] setseed accepts bad seeds

2007-04-11 Thread Tom Lane
Kris Jurka [EMAIL PROTECTED] writes:
 Why doesn't setseed complain when given a seed value outside of its 
 expected range?

Why should it complain?  The use of the value is totally unspecified
anyway.

regards, tom lane

---(end of broadcast)---
TIP 1: 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: [BUGS] setseed accepts bad seeds

2007-04-11 Thread Kris Jurka



On Wed, 11 Apr 2007, Tom Lane wrote:


Kris Jurka [EMAIL PROTECTED] writes:

Why doesn't setseed complain when given a seed value outside of its
expected range?


Why should it complain?  The use of the value is totally unspecified
anyway.



Because the user is likely using it incorrectly.  I'm not sure what you 
mean by totally unspecified.  The documentation[1] states:


set seed for subsequent random() calls (value between 0 and 1.0)

When a user calls setseed(5), setseed(500), or setseed(-500) they get the 
same seed value each time which is surely not what they intended.  At 
minimum I think it should raise a warning.


Also I think that documentation should be corrected to indicate that 
vaules -1 to 1 are the correct seed value range or it should it should map 
0-1 to the entire seed space, not just half of it as is currently done. 
The decision of which change to make is unclear because it's a change to 
either the call signature or to the generated values for a given user 
supplied seed.


Kris Jurka

[1] 
http://www.postgresql.org/docs/8.2/static/functions-math.html#FUNCTIONS-MATH-FUNC-TABLE

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


Re: [BUGS] setseed accepts bad seeds

2007-04-11 Thread Tom Lane
Kris Jurka [EMAIL PROTECTED] writes:
 On Wed, 11 Apr 2007, Tom Lane wrote:
 Kris Jurka [EMAIL PROTECTED] writes:
 Why doesn't setseed complain when given a seed value outside of its
 expected range?
 
 Why should it complain?  The use of the value is totally unspecified
 anyway.

 Because the user is likely using it incorrectly.

It's not really possible to use it incorrectly, AFAICS.  Any value you
might pass to it will result in a specific new seed value.  Nowhere is
there any guarantee of what the mapping is, and it's obviously
impossible to guarantee that the mapping is one-to-one, so any user
assumptions about what a specific seed value might mean seem broken
regardless.

regards, tom lane

---(end of broadcast)---
TIP 1: 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: [BUGS] setseed accepts bad seeds

2007-04-11 Thread Kris Jurka



On Wed, 11 Apr 2007, Tom Lane wrote:


It's not really possible to use it incorrectly, AFAICS.  Any value you
might pass to it will result in a specific new seed value.  Nowhere is
there any guarantee of what the mapping is, and it's obviously
impossible to guarantee that the mapping is one-to-one, so any user
assumptions about what a specific seed value might mean seem broken
regardless.



Then please consider this patch which checks the range and maps the 
provided value to the entire seed space.


Kris JurkaIndex: src/backend/utils/adt/float.c
===
RCS file: /projects/cvsroot/pgsql/src/backend/utils/adt/float.c,v
retrieving revision 1.149
diff -c -r1.149 float.c
*** src/backend/utils/adt/float.c   27 Feb 2007 23:48:08 -  1.149
--- src/backend/utils/adt/float.c   11 Apr 2007 18:48:42 -
***
*** 1783,1790 
  setseed(PG_FUNCTION_ARGS)
  {
float8  seed = PG_GETARG_FLOAT8(0);
!   int iseed = (int) (seed * MAX_RANDOM_VALUE);
  
srandom((unsigned int) iseed);
  
PG_RETURN_VOID();
--- 1783,1800 
  setseed(PG_FUNCTION_ARGS)
  {
float8  seed = PG_GETARG_FLOAT8(0);
!   int iseed;
!   
!   if (seed  0 || seed  1)
!   elog(WARNING, setseed parameter %f out of expected range 
[0,1], seed);
! 
!   /* 
!* map seed range from [0, 1] to [-1, 1] to get the
!* full range of possible seed values.
!*/
!   seed = 2 * (seed - 0.5);
  
+   iseed = (int) (seed * MAX_RANDOM_VALUE);
srandom((unsigned int) iseed);
  
PG_RETURN_VOID();

---(end of broadcast)---
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate


Re: [BUGS] RHEL4 RPM packages

2007-04-11 Thread John R Pierce

Guillaume Smet wrote:


But you only need the compat package with libpq.so.3 to install 8.1
and 8.2 on RHEL 4.



but, again, I only see the compat -4 here...  no -3.
http://www.postgresql.org/ftp/binary/v8.2.3/linux/rpms/redhat/rhel-es-4/


the 8.2.1 equiv of that path has a comment thats flat wrong too, that 
libpq.so.4 shipped with RHEL4...




---(end of broadcast)---
TIP 4: Have you searched our list archives?

  http://archives.postgresql.org


Re: [BUGS] RHEL4 RPM packages

2007-04-11 Thread John R Pierce

Devrim GÜNDÜZ wrote:

Hi,

On Wed, 2007-04-11 at 01:10 -0700, John R Pierce wrote:

  

well, it makes it VERY hard to install 8.2.3 on a RHEL4/CentOS4 system
that also has, say, RH's build of Apache + PHP + PG access, as thats
linked to the -3 libraries



Uh? So installing only compat-3 and PostgreSQL 8.2.3 doesn't work?
  



I'll have to try that again on a clean box.


I think what -I- ran into was that there was no compat-3 in the public 
repositories, just compat-4... this was about a month ago.  devrim 
indicated he was going to upload compat-3, and showed me where to find 
it, but I'd already installed compat-4, so -3 refused to install.


on the grounds that there are undoutablly software out there which WAS 
linked with libpq.so.4, it seems to me there should just be one 
compat-postgresql-libs RPM which provides both 3 and 4 and coexists with 
current 8.2.3 rpms.



---(end of broadcast)---
TIP 4: Have you searched our list archives?

  http://archives.postgresql.org


Re: [BUGS] RHEL4 RPM packages

2007-04-11 Thread John R Pierce

Guillaume Smet wrote:

On 4/11/07, Devrim GÜNDÜZ [EMAIL PROTECTED] wrote:

On Fri, 2007-03-02 at 09:17 -0800, John R Pierce wrote:
 looks like the RPMs for libpq.so.4 and libpq.so.3 can't coexist.

Ok, I got lots of complaints about this. I will work on this today and
announce new sets.


It's not a real problem IMHO. AFAIR the compat RPMs were designed to
provide a compatibility layer between newer versions of PostgreSQL and
the distribution standard packages and you won't have both libpq
versions used by the distro.

It's probably easy to fix it but I don't think it's so important. At
least it doesn't prevent anyone to have a working system.


well, it makes it VERY hard to install 8.2.3 on a RHEL4/CentOS4 system 
that also has, say, RH's build of Apache + PHP + PG access, as thats 
linked to the -3 libraries


you get into rpm hell very fast going down that path.






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