Skip to content

[Postgres] box[] values are not parsed correctly on initial replication #405

@rkistner

Description

@rkistner

#403 fixed parsing of some custom types during initial replication. However, the box[] type still replicates incorrectly.

For this input type:

ARRAY[box(point '(1,2)', point '(3,4)'), box(point '(5, 6)', point '(7,8)')]

Streaming replication works correctly:

["(3,4),(1,2)","(7,8),(5,6)"]

But initial replication gives this:

["(3","4)","(1","2);(7","8)","(5","6)"]

The issue is that by the time we get to the custom decoding here, the incorrect array decoding was already performed:

const record = this.syncRulesRecord(this.connections.types.constructRowRecord(columnMap, inputRecord));

I'm not sure what the best place is to fix this, but since it's a fairly niche edge case, we can wait for @simolus3 to take a look.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions