Skip to content

Sync fails with int4range type in PostgreSQL table #47

@JinoSanil

Description

@JinoSanil

Hey folks, I’m testing BemiDB in Docker to sync my PostgreSQL DB, but it crashes when it hits a table with an int4range column. Says the type isn’t supported, and the whole sync stops.

Got this error:
[INFO] Writing to Iceberg... Unexpected error: Unsupported PostgreSQL type: int4range goroutine 1 [running]: runtime/debug.Stack() /usr/local/go/src/runtime/debug/stack.go:26 +0x64 main.printUnexpectedError(0x37b2c60?, {0x28c3a60?, 0x40008aa470?}) /app/error_utils.go:44 +0x40 main.PanicIfError(0x37b2c60, {0x28c3a60, 0x40008aa470}) /app/error_utils.go:21 +0x44 main.Panic(...) /app/error_utils.go:28 main.(*PgSchemaColumn).parquetPrimitiveTypes(0x400004ae48) /app/pg_schema_column.go:377 +0x80c main.(*PgSchemaColumn).toParquetSchemaField(0x400004ae48) /app/pg_schema_column.go:182 +0x40 main.PgSchemaColumn.ToParquetSchemaFieldMap({{0x40008a6a60, 0x9}, {0x40008a6a70, 0x9}, {0x40008a6a80, 0x9}, {0x40008a6a6a, 0x2}, {0x275e483, 0x1}, ...}) /app/pg_schema_column.go:75 +0x28 main.(*StorageUtils).buildSchemaJson(0x4000076088, {0x40008ce008, 0xb, 0x53c500?}) /app/storage_utils.go:1249 +0x158 main.(*StorageUtils).WriteParquetFile(0x4000076088, {0x28d6f60, 0x4000892f78}, {0x40008ce008, 0xb, 0x0?}, 0x80000000, 0x4000792000) /app/storage_utils.go:550 +0x90 main.(*StorageLocal).CreateParquet(0x40008aa3a0, {0x40000e2220, 0x20}, {0x40008ce008, 0xb, 0x11}, 0x80000000, 0x4000792000) /app/storage_local.go:154 +0x244 main.(*IcebergWriterTable).Write(0x400004b990, 0x4000792000) /app/iceberg_writer_table.go:57 +0x2d4 main.(*SyncerTable).SyncPgTable(0x4000112d70, {{0x400017a300, 0x6}, {0x400017a369, 0x7}, {0x0, 0x0}}, 0x40003c06c0, 0x40003c0a20, {{0x0, ...}, ...}, ...) /app/syncer_table.go:85 +0x818 main.(*Syncer).SyncFromPostgres(0x4000147740) /app/syncer.go:79 +0x4a0 main.syncFromPg(0x37b2c60) /app/main.go:93 +0x24 main.main() /app/main.go:53 +0x1f0

Metadata

Metadata

Assignees

No one assigned

    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