pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: robin.knipe@gmail.com
Subject: BUG #16956: psql won't load command history
Date: Thu, 08 Apr 2021 15:00:22 +0000
Message-ID: <16956-2d64781689d887c1@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      16956
Logged by:          Robin Knipe
Email address:      robin.knipe@gmail.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}"
```



view thread (3+ messages)  latest in thread

Message-ID: <16956-2d64781689d887c1@postgresql.org>
Permalink:  ../16956-2d64781689d887c1@postgresql.org/
Also on:    postgresql.org/message-id/16956-2d64781689d887c1@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, robin.knipe@gmail.com
  Subject: Re: BUG #16956: psql won't load command history
  In-Reply-To: <16956-2d64781689d887c1@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox