The attached patch changes the type of chunk_seq to int32, rather than changing the %d formatting. The other changes are the same as in the previous patch.
Mark Dilger wrote: > I found a few places in the code where a variable of > type Oid is printed using "%d" rather than "%u" and > changed them in the attached patch. > > In src/backend/replication/logical/reorderbuffer.c, > circa line 2494, chunk_seq is of type Oid, but > ent->last_chunk_seq is of type int32, leading me > to question if perhaps the use of %d for chunk_seq > is correct, but the use of Oid for the type of chunk_seq > is in error. If neither is in error, perhaps someone > can provide a short code comment explaining the > logic of the signed/unsigned discrepancy.
tuptoaster defines chunk_seq as signed int32; ReorderBufferToastAppendChunk is wrong in declaring it Oid, and so this part of your patch is bogus. The others seem correct.