BUG #6602: concurrent psql session clobbers history - Mailing list pgsql-bugs

From i+pgbugs@avdd.tk
Subject BUG #6602: concurrent psql session clobbers history
Date
Msg-id E1SKoCB-00068b-5S@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #6602: concurrent psql session clobbers history  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged on the website:

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

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=3D# \echo first session exits first
first session exits first
postgres=3D# \q
$ cat .psql_history=20
\echo first session exits first
\q
$ psql -q
postgres=3D#=20
$ cat .psql_history=20
\echo second session exits second
\q
$ psql -q
postgres=3D# \echo first session exits second
first session exits second
postgres=3D# \q
$ cat .psql_history=20
\echo second session exits second
\q
\echo first session exits second
\q

# session 2

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

pgsql-bugs by date:

Previous
From: ljwilson
Date:
Subject: Re: BUG #6204: Using plperl functions generate crash
Next
From: Tom Lane
Date:
Subject: Re: BUG #6602: concurrent psql session clobbers history