BUG #14287: psql_history gets wiped out

From: rotten(at)windfish(dot)net
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #14287: psql_history gets wiped out
Date: 2016-08-11 17:18:29
Message-ID: 20160811171829.26420.71002@wrigleys.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: 14287
Logged by: Rick Otten
Email address: rotten(at)windfish(dot)net
PostgreSQL version: 9.5.3
Operating system: Ubuntu 14.04
Description:

I believe this behavior is new to the 9.5.3 psql client. It has been
bugging me ever since we patched to that release.

The psql_history file works fine unless you close your window without
exiting the psql shell. If you just drop your window (and corresponding ssh
session), the entire psql_history file will get wiped out. (file size 0)

This took me quite a while to figure out. My history would be there
sometimes when I came back, and other times it would be wiped out. At first
I thought I had a hacker trying to hide their tracks. After some research I
concluded that was not the case.

It was a colleague whom I observed closing their putty window without first
exiting the psql shell this morning that finally revealed how it was
happening.

It is reproducible in our environment.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2016-08-11 18:34:56 Re: BUG #14287: psql_history gets wiped out
Previous Message Tom Lane 2016-08-11 15:24:04 Re: BUG: Session getting disconnected while executing a function to create materialised views in PostgreSQL 9.6