Thread: how to clear the query history?
Hi, this is pgadmin4, 6.11 when trying to open Query-Tool I get this error, and the tab is opened empty and stale (unremoveable): Failed to fetch Query History Error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7B%7D for the full message This happens only on a specific database. When I open Query Tool for a different database, then switch the Tab back from "Query History" to "Query", then it works again. Using a different browser does not help, restarting the pgadmin4 server doesn't help either. Apparently that Query History data got persistently botched. Where is that stored, so I can clean it out? This has apparently happened while I was trying to somehow enable selection from firefox about:config. So when we're at it: is there a way to enable selection in the editor? This is a FreeBSD desktop, and we have two cut&paste tools: - the selection: mark something with left-mouse, point somewhere else and insert it with middle-mouse. - the Clipboard: mark something with left-mouse, hit Ctrl-C. point somewhere else and insert with Ctrl-V. Both do normally work, the exception is the pgadmin4 editor, where the selection appears to be disabled. Since my normal web application editor (javascript only) does work nicely with both, this must be something specific to pgadmin4. -- PMc
Hi Peter,
On Thu, Aug 4, 2022 at 5:57 PM Peter <pmc@citylink.dinoex.sub.org> wrote:
Hi,
this is pgadmin4, 6.11
when trying to open Query-Tool I get this error, and the tab is
opened empty and stale (unremoveable):
Failed to fetch Query History
Error: Minified React error #31;
visit
https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7B%7D
for the full message
This looks similar to - https://redmine.postgresql.org/issues/7468
This happens only on a specific database. When I open Query Tool for
a different database, then switch the Tab back from "Query
History" to "Query", then it works again.
Using a different browser does not help, restarting the pgadmin4
server doesn't help either. Apparently that Query History data got
persistently botched.
Where is that stored, so I can clean it out?
If you're using the desktop variant then you'll find a file pgadmin4.db SQLite file in the .pgadmin directory of user home.
If on server mode then it should be in /var/lib/pgadmin.
You can open the .db file and clear the query_history table.
This has apparently happened while I was trying to somehow enable
selection from firefox about:config. So when we're at it: is there a
way to enable selection in the editor?
This is a FreeBSD desktop, and we have two cut&paste tools:
- the selection: mark something with left-mouse, point somewhere else
and insert it with middle-mouse.
- the Clipboard: mark something with left-mouse, hit Ctrl-C. point
somewhere else and insert with Ctrl-V.
Both do normally work, the exception is the pgadmin4 editor, where
the selection appears to be disabled. Since my normal web application
editor (javascript only) does work nicely with both, this must be
something specific to pgadmin4.
pgAdmin4 editor selection is not disabled. Can you share a screen recording to understand better?
-- PMc
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Software Architect | edbpostgres.com
"Don't Complain about Heat, Plant a TREE"
On Thu, Aug 04, 2022 at 06:15:43PM +0530, Aditya Toshniwal wrote: ! This looks similar to - https://redmine.postgresql.org/issues/7468 Hi Aditya, thank You for the reply! So it is a known issue, fine. It doesn't bother me much when I'm able to fix it. ! If you're using the desktop variant then you'll find a file pgadmin4.db ! SQLite file in the .pgadmin directory of user home. ! If on server mode then it should be in /var/lib/pgadmin. ! You can open the .db file and clear the query_history table. Yep, the user database, I found that in the meantime, thank You, that worked well. :) ! pgAdmin4 editor selection is not disabled. Can you share a screen recording ! to understand better? Hm, I don't have a screen recorder... but it is not difficult to understand: - open the query tool - look at the bottom of the window, there is a text "Total rows: 0 of 0" - Mark that text with left-mouse - point back into the query tool editor - press middle-mouse -> the text inserts. - Now mark any text *within* the query tool editor with left-mouse - Point anywhere, another app, an xterm, emacs, or inside the query tool editor itself - Click middle-mouse -> everywhere the old text "total rows..." inserts. If this works different for You on maybe linux, then just tell me, then I have to enable some linux vm to access the pgadmin server and then compare from there... -- PMc