On Thu, Feb 10, 2011 at 10:40 AM, Steve Singer <ssinger...@sympatico.ca> wrote: > On 11-02-10 10:32 AM, Robert Haas wrote: >> I was assuming those changes were sufficiently trivial that they could >> be made at commit-time, especially if Peter is committing it himself. >> Of course if he'd like a re-review, he can always post an updated >> patch, but I just thought that was overly pedantic in this particular >> case. > > Sounds reasonable.
I rebased this patch, wrote documentation, and fixed BackendStatusShmemSize. PFA. On further review, I'm inclined to go with Peter's original approach to displaying the hostname: show it if we have it, and don't if we don't. It's not that hard to document the relevant criteria, and it seems silly to suppress the information if we have it. I had a thought of declaring st_clienthostname as char st_clienthostname[NAMEDATALEN] rather than char *st_clienthostname. That would simplify the initialization code. But I believe that the protocol used for updating this data structure is unsafe unless the whole thing fits into a single cache line. I'm not positive that's going to be true on every architecture even as things stand. On my Mac, with this patch, it's 208 bytes (which means that it's presumably 200 without the patch, and that it would be 264 with the alternate approach proposed above). According to that font of knowledge, Wikipedia, the size of a cache line can vary from 8 to 512 bytes [citation needed]. -- 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