[BUGS] BUG #6164: Flashing dialog

2011-08-16 Thread Kyle Fox

The following bug has been logged online:

Bug reference:  6164
Logged by:  Kyle Fox
Email address:  kyle@gmail.com
PostgreSQL version: 9.0
Operating system:   Mac OSX 10.6.8
Description:Flashing dialog
Details: 

I used the installer to install Postgres 9.0 on my Mac, and now every 10
seconds a dialog message flashes and immediately disappears, and STEALS
FOCUS.

My computer is completely unusable because of the installer. How do I fix
this? I would like to uninstall postgres entirely.

Here's the output from the Console.app:

11-08-15 9:24:04 PM Firewall[63]postgres is listening from 0.0.0.0:5432
proto=6
11-08-15 9:24:04 PM com.edb.launchd.postgresql-8.4[426] 2011-08-15 
21:24:04
MDT FATAL:  could not create shared memory segment: Cannot allocate memory
11-08-15 9:24:04 PM com.edb.launchd.postgresql-8.4[426] 2011-08-15 
21:24:04
MDT DETAIL:  Failed system call was shmget(key=5432001, size=32587776,
03600).
11-08-15 9:24:04 PM com.edb.launchd.postgresql-8.4[426] 2011-08-15 
21:24:04
MDT HINT:  This error usually means that PostgreSQL's request for a shared
memory segment exceeded available memory or swap space. To reduce the
request size (currently 32587776 bytes), reduce PostgreSQL's shared_buffers
parameter (currently 3584) and/or its max_connections parameter (currently
103).
11-08-15 9:24:04 PM com.edb.launchd.postgresql-8.4[426] The
PostgreSQL documentation contains more information about shared memory
configuration.
11-08-15 9:24:04 PM Firewall[63]postgres is listening from :::5432 
proto=6
11-08-15 9:24:04
PM  com.apple.launchd[1](com.edb.launchd.postgresql-8.4[426]) Exited 
with
exit code: 1
11-08-15 9:24:04 PM com.apple.launchd[1](com.edb.launchd.postgresql-8.4)
Throttling respawn: Will start in 10 seconds

-- 
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 #6161: Not enough memory error in psql with UTF8 console

2011-08-16 Thread Bruce Momjian

Wow, that is odd.  Can you get us a backtrace of psql in that case?

---

Gavin Kistner wrote:
> 
> The following bug has been logged online:
> 
> Bug reference:  6161
> Logged by:  Gavin Kistner
> Email address:  gkist...@nvidia.com
> PostgreSQL version: 9.0.4
> Operating system:   Windows 7x64
> Description:Not enough memory error in psql with UTF8 console
> Details: 
> 
> 1. Create registry key "HKEY_LOCAL_MACHINE\Software\Microsoft\Command
> Processor\Autorun" with value "@chcp 65001>nul" to set Windows console to
> UTF8 (see url[1]).
> 
> 2. Open a new cmd.exe window
> 
> 3. Connect to a simple database using psql.exe
> --> Text displayed:
> WARNING: Console code page (65001) differs from Windows code page (1252)
>  8-bit characters might not work correctly. See psql reference
>  page "Notes for Windows users" for details.
> 
> 4. Type "\dt"
> 
> EXPECTED: List of tables.
> ACTUAL: "Not enough memory." displayed.
> 
> 5. \q and close the cmd.exe window.
> 6. Delete the Autorun registry key.
> 7. Repeat steps 2-3
> --> Text displayed:
> WARNING: Console code page (437) differs from Windows code page (1252)
>  8-bit characters might not work correctly. See psql reference
>  page "Notes for Windows users" for details.
> 
> 4. Type "\dt"
> --> List of tables is properly displayed
> 
> [1] http://superuser.com/questions/269818
> 
> -- 
> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs

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

  + It's impossible for everything to be true. +

-- 
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 #6161: Not enough memory error in psql with UTF8 console

2011-08-16 Thread Gavin Kistner
I'm not a PSQL dev, just a normal user. If you let me know how to get you a 
backtrace, I'd be happy to help.

Here are simpler repro steps (no registry hacking required):
https://gist.github.com/1142428

Note the last line - the psql binary doesn't quit or crash with the "Not enough 
memory." error, it just fails to perform the specified command when the cmd.exe 
code page is set to 65001.


-Original Message-
From: Bruce Momjian [mailto:br...@momjian.us] 
Sent: Tuesday, August 16, 2011 7:35 AM
To: Gavin Kistner
Cc: pgsql-bugs@postgresql.org
Subject: Re: [BUGS] BUG #6161: Not enough memory error in psql with UTF8 console


Wow, that is odd.  Can you get us a backtrace of psql in that case?

---

Gavin Kistner wrote:
> 
> The following bug has been logged online:
> 
> Bug reference:  6161
> Logged by:  Gavin Kistner
> Email address:  gkist...@nvidia.com
> PostgreSQL version: 9.0.4
> Operating system:   Windows 7x64
> Description:Not enough memory error in psql with UTF8 console
> Details: 
> 
> 1. Create registry key "HKEY_LOCAL_MACHINE\Software\Microsoft\Command
> Processor\Autorun" with value "@chcp 65001>nul" to set Windows console 
> to
> UTF8 (see url[1]).
> 
> 2. Open a new cmd.exe window
> 
> 3. Connect to a simple database using psql.exe
> --> Text displayed:
> WARNING: Console code page (65001) differs from Windows code page (1252)
>  8-bit characters might not work correctly. See psql reference
>  page "Notes for Windows users" for details.
> 
> 4. Type "\dt"
> 
> EXPECTED: List of tables.
> ACTUAL: "Not enough memory." displayed.
> 
> 5. \q and close the cmd.exe window.
> 6. Delete the Autorun registry key.
> 7. Repeat steps 2-3
> --> Text displayed:
> WARNING: Console code page (437) differs from Windows code page (1252)
>  8-bit characters might not work correctly. See psql reference
>  page "Notes for Windows users" for details.
> 
> 4. Type "\dt"
> --> List of tables is properly displayed
> 
> [1] http://superuser.com/questions/269818
> 
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make 
> changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs

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

  + It's impossible for everything to be true. +
---
This email message is for the sole use of the intended recipient(s) and may 
contain
confidential information.  Any unauthorized review, use, disclosure or 
distribution
is prohibited.  If you are not the intended recipient, please contact the 
sender by
reply email and destroy all copies of the original message.
---

-- 
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 #6164: Flashing dialog

2011-08-16 Thread Josh Kupershmidt
On Mon, Aug 15, 2011 at 11:31 PM, Kyle Fox  wrote:

> I used the installer to install Postgres 9.0 on my Mac, and now every 10
> seconds a dialog message flashes and immediately disappears, and STEALS
> FOCUS.

The focus-stealing sounds like a problem coming from the EDB installer
you said you used, and you'll have to complain to those folks about
it.

> My computer is completely unusable because of the installer. How do I fix
> this? I would like to uninstall postgres entirely.
>
> Here's the output from the Console.app:
>
> 11-08-15 9:24:04 PM     Firewall[63]    postgres is listening from 
> 0.0.0.0:5432
> proto=6
> 11-08-15 9:24:04 PM     com.edb.launchd.postgresql-8.4[426]     2011-08-15 
> 21:24:04
> MDT FATAL:  could not create shared memory segment: Cannot allocate memory
> 11-08-15 9:24:04 PM     com.edb.launchd.postgresql-8.4[426]     2011-08-15 
> 21:24:04
> MDT DETAIL:  Failed system call was shmget(key=5432001, size=32587776,
> 03600).

From the logs you posted, it sounds like you simply need to adjust the
shared memory segments documented here:
  http://www.postgresql.org/docs/current/static/kernel-resources.html

See the "MacOS X" section on that page for OS X specific instructions.

Josh

-- 
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 #6164: Flashing dialog

2011-08-16 Thread Dave Page
On Tue, Aug 16, 2011 at 8:11 PM, Josh Kupershmidt  wrote:
> On Mon, Aug 15, 2011 at 11:31 PM, Kyle Fox  wrote:
>
>> I used the installer to install Postgres 9.0 on my Mac, and now every 10
>> seconds a dialog message flashes and immediately disappears, and STEALS
>> FOCUS.
>
> The focus-stealing sounds like a problem coming from the EDB installer
> you said you used, and you'll have to complain to those folks about
> it.

No it doesn't, unless the OP has found some weird bug in pgAdmin or
StackBuilder.

Sounds to me more like OSX is throwing the dialogue for some reason
when the launch daemon tries to load the service. Try running:

sudo launchctl unload /Library/LaunchDaemons/com.edb.launchd.postgresql-8.4

That should stop it trying to start the server, at least until the
next reboot (enough to hopefully see if the focus issue is resolved).
To completely uninstall, use

sudo open /Library/PostgreSQL/8.4/uninstall-postgresql.app/

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
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 #6164: Flashing dialog

2011-08-16 Thread Dave Page
On Tue, Aug 16, 2011 at 8:24 PM, Dave Page  wrote:
> On Tue, Aug 16, 2011 at 8:11 PM, Josh Kupershmidt  wrote:
>> On Mon, Aug 15, 2011 at 11:31 PM, Kyle Fox  wrote:
>>
>>> I used the installer to install Postgres 9.0 on my Mac, and now every 10
>>> seconds a dialog message flashes and immediately disappears, and STEALS
>>> FOCUS.
>>
>> The focus-stealing sounds like a problem coming from the EDB installer
>> you said you used, and you'll have to complain to those folks about
>> it.
>
> No it doesn't, unless the OP has found some weird bug in pgAdmin or
> StackBuilder.

For the benefit of the list archives, the OP just told me that the
dialog responsible for steal focus was coming from his firewall. He's
fixed that, and completed a fresh installation.


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
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 #6165: documentation bug in plpgsql-declarations.html and plpgsql-statements.html (or plpgsql parser bug)

2011-08-16 Thread raf

The following bug has been logged online:

Bug reference:  6165
Logged by:  raf
Email address:  r...@raf.org
PostgreSQL version: 9.0.4
Operating system:   N/A
Description:documentation bug in plpgsql-declarations.html and
plpgsql-statements.html (or plpgsql parser bug)
Details: 

the documentation available at:

  http://www.postgresql.org/docs/current/static/plpgsql-declarations.html

states that the general syntax of a variable declaration is:

  name [ CONSTANT ] type [ NOT NULL ] [ { DEFAULT | := } expression ];

when it is really:

  name [ CONSTANT ] type [ NOT NULL ] [ { DEFAULT | := | = } expression ];

i.e. an sql equality operator ("=") is accepted and acts as if it were
a plpgsql assignment operator (":=").

similarly, the documentation available at:

  http://www.postgresql.org/docs/current/static/plpgsql-statements.html

states that an assignment of a value to a PL/pgSQL variable is written as:

  variable := expression;

even though the sql equality operator works too:

  variable = expression;

so, there is either a plpgsql parser bug that treats the sql equality
operator as the plpgsql assignment operator, or "=" is an undocumented
alternative to the documented plpgsql assignment operator (":=").

the only mention i have found of "=" being an assignment operator is in
the documentation that shows:

  GET DIAGNOSTICS variable = item [ , ... ];

but i think that might be a special case.

example demonstration:

  do $$
  declare
i integer = 5;
  begin
raise notice '%', i;
i = 6;
raise notice %', i;
  end
  $$;

will output 5 and then 6 (as expected by someone who doesn't know that
they should be using ":=" according to the documentation).

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