public inbox for [email protected]help / color / mirror / Atom feed
[PATCH 02/10] Run 011_crash_recovery.pl with wal_level=minimal 2+ messages / 2 participants [nested] [flat]
* [PATCH 02/10] Run 011_crash_recovery.pl with wal_level=minimal @ 2021-03-08 06:32 Kyotaro Horiguchi <[email protected]> 0 siblings, 0 replies; 2+ messages in thread From: Kyotaro Horiguchi @ 2021-03-08 06:32 UTC (permalink / raw) The test doesn't need that feature and pg_current_xact_id() is better exercised by turning off the feature. Copied from: https://www.postgresql.org/message-id/20210308.173242.463790587797836129.horikyota.ntt%40gmail.com --- src/test/recovery/t/011_crash_recovery.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/recovery/t/011_crash_recovery.pl b/src/test/recovery/t/011_crash_recovery.pl index 10cd98f70a..690655dda2 100644 --- a/src/test/recovery/t/011_crash_recovery.pl +++ b/src/test/recovery/t/011_crash_recovery.pl @@ -11,7 +11,7 @@ use Config; plan tests => 3; my $node = get_new_node('primary'); -$node->init(allows_streaming => 1); +$node->init(); $node->start; my ($stdin, $stdout, $stderr) = ('', '', ''); -- 2.17.0 --XsQoSWH+UP9D9v3l Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0003-Make-sure-published-XIDs-are-persistent.patch" ^ permalink raw reply [nested|flat] 2+ messages in thread
* libedit history seems to be misbehaving / broken @ 2024-10-27 17:47 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 2+ messages in thread From: Tomas Vondra @ 2024-10-27 17:47 UTC (permalink / raw) To: [email protected] Hi, I accidentally built master with libedit (instead of the readline I use most of the time, due to missing readline-devel package). And for a while it was working fine, but then I realized the history is not working anymore, and is broken in a weird way :-( I'm not terribly familiar with libedit, so can't say if it's a bug in libedit, or if we're just using it wrong in some way. I investigated that while on a flight from pgconf.eu, but can't look into this further. So let me at least share the behavior I observed, and what I found. Note: All of this is with libedit-3.1-53.20240808cvs.fc40.x86_64, which is what I currently get in Fedora 40. Initially, history seems to work - more or less. Except for the detail that we always "repeat" the last command from the history. So if you do "SELECT 1" then the first query added to the history by the *next* psql session is going to be "SELECT 1". And this happens even if you don't do anything in psql. So if you enter & immediately exit 10x, you get 10 copies of the last query. Which is rather weird, and it also makes it less convenient to walk the history (ctrl-r search is fine, ofc). But there comes the following issue. Libedit identifies the history file by adding _HiStOrY_V2_ as the first line. But it also limits the history to 500 lines, and after adding the 501st line, it gets confused, attempts to enforce the 500-line limit, and removes the first line, which is the _HiStOrY_V2_ header. At which point the history stops to work, more or less - psql can't access the history, apparently due the header missing. We still append new entries at the end, can access earlier commands from the same session, but nothing from the file. And it stays broken forever, of course :-( regards -- Tomas Vondra ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2024-10-27 17:47 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-03-08 06:32 [PATCH 02/10] Run 011_crash_recovery.pl with wal_level=minimal Kyotaro Horiguchi <[email protected]> 2024-10-27 17:47 libedit history seems to be misbehaving / broken Tomas Vondra <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox