Re: log_hostname and pg_stat_activity

Alvaro Herrera <alvherre@commandprompt.com>

From: Alvaro Herrera <alvherre@commandprompt.com>
To: Steve Singer <ssinger_pg@sympatico.ca>
Cc: Peter Eisentraut <peter_e@gmx.net>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2011-01-19T01:07:28Z
Lists: pgsql-hackers
Excerpts from Steve Singer's message of mar ene 18 21:24:25 -0300 2011:

> Coding Review
> -------------
> 
> As Alvaro pointed out BackendStatusShmemSize should be updated.
> 
> To answer his question about why clientaddr works:  clientaddr is a 
> SockAddr which is a structure not a pointer so the data gets copied by 
> value to beentry.   That won't work for strings,  I have no issues with 
> how your allocating space in beentry and then strlcpy'ing the values.

Doh, of course.  Thanks.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support