Heikki Linnakangas <hlinnakan...@vmware.com> writes: > On 08/26/2014 05:13 AM, Tatsuo Ishii wrote: >> While looking into backend/storage/freespace/freespace.c, I noticed >> that struct FSMAddress is passed to functions by value, rather than >> reference.
> There isn't really any strict coding rule on that. We pass RelFileNode's > by value in many functions, for example. The only reason RelFileNodes work like that is that Robert blithely ignored the coding rule when he was revising things to pass those around. I've never been terribly happy about it, but it wasn't important enough to complain about. The cases where it *would* be important enough to complain about would be performance-critical code paths, which RelFileNode usages typically don't appear in (if you're messing with one you're most likely going to do a filesystem access). I'd be unhappy though if someone wanted to start passing ItemPointers by value. I doubt we can rely on C compilers to pass those as efficiently as they pass pointers. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers