BUG #16956: psql won't load command history

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: robin(dot)knipe(at)gmail(dot)com
Subject: BUG #16956: psql won't load command history
Date: 2021-04-08 15:00:22
Message-ID: 16956-2d64781689d887c1@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 16956
Logged by: Robin Knipe
Email address: robin(dot)knipe(at)gmail(dot)com
PostgreSQL version: 12.6
Operating system: kubuntu-18.04.2, docker postgres:12-alpine
Description:

Running the `psql` command from docker (postgres:12-alpine), fails to load
the `.psql_history` command contents. Strangely, the session's commands ARE
SAVED though! Also I can read the history contents in the psql session, as
the following raw output shows:
```
levqa=> \echo `echo $PSQL_HISTORY`
/.psql_history
levqa=> \echo `tail $PSQL_HISTORY`
_HiStOrY_V2_
_HiStOrY_V2_
_HiStOrY_V2_
_HiStOrY_V2_
echo\040HISTCONTROL\012;
`echo\040HISTCONTROL`\012;
\134echo\040:HISTCONTROL
\134echo\040:HISTFILE
\134set\040HISTFILE\040/.psql_history
\134echo\040:HISTFILE
levqa=>
```

FYI: the docker command I'm running:
```
docker run \
-it \
--entrypoint=bash \
--network=host \
--mount type=bind,source="$( ls ~/.psql_history )",target="/.psql_history"
\
-e PGPASSWORD="${PASS}" \
-e PSQL_HISTORY="/.psql_history" \
postgres:12-alpine \
-wh localhost \
"${NAME}" \
"${USER}"
```

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2021-04-08 15:15:34 Re: BUG #16955: Replication port problems
Previous Message PG Bug reporting form 2021-04-08 13:53:45 BUG #16955: Replication port problems