From: | Stephen Frost <sfrost(at)snowman(dot)net> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | pgsql-patches(at)postgresql(dot)org |
Subject: | Re: Add error-checking to timestamp_recv |
Date: | 2004-05-20 16:07:05 |
Message-ID: | 20040520160705.GX11196@ns.snowman.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
* Bruce Momjian (pgman(at)candle(dot)pha(dot)pa(dot)us) wrote:
> Considering all the other things the database is doing, I can't imagine
> that would be a measurable improvement.
It makes it easier on my client program too which is listening to an
ethernet interface and trying to process all of the packets coming in
off of it and putting timestamps and header information into the
database. The table in the database doesn't have any constraints or
primary keys on it or anything, pretty much as simple as I could make
it. :)
> > The one complaint I do have is that I don't see a way to pass a
> > timestamp w/ an explicit timezone in binary format into a table which
> > has a 'timestamp with timezone' field. I can pass a binary timestamp
> > into a 'timestamp with timezone' field, but it's interpreted as UTC or
> > the local timezone (can't remember which atm).
>
> I still do not understand how this is working. It must be using our
> fast path as part of prepare. What language is you client code?
It's just plain ol' C. It's a pretty short/simple program, really. It
uses libpcap to listen to the interface, checks the type of packet
(ethernet, IP, UDP/TCP, etc), copies the binary header values into the
structure which it then passes to PQexecPrepared. It's kind of amazing
under 2.6, you can actually calculate the delay and bandwidth pretty
accurately through a network (7 'backbone' nodes, each with a backbone
router, an edge router, and an access router, all in a lab) by listening
on two interfaces, one on each side to calculate one-way propagation
time.
Stephen
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-05-20 16:44:36 | Re: Add error-checking to timestamp_recv |
Previous Message | Bruce Momjian | 2004-05-20 15:59:09 | Re: Add error-checking to timestamp_recv |