Troubleshooting
Keys the terminal does not deliver, rendering problems, connection errors specific to pgtc, frequent questions, and the log file.
If a key does not work
pgtc sees only what the terminal emulator delivers. The affected commands have a second binding (below), are in
the menu (F9 or Esc 9), and can be rebound in
keymap.toml. F1 lists the keys of the focused part: a
listed key that does nothing is intercepted by the terminal.
| Key | Problem | Use |
|---|---|---|
| F1 … F10 | Taken by the terminal (GNOME Terminal: F1, F10), lost over some SSH clients, Mac keyboards. | Esc then a digit: Esc 5 = F5, Esc 0 = F10. Mac: Fn + the key. |
| Ctrl+Tab | Switches the terminal's tabs, or arrives as Tab. | F6, Alt+1 / Alt+2. |
| Ctrl+Shift+Z | Arrives as Ctrl+Z. | Alt+Shift+Z. |
| Ctrl+Space | Switches the input language (macOS, Windows). | Alt+/. |
| Ctrl+PgUp / Ctrl+PgDn | GNOME Terminal, xfce Terminal: their own tabs. | Alt+PgUp / Alt+PgDn. |
| Ctrl+Shift+Home / End | Windows Terminal scrolls its buffer. | Alt+Shift+Home / Alt+Shift+End. |
| Shift+F3 | Lost in some Linux terminals. | Alt+F3. |
| Alt+Shift + arrows | Windows Terminal moves between its panes. | Drag the line above the results. |
| Shift+PgUp / Shift+PgDn | GNOME Terminal, xterm, Konsole scroll their buffer. | Shift + arrows. |
| Ctrl+Backspace, Ctrl+Enter | Arrive as plain Backspace / Enter in most terminals. | Ctrl+Shift+Left then delete; Tab to OK. |
| Ctrl+1, Ctrl+2, Ctrl+Shift + arrows | Not reported by most terminals. | Alt+1, Alt+2, Alt + arrows. |
| Ctrl+A | GNU screen's command key. | Ctrl+A A, or change screen's command key. |
| Every Alt key | macOS Terminal and iTerm2 type special characters. | Use Option as Meta key (Terminal: Settings → Profiles → Keyboard; iTerm2: Profiles → Keys → Left Option key: Esc+). |
| Alt + letter | Opens the terminal's window menu (Windows, Linux desktops). | Turn off the terminal's menu access keys. |
- Terminals with the kitty keyboard protocol (kitty, WezTerm, foot, Ghostty, recent Alacritty, iTerm2 when enabled) deliver all of these; pgtc enables the protocol at start. The Windows console and Windows Terminal deliver most.
- PuTTY: Alt + arrows work with the default settings; 0.77 and newer also with Terminal → Keyboard → Arrow keys with modifiers: xterm-style.
The screen looks wrong
| Symptom | Cause and fix |
|---|---|
Frames made of letters (q, x, l), question marks or boxes | No line-drawing characters, or the terminal is not UTF-8: set UTF-8, or turn on ASCII frames. |
| Gaps in frames, misaligned columns | The font is not monospaced. |
| Wrong or blocky colours in Tokyo Night / Dracula | No true colour through the terminal, SSH client or screen / tmux: use a 16-colour scheme. |
| Garbled after a resize or a network hiccup | Resize the window slightly; pgtc redraws everything. |
| Terminal unusable after pgtc ended badly | reset. |
Connecting fails
Server errors (FATAL: …) are shown verbatim with DETAIL and HINT. What is
specific to pgtc:
| Symptom | Cause and fix |
|---|---|
| A timeout after 10 seconds | Connect timeout; raise it for slow links. |
password authentication failed (28P01) | Possibly a stale .pgpass line. The login dialog reappears; Save password replaces the line. |
| no pg_hba.conf entry … no encryption | Only hostssl records match: set SSL mode require or stricter. |
database … does not exist (3D000) | Maintenance DB of the saved connection. |
too many clients already / too many connections for role … (53300) | Every pgtc tab holds a session of its own: close tabs. |
A certificate error with verify-ca / verify-full | Set Root cert. file to the issuing CA's PEM file; for verify-full the Host must match the certificate. |
| The login dialog on every connect | No stored password for host, port, maintenance database and user, or .pgpass is ignored for its mode (chmod 600). See Passwords. |
| The server is refused after connecting | server_version_num below 110000; pgtc supports PostgreSQL 11 and newer. |
| not yet verified with pgtc | A newer major version than pgtc knows; the catalog queries of the newest known version are used. A notice only. |
| A database cannot be expanded in the tree | No CONNECT privilege, or datallowconn = false. |
Questions and answers
| Question | Answer |
|---|---|
| New query / Open SQL file are disabled | The tree cursor is on a server, role or tablespace: these name no database. Select a database or an object in one. |
| F7: No developer templates | , or pgtc --setup. |
| F7, F4, F8 or autocomplete ask to finish or close the result | The tab has a paused result (1,000+ rows) or a running export, so its session cannot run the catalog queries. Alt+End fetches the rest, Alt+Shift+C closes the result. See Large results. |
cannot run inside a transaction block (25001) | The script goes as one simple-protocol Query message, which the server runs as an implicit transaction block. Select the statement (VACUUM, CREATE DATABASE, CREATE INDEX CONCURRENTLY, …) alone and run it with Auto commit on — with it off pgtc sends BEGIN first. |
| A script failed in the middle | Nothing was changed, for the same reason — unless the script has its own COMMITs. |
current transaction is aborted (25P02) | Status row: Transaction aborted – ROLLBACK needed. ; makes pgtc send it. |
| The tree does not show a new object | The tree does not watch for DDL: Ctrl+R on the schema or group. |
| Autocomplete does not offer a new name | The tab's name cache is dropped only after DDL executed in that tab and after a tree refresh: refresh the tree. |
| Copy does not reach the local clipboard over SSH | It goes through the terminal as OSC 52, which the terminal must allow (iTerm2: Applications in terminal may access clipboard; tmux: set -g set-clipboard on), with OSC 52 clipboard on in Settings. Otherwise select with the terminal: Shift + drag. |
| Ctrl+V pastes something old over SSH | It reads the remote host's clipboard or pgtc's internal buffer. Use the terminal's paste (Ctrl+Shift+V, Shift+Insert, right click). |
| Selecting text with the mouse for the terminal's own copy | pgtc enables mouse reporting: hold Shift while dragging. |
| Where is the exported file? | On the host pgtc runs on (over SSH: the remote host); the export is written by pgtc, not by the server. |
| A SQL file is refused as not UTF-8 | Convert it: iconv -f WINDOWS-1250 -t UTF-8 old.sql > new.sql. |
| The profiler does not start | logging_collector must be on (needs a server restart). The role must be allowed to run ALTER SYSTEM, pg_reload_conf() and pg_read_binary_file(): a superuser, or pg_read_server_files plus the right to run ALTER SYSTEM — usually not available on managed services. See SQL profiler. |
| A question about logging settings on connect | pgtc ended while the profiler ran; the server still logs every statement. Yes restores the parameters. See If pgtc could not put the settings back. |
| The dashboard shows - or no query text for other sessions | The role is neither superuser nor member of pg_read_all_stats (pg_monitor). |
| Cancel or terminate is refused in the dashboard | pg_cancel_backend() / pg_terminate_backend() on other roles' backends need pg_signal_backend; on superusers' backends, a superuser. |
| Altering or dropping an object from a dialog | Not offered; pgtc generates DDL for review: Ctrl+E (Edit in new query tab), F7 (developer templates), F4 (generate commands). |
| Editing rows in the result grid | The grid is read-only; gtu table on F4 generates the UPDATE. |
| The SSH connection dropped while pgtc ran | pgtc ends when its terminal is gone; its sessions close, so open transactions are rolled back. |
| Moving the setup to another machine | settings.toml, keymap.toml, the themes and developer_templates folders (Files and folders), and .pgpass. |
The log file
Rotated daily (pgtc.2026-11-16.log), the last 7 kept, default level info:
| Platform | Log folder |
|---|---|
| Linux | ~/.local/share/pgtc/logs |
| macOS | ~/Library/Application Support/pgtc/logs |
| Windows | %APPDATA%\pgtc\logs |
PGTC_LOG=debug pgtc Linux, macOS
$env:PGTC_LOG="debug"; pgtc Windows PowerShell
PGTC_LOG=pgc_db=trace pgtc one crate only (the database layer)