Re: WIP CSV logs
Andrew Dunstan wrote:
Here is a WIP patch of the CSV logs work brought up to date with CVS
HEAD. One large change I made was to multiplex the selects on the
pipes - previously it waited on one then the other - this seems almost
to defeat the purpose of using select() :-)It seems to work well on Unix - I will test later on Windows, which
I'm slightly worried about.I also want to get an id for non-session processes. I think this can
just be start-time+pid, just like for session processes, but we'll
need to stash it somewhere (just for those cases). If we do that we
will be able to set a primary key on the log table when we read the
data in, which Greg Smith was worried about.I hope to get this polished off in the next 15 hours or so - after
that I'm away for 12 days.
Here is a slightly updated version. It compiles on Windows, but it
doesn't work - the CSV log file gets created but doesn't get any
content. Dave, Magnus - can you see what I've done wrong? The strange
thing is that I tried to do exactly the same thing for CSV as for
stderr, and the stderr file gets content just fine.
cheers
andrew
Attachments:
csvlog-5.patchtext/x-patch; name=csvlog-5.patchDownload+891-411
Import Notes
Reply to msg id not found: 46843BAF.40109@dunslane.netReference msg id not found: 46843BAF.40109@dunslane.net
Andrew Dunstan wrote:
Andrew Dunstan wrote:
Here is a WIP patch of the CSV logs work brought up to date with CVS
HEAD. One large change I made was to multiplex the selects on the
pipes - previously it waited on one then the other - this seems
almost to defeat the purpose of using select() :-)It seems to work well on Unix - I will test later on Windows, which
I'm slightly worried about.I also want to get an id for non-session processes. I think this can
just be start-time+pid, just like for session processes, but we'll
need to stash it somewhere (just for those cases). If we do that we
will be able to set a primary key on the log table when we read the
data in, which Greg Smith was worried about.I hope to get this polished off in the next 15 hours or so - after
that I'm away for 12 days.Here is a slightly updated version. It compiles on Windows, but it
doesn't work - the CSV log file gets created but doesn't get any
content. Dave, Magnus - can you see what I've done wrong? The strange
thing is that I tried to do exactly the same thing for CSV as for
stderr, and the stderr file gets content just fine.
Further update attached. Includes some code cleanup, and now sets up a
session-id for all processes, including postmaster, syslogger etc, so we
can make a primary key on the log table of (session_id, line_number).
TODOs: fix on Windows, docs.
cheers
andrew
Attachments:
csvlog-6.patchtext/x-patch; name=csvlog-6.patchDownload+870-406
Andrew Dunstan wrote:
Further update attached. Includes some code cleanup, and now sets up a
session-id for all processes, including postmaster, syslogger etc, so we
can make a primary key on the log table of (session_id, line_number).TODOs: fix on Windows, docs.
I'm not going to be able to look at this before Monday I'm afraid. Not
sure if Magnus has more time before then.
Regards, Dave.