On Sun, Jan 11, 2015 at 6:09 AM, Stephen Frost <sfr...@snowman.net> wrote: > I think what Robert's getting at here is that pq_redirect_to_shm_mq() > might be fine for the normal data heading back, but we need something > separate for errors and notices. Switching everything back and forth > between the normal and error queues definitely doesn't sound right to > me- they need to be independent.
You've got that backwards. pq_redirect_to_shm_mq() handles errors and notices, but we need something separate for the tuple stream. > In other words, you need to be able to register a "normal data" queue > and then you need to also register a "error/notice" queue and have > errors and notices sent there directly. Going off of what I recall, > can't this be done by having the callbacks which are registered for > sending data back look at what they're being asked to send and then > decide which queue it's appropriate for out of the set which have been > registered so far? It's pretty simple, really. The functions that need to use the tuple queue are in printtup.c; those, and only those, need to be modified to write to the other queue. Or, possibly, we should pass the tuples around in their native format instead of translating them into binary form and then reconstituting them on the other end. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers