]> granicus.if.org Git - postgresql/commit
Adjust datatype of ReplicationState.acquired_by.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 14 Apr 2016 16:18:09 +0000 (12:18 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 14 Apr 2016 16:18:09 +0000 (12:18 -0400)
commitce47112b6a91a39b0dd9295c046d31dd7ec50fb8
tree6f23edece14976fa60dc11cd33039d320dea236b
parentfb0f6393358519ec97623306bbfc6063426902fe
Adjust datatype of ReplicationState.acquired_by.

It was declared as "pid_t", which would be fine except that none of
the places that printed it in error messages took any thought for the
possibility that it's not equivalent to "int".  This leads to warnings
on some buildfarm members, and could possibly lead to actually wrong
error messages on those platforms.  There doesn't seem to be any very
good reason not to just make it "int"; it's only ever assigned from
MyProcPid, which is int.  If we want to cope with PIDs that are wider
than int, this is not the place to start.

Also, fix the comment, which seems to perhaps be a leftover from a time
when the field was only a bool?

Per buildfarm.  Back-patch to 9.5 which has same issue.
src/backend/replication/logical/origin.c