Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ data:
connectorSubtype: database
connectorType: destination
definitionId: 25c5221d-dce2-4163-ade9-739ef790f503
dockerImageTag: 3.0.15
dockerImageTag: 3.0.16
dockerRepository: airbyte/destination-postgres
documentationUrl: https://docs.airbyte.com/integrations/destinations/postgres
githubIssueLabel: destination-postgres
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class PostgresInsertBuffer(
"Finished insert of $recordCount row(s) into ${tableName.namespace}.${tableName.name}"
}
} catch (e: Exception) {
logger.error(e) { "Unable to flush accumulated data." }
throw e
} finally {
filePath.deleteIfExists()
csvPrinter?.close()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ class PostgresRawRecordFormatter(
// Do not output null values in the JSON raw output
val filteredRecord =
record.filter { (k, v) -> v !is NullValue && !RAW_META_COLUMNS.contains(k) }
val jsonData = Jsons.writeValueAsString(filteredRecord)
// Sanitize null bytes from JSON data — PostgreSQL TEXT columns do not support \u0000
val jsonData = Jsons.writeValueAsString(filteredRecord).replace("\u0000", "")

// Iterate through columns in the exact order they appear in the table
columns.forEach { column ->
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/destinations/postgres.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ This destination supports [namespaces](https://docs.airbyte.com/platform/using-a

| Version | Date | Pull Request | Subject |
|:--------|:-----------|:-----------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 3.0.16 | 2026-03-31 | [75902](https://github.com/airbytehq/airbyte/pull/75902) | Fix silent error swallowing in COPY flush and sanitize null bytes in raw JSON data |
| 3.0.15 | 2026-08-07 | [83235](https://github.com/airbytehq/airbyte/pull/83235) | Fail sync on transient DB errors. |
| 3.0.14 | 2026-07-30 | [82273](https://github.com/airbytehq/airbyte/pull/82273) | Remove column DROP logic during schema evolution; upgrade CDK to 1.0.20 |
| 3.0.13 | 2026-04-17 | [76409](https://github.com/airbytehq/airbyte/pull/76409) | Upgrade CDK to 1.0.9. |
Expand Down
Loading