Re: [BUGS] BUG #8514: cache lookup failed for relation 421062806

2013-10-10 Thread Michael Paquier
On Thu, Oct 10, 2013 at 1:24 AM,   wrote:
> my postgresql running file . but sometime i found cache lookup failed for
> relation 421062806 error in postgresql log. can anyone tell me significant
> of this error.
A relation has disappeared even if the session hold a sufficient lock
on it, ensuring that the relation have to be present.
-- 
Michael


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


[BUGS] PostgreSQL Service on Windows does not start.

2013-10-10 Thread Naoya Anzai
Hi All,

I have found a case that PostgreSQL Service does not start.
When it happens, the following error appears.

 "is not a valid Win32 application"

This failure occurs when the following conditions are true.

1. There is "postgres.exe" in any directory that contains a space,
   such as "Program Files".

   e.g.)
   C:\Program Files\PostgreSQL\bin\postgres.exe

2. A file using the first white space-delimited 
   tokens of that directory as the file name exists,
   and there is it in the same hierarchy.

   e.g.)
   C:\Program //file

"pg_ctl.exe" as PostgreSQL Service creates a postgres 
process using an absolute path which indicates the 
location of "postgres.exe",but the path is not enclosed 
in quotation.

Therefore,if the above-mentioned conditions are true, 
CreateProcessAsUser(a Windows Function called by pg_ctl.exe) 
tries to create a process using the other file such 
as "Program", so the service fails to start.

Accordingly, I think that the command path should be 
enclosed in quotation.

I created a patch to fix this failure,
So could anyone confirm?

Regards,

Naoya

---
Naoya Anzai
Engineering Department
NEC Soft, Ltd.
E-Mail: anzai-na...@mxu.nes.nec.co.jp
---



pg_ctl.c.patch
Description: pg_ctl.c.patch

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] BUG #8467: Slightly confusing pgcrypto example in docs

2013-10-10 Thread Bruce Momjian
On Thu, Oct 10, 2013 at 08:32:32PM -0400, Bruce Momjian wrote:
> > > How can the later entry not be MD5 hash? 
> > 
> > Because what you pass to the functions is 'md5', not 'md5 hash', which
> > is what the new text appears to indicate.
> 
> So if we revert, will it still be clear what is MD5 and what is MD5 hash?

I mean, will it be clear what is MD5 crypt and what is MD5 hash?

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

  + Everyone has their own god. +


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] BUG #8467: Slightly confusing pgcrypto example in docs

2013-10-10 Thread Bruce Momjian
On Thu, Oct 10, 2013 at 08:22:30PM -0400, Peter Eisentraut wrote:
> On Thu, 2013-10-10 at 19:14 -0400, Bruce Momjian wrote:
> > > The changes shown below are incorrect, I think.
> > > 
> > > 
> > > On 10/2/13 12:00 PM, Bruce Momjian wrote:
> > > > *** gen_salt(type text [, iter_count integer
> > > > *** 353,359 
> > > >  12 years
> > > > 
> > > > 
> > > > !md5
> > > >  2345086
> > > >  1 day
> > > >  3 years
> > > > --- 358,364 
> > > >  12 years
> > > > 
> > > > 
> > > > !md5 hash
> > 
> > Uh, the table already has a mention of md5 crypt above:
> > 
> >crypt-md5
> > 
> > How can the later entry not be MD5 hash? 
> 
> Because what you pass to the functions is 'md5', not 'md5 hash', which
> is what the new text appears to indicate.

So if we revert, will it still be clear what is MD5 and what is MD5 hash?

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

  + Everyone has their own god. +


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] BUG #8467: Slightly confusing pgcrypto example in docs

2013-10-10 Thread Peter Eisentraut
On Thu, 2013-10-10 at 19:14 -0400, Bruce Momjian wrote:
> > The changes shown below are incorrect, I think.
> > 
> > 
> > On 10/2/13 12:00 PM, Bruce Momjian wrote:
> > > *** gen_salt(type text [, iter_count integer
> > > *** 353,359 
> > >  12 years
> > > 
> > > 
> > > !md5
> > >  2345086
> > >  1 day
> > >  3 years
> > > --- 358,364 
> > >  12 years
> > > 
> > > 
> > > !md5 hash
> 
> Uh, the table already has a mention of md5 crypt above:
> 
>crypt-md5
> 
> How can the later entry not be MD5 hash? 

Because what you pass to the functions is 'md5', not 'md5 hash', which
is what the new text appears to indicate.



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] BUG #8516: Calling VOLATILE from STABLE function

2013-10-10 Thread 'Bruce Momjian'
On Thu, Oct 10, 2013 at 04:10:35PM -0700, Dwayne Towell wrote:
> > According to the documentation, f() should be marked VOLATILE also, since
> > calling f() produces side effects. PostgreSQL does not give a warning (or
> > better yet, an error); I think it should.
> 
> I think the answer is that function authors are required to prevent
> functions they mark as STABLE from calling VOLATILE functions.
> 
> --
> 
> I understand it's an error (at least usually), my question/issue is why does
> PostgreSQL NOT give at least a warning when a programmer (probably
> accidentally) calls a VOLATILE function in one that he has specifically
> tagged as STABLE? The compiler has all the information to notify the
> programmer of a mistake, but isn't. This violates a fundamental principle of
> software engineering--take every opportunity to prevent errors.

Well, we can't walk the function tree to know all called functions, and
those they call, so we don't even try.

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

  + Everyone has their own god. +


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] BUG #8467: Slightly confusing pgcrypto example in docs

2013-10-10 Thread Bruce Momjian
On Thu, Oct 10, 2013 at 04:05:50PM -0400, Peter Eisentraut wrote:
> The changes shown below are incorrect, I think.
> 
> 
> On 10/2/13 12:00 PM, Bruce Momjian wrote:
> > *** gen_salt(type text [, iter_count integer
> > *** 353,359 
> >  12 years
> > 
> > 
> > !md5
> >  2345086
> >  1 day
> >  3 years
> > --- 358,364 
> >  12 years
> > 
> > 
> > !md5 hash

Uh, the table already has a mention of md5 crypt above:

   crypt-md5

How can the later entry not be MD5 hash?

> >  2345086
> >  1 day
> >  3 years
> > *** gen_salt(type text [, iter_count integer
> > *** 380,386 
> >   
> >   
> >
> > !   md5 numbers are from mdcrack 1.2.
> >
> >   
> >   
> > --- 385,391 
> >   
> >   
> >
> > !   md5 hash numbers are from mdcrack 1.2.
> >
> >   
> >   
> > *** gen_random_bytes(count integer) returns
> > *** 1343,1349 
> > OpenBSD sys/crypto
> >
> >
> > !   MD5 and SHA1
> > WIDE Project
> > KAME kame/sys/crypto
> >
> > --- 1348,1354 
> > OpenBSD sys/crypto
> >
> >
> > !   MD5 hash and SHA1
> > WIDE Project
> > KAME kame/sys/crypto
> >
> 

Again, "MD5 crypt" is mentioned in the same table above:

  MD5 crypt

so how can this not be md5 hash?

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

  + Everyone has their own god. +


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] BUG #8516: Calling VOLATILE from STABLE function

2013-10-10 Thread Bruce Momjian
On Wed, Oct  9, 2013 at 08:58:46PM +, dwa...@docketnavigator.com wrote:
> The following bug has been logged on the website:
> 
> Bug reference:  8516
> Logged by:  Dwayne Towell
> Email address:  dwa...@docketnavigator.com
> PostgreSQL version: 9.2.4
> Operating system:   CentOS
> Description:
> 
> Why doesn't PostgreSQL give a warning when calling a volatile function from
> a stable function?
> 
> 
> For example:
> CREATE TABLE x (val double);
> 
> 
> CREATE FUNCTION g() RETURNS boolean AS $$
> INSERT INTO x SELECT rand() RETURNING val>0.5; 
> $$ LANGUAGE SQL VOLATILE;
> 
> 
> CREATE FUNCTION f() RETURNS boolean AS $$
> SELECT g(); -- this is where the stability-violation happens
> $$ LANGUAGE SQL STABLE; -- this is a lie
> 
> 
> According to the documentation, f() should be marked VOLATILE also, since
> calling f() produces side effects. PostgreSQL does not give a warning (or
> better yet, an error); I think it should.

I think the answer is that function authors are required to prevent
functions they mark as STABLE from calling VOLATILE functions.

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

  + Everyone has their own god. +


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] Completely broken replica after PANIC: WAL contains references to invalid pages

2013-10-10 Thread Sergey Konoplev
On Thu, Oct 10, 2013 at 2:48 PM, Alvaro Herrera
 wrote:
>> Could you please give me a hint of how to check if this patch was
>> included in 9.2.5 or not?
>
> Yes, this was committed in June:
>
> commit 99ee15b315c187045a95db7b27fd9d866aea93e0
> Author: Simon Riggs 
> Date:   Sun Jun 23 11:05:02 2013 +0100

Good news, thank you.

-- 
Kind regards,
Sergey Konoplev
PostgreSQL Consultant and DBA

http://www.linkedin.com/in/grayhemp
+1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979
gray...@gmail.com


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] Completely broken replica after PANIC: WAL contains references to invalid pages

2013-10-10 Thread Alvaro Herrera
Sergey Konoplev escribió:
> On Tue, Jun 11, 2013 at 6:50 AM, Tom Lane  wrote:
> > Sergey Konoplev  writes:
> >> Just curious, what is the planned date for the next minor release, and
> >> BTW where is it possible to see the roadmap for minor releases?
> >
> > There is no planned date, and certainly no "roadmap".  We make minor
> > releases when the core team judges that enough (or severe enough)
> > fixes have accumulated since the last time.  Historically we've averaged
> > about four minor releases a year, but that's not set in stone anywhere.
> 
> Could you please give me a hint of how to check if this patch was
> included in 9.2.5 or not?

Yes, this was committed in June:

commit 99ee15b315c187045a95db7b27fd9d866aea93e0
Author: Simon Riggs 
Date:   Sun Jun 23 11:05:02 2013 +0100

-- 
Álvaro Herrerahttp://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] Completely broken replica after PANIC: WAL contains references to invalid pages

2013-10-10 Thread Sergey Konoplev
On Tue, Jun 11, 2013 at 6:50 AM, Tom Lane  wrote:
> Sergey Konoplev  writes:
>> Just curious, what is the planned date for the next minor release, and
>> BTW where is it possible to see the roadmap for minor releases?
>
> There is no planned date, and certainly no "roadmap".  We make minor
> releases when the core team judges that enough (or severe enough)
> fixes have accumulated since the last time.  Historically we've averaged
> about four minor releases a year, but that's not set in stone anywhere.

Could you please give me a hint of how to check if this patch was
included in 9.2.5 or not?

-- 
Kind regards,
Sergey Konoplev
PostgreSQL Consultant and DBA

http://www.linkedin.com/in/grayhemp
+1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979
gray...@gmail.com


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] error

2013-10-10 Thread John R Pierce

On 10/10/2013 7:18 AM, Andrius Di wrote:

Hello, how to solve this error (please see attachment)?


what exactly were you doing when you got this error, what Windows 
version was this on, etc etc?


the error is pretty explicit, I would inspect the value of your COMSPEC 
environment variable.   for instance, at a CMD ('dos') prompt, type the 
command,

ECHO %COMSPEC%

and you should get something like...

C:\WINDOWS\system32\cmd.exe



p.s  please direct replies to pgsql-bugs@postgresql.org and not me 
personally.



--
john r pierce  37N 122W
somewhere on the middle of the left coast



--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] BUG #8517: Problem due to libeay32.dll about ordinal

2013-10-10 Thread John R Pierce

On 10/10/2013 6:27 AM, s.mech...@gmail.com wrote:

I'm trying since yesterday to install a software which needs to install
postgreSQL 8.4 aswell. When the installation is finished, a message appears
a few times which says
"The 3873 ordinal can't be find in the LIBEAY32.dll dynamic library" (in
french)
So i suppose i've some corrupted files, but could you maybe light me on
about this problem ?


I'd contact the distributors or authors of this 'a software', if its got 
its own postgres 8.4 build bundled with it.   I do hope its not 8.4.0, 
thats VERY obsolete, 8.4 is currently up to 8.4.18.


libeay32.dll is, I believe, part of OpenSSL, which is bundled into 
PostgreSQL to support SSL connections.   that error suggests a version 
mismatch, where something is trying to call an entry point in that 
library which doesn't exist.


this software you're installing, is it tested and supported on win7?


p.s  please direct replies to pgsql-bugs@postgresql.org and not me 
personally.


--
john r pierce  37N 122W
somewhere on the middle of the left coast



--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


[BUGS] error

2013-10-10 Thread Andrius Di
Hello, how to solve this error (please see attachment)?

Regards,
AnDi
<>
-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


[BUGS] BUG #8517: Problem due to libeay32.dll about ordinal

2013-10-10 Thread s . mechaab
The following bug has been logged on the website:

Bug reference:  8517
Logged by:  Sémy
Email address:  s.mech...@gmail.com
PostgreSQL version: 8.4.0
Operating system:   Windows 7 - 32bits
Description:

Hello,


I'm trying since yesterday to install a software which needs to install
postgreSQL 8.4 aswell. When the installation is finished, a message appears
a few times which says 
"The 3873 ordinal can't be find in the LIBEAY32.dll dynamic library" (in
french)
So i suppose i've some corrupted files, but could you maybe light me on
about this problem ?


Thank you,
Regards,
Sémy



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


[BUGS] Bit String expand bug

2013-10-10 Thread Gabriel Ciubotaru

Hello,
There's a problem with expanding Bit String data types, it make 
right padding with 0 instead of left padding , making  the bit mask 
almost useless.
There is an workaround for that, like mask::bit(n) >> 
(n-length(mask)), but is much slower than directly left padding on expand.
I wonder if is this intended for Big Endian processing or is just 
wrong coded.


Have a nice day !


--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


[BUGS] BUG #8516: Calling VOLATILE from STABLE function

2013-10-10 Thread dwayne
The following bug has been logged on the website:

Bug reference:  8516
Logged by:  Dwayne Towell
Email address:  dwa...@docketnavigator.com
PostgreSQL version: 9.2.4
Operating system:   CentOS
Description:

Why doesn't PostgreSQL give a warning when calling a volatile function from
a stable function?


For example:
CREATE TABLE x (val double);


CREATE FUNCTION g() RETURNS boolean AS $$
INSERT INTO x SELECT rand() RETURNING val>0.5; 
$$ LANGUAGE SQL VOLATILE;


CREATE FUNCTION f() RETURNS boolean AS $$
SELECT g(); -- this is where the stability-violation happens
$$ LANGUAGE SQL STABLE; -- this is a lie


According to the documentation, f() should be marked VOLATILE also, since
calling f() produces side effects. PostgreSQL does not give a warning (or
better yet, an error); I think it should.
 




-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] BUG #8467: Slightly confusing pgcrypto example in docs

2013-10-10 Thread Peter Eisentraut
The changes shown below are incorrect, I think.


On 10/2/13 12:00 PM, Bruce Momjian wrote:
> *** gen_salt(type text [, iter_count integer
> *** 353,359 
>  12 years
> 
> 
> !md5
>  2345086
>  1 day
>  3 years
> --- 358,364 
>  12 years
> 
> 
> !md5 hash
>  2345086
>  1 day
>  3 years
> *** gen_salt(type text [, iter_count integer
> *** 380,386 
>   
>   
>
> !   md5 numbers are from mdcrack 1.2.
>
>   
>   
> --- 385,391 
>   
>   
>
> !   md5 hash numbers are from mdcrack 1.2.
>
>   
>   
> *** gen_random_bytes(count integer) returns
> *** 1343,1349 
> OpenBSD sys/crypto
>
>
> !   MD5 and SHA1
> WIDE Project
> KAME kame/sys/crypto
>
> --- 1348,1354 
> OpenBSD sys/crypto
>
>
> !   MD5 hash and SHA1
> WIDE Project
> KAME kame/sys/crypto
>



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs