* Larry Rosenman <ler@lerctr.org> [001122 15:03]:
> Just playing with the syslog functionality on 7.1devel, and the
> explain output looks weird to me:
>
> Nov 22 14:58:44 lerami pg-test[4005]: [2] DEBUG: MoveOfflineLogs:
> skip 0000000000000006
> Nov 22 14:58:44 lerami pg-test[4005]: [3] DEBUG: MoveOfflineLogs:
> skip 0000000000000005
> Nov 22 14:59:09 lerami pg-test[4005]: [4] NOTICE: QUERY PLAN:
> Nov 22 14:59:0 lerami Nov 22 14:59:09Index Scan using upslog_index on
> upslog (cost=0.00..88.65 rows=165 width=28)
>
> seems like it should be better.
>
> The output at the client looks fine:
> ler=# explain select * from upslog where upslogdate >='2000-11-01';
> NOTICE: QUERY PLAN:
>
> Index Scan using upslog_index on upslog (cost=0.00..88.65 rows=165
> width=28)
>
> EXPLAIN
> ler=#
And here is a fix. What appears to piss off my syslogd is the no
character lines. So, I added spaces to the output. The new client
output looks like:
ler=# explain select * from upslog where upslogdate>='2000-11-01';
NOTICE: QUERY PLAN:Index Scan using upslog_index on upslog (cost=0.00..88.65 rows=165
width=28)
EXPLAIN
ler=# \q
$
and the syslog looks like:
Nov 22 15:22:56 lerami pg-test[8299]: [2] NOTICE: QUERY PLAN:
Nov 22 15:22:56 lerami
Nov 22 15:22:56 lerami Index Scan using upslog_index on upslog
(cost=0.00..88.65 rows=165 width=28)
And the patch is:
Index: src/backend/commands/explain.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/commands/explain.c,v
retrieving revision 1.62
diff -c -r1.62 explain.c
*** src/backend/commands/explain.c 2000/11/12 00:36:56 1.62
--- src/backend/commands/explain.c 2000/11/22 21:16:47
***************
*** 120,126 **** s = Explain_PlanToString(plan, es); if (s) {
! elog(NOTICE, "QUERY PLAN:\n\n%s", s); pfree(s); } }
--- 120,126 ---- s = Explain_PlanToString(plan, es); if (s) {
! elog(NOTICE, "QUERY PLAN:\n \n %s", s); pfree(s); } }
--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 (voice) Internet: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749