|From:||Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>|
|Subject:||Re: tab-completion debug print|
|Views:||Raw Message | Whole Thread | Download mbox|
At Wed, 28 Nov 2018 17:28:39 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> wrote in <20181128(dot)172839(dot)242071562(dot)horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
> I'm not sure how much it is wanted but it's easy to do. Using
> psql variable doesn't seem to make sense since the debug print
> (currently) requires session log file, which can be turned on
> only at the startup time. '-g' option is available by 0003.
> $ psql -gL ~/psql.log postgres
> > Can we conceive of a circumstance where the check for -L/\L would be
> > significant? I've seen people type pretty quickly, but not thus far
> > fast enough to notice a cache miss.
> We could switch completion_matches body as necessity using
> function poniter, but we aren't so eager for speed here. It is at
> most called every time entering tab.
So, the new version v6 patch consists of the following two files:
Full-context version. Activated by -DTABCOMPLETION_DEBUG at
compile time and always emit logs into session log file
specified -L. The format of a line looks like below.
> tab-complete.c:1870: (...table t1 alter [CO]) -> ("CO", "COLUMN", "CONSTRAINT")
Applies on top of 0001. Code is always active, -g addition to
-L activates debug print into the log file. If only -g is
specified it is forcibly turned off.
> $ psql postgres -g
> psql: no session log file, turn off debug print
> psql (12devel)
> Type "help" for help.
-g option shows in help message. (perhaps arguable.)
I'll register this to the next CF.
NTT Open Source Software Center
|Next Message||Alexander Korotkov||2018-12-13 12:03:54||Re: Connections hang indefinitely while taking a gin index's LWLock buffer_content lock|
|Previous Message||Sergei Kornilov||2018-12-13 10:51:48||Re: allow online change primary_conninfo|