Re: [BUGS] BUG #6204: Using plperl functions generate crash

2012-04-19 Thread ljwilson
I began testing PostgreSQL 9.1.x last week, and came across this issue.
Repeatable under the following scenarios (all 32-bit)

1. Windows XP SP3 with latest updates.
2. Windows 7 SP1 with latest updates.
3. Any flavor of Perl 5.1.4.x (I've tried strawberry-perl-5.14.2.1-32bit,
ActivePerl-5.14.2.1402-MSWin32-x86-295342, and compiled my own for 5.14.0,
5.14.1, and 5.14.2)
4. postgresql-9.1.0-windows, postgresql-9.1.1-windows,
postgresql-9.1.2-windows, and postgresql-9.1.3-windows from the one-click
installers.
5. Compiled postgresql-9.1.3 from source using Windows Platform SDK 7.0.

But here is what will work:
1. Compile postgresql-9.1.3 using mingw32
2. Replace only the plperl.dll the official binaries supply with the
plperl.dll you get from the mingw32 compile
3. Then the test which started this bug discussion works.

This makes me think there is an incompatibility in some environments related
to plperl. I thought maybe it was the version of msvcr90.dll since the
mingw32 compile doesn't link with it. I've got four versions of it on my XP
test box, and have put each version of that dll in my various install
subdirectories (perl\bin, perl\lib, pgsql\bin, pgsql\lib), and none of them
make a difference (assuming it is seeing them "first"). 

My MSVCR90.DLL versions (size)
9.0.21022.8 (655,872 bytes)
9.0.30729.1 (655,872 bytes)
9.0.30729.4148 (653,120 bytes)
9.0.30729.6161 (653,136 bytes)

If it is an environment issue of some kind it would be interesting to know
what locales people have where it works versus where it doesn't. I'm using
the standard ones that the PostgreSQL one-click installer defaults to.

I'd be glad to post the plperl.dll (160,324 bytes) that works for me if
there is a proper place for this kind of thing. Or just compile it from
source yourself using the mingw instructions at
http://www.postgresql.org/docs/9.1/static/installation-platform-notes.html#INSTALLATION-NOTES-MINGW

...jack



--
View this message in context: 
http://postgresql.1045698.n5.nabble.com/BUG-6204-Using-plperl-functions-generate-crash-tp4802111p5651759.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.

-- 
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 #6602: concurrent psql session clobbers history

2012-04-19 Thread i+pgbugs
The following bug has been logged on the website:

Bug reference:  6602
Logged by:  Adrian Dries
Email address:  i+pgb...@avdd.tk
PostgreSQL version: 9.1.3
Operating system:   Ubuntu ppa:pitti/postgresql
Description:

A concurrent psql session will overwrite the history of the first.  This
does not look good: a database tool causing me to lose my data!

# session 1

$ psql -q
postgres=# \echo first session exits first
first session exits first
postgres=# \q
$ cat .psql_history 
\echo first session exits first
\q
$ psql -q
postgres=# 
$ cat .psql_history 
\echo second session exits second
\q
$ psql -q
postgres=# \echo first session exits second
first session exits second
postgres=# \q
$ cat .psql_history 
\echo second session exits second
\q
\echo first session exits second
\q

# session 2

$ psql -q
postgres=# \echo second session exits second
second session exits second
postgres=# \q
$ cat .psql_history 
\echo second session exits second
\q
$ psql -q
postgres=# \echo second session exits first
second session exits first
postgres=# \q
$ cat .psql_history 
\echo second session exits second
\q
\echo second session exits first
\q
 



-- 
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 #6602: concurrent psql session clobbers history

2012-04-19 Thread Tom Lane
i+pgb...@avdd.tk writes:
> A concurrent psql session will overwrite the history of the first.  This
> does not look good: a database tool causing me to lose my data!

Works okay for me.  I suspect you need to take this up with whoever
packages libreadline for Ubuntu, because it's going to be libreadline's
problem not ours.

regards, tom lane

-- 
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 #6204: Using plperl functions generate crash

2012-04-19 Thread Simon Willett

ljwilson wrote
> 
> But here is what will work:
> 1. Compile postgresql-9.1.3 using mingw32
> 2. Replace only the plperl.dll the official binaries supply with the
> plperl.dll you get from the mingw32 compile
> 3. Then the test which started this bug discussion works.
> 

This is really good news. 
Thank you.

 Simon

--
View this message in context: 
http://postgresql.1045698.n5.nabble.com/BUG-6204-Using-plperl-functions-generate-crash-tp4802111p5652595.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.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] BUG #6602: concurrent psql session clobbers history

2012-04-19 Thread Peter Eisentraut
On tor, 2012-04-19 at 15:00 -0400, Tom Lane wrote:
> i+pgb...@avdd.tk writes:
> > A concurrent psql session will overwrite the history of the first.  This
> > does not look good: a database tool causing me to lose my data!
> 
> Works okay for me.  I suspect you need to take this up with whoever
> packages libreadline for Ubuntu, because it's going to be libreadline's
> problem not ours.

It's probably actually using libedit for the history part.


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