<@U04S8PLJWMT> how to fix `Warning from destinatio...
# replication-ask-ai
a
@kapa.ai how to fix
Warning from destination: sourceStats must be set with recordCount for state message id=1
my postgres source is v3.7.2 and postgres destination is v3.0.7
k
New message text here
a
@kapa.ai i tried to reset the conection and do a full refresh, still issue persists. What do i do?
k
The knowledge sources don’t describe this specific warning for the standard Postgres source 3.7.2 → Postgres destination 3.0.7, so I can’t give a confirmed product-side fix. They only tell us: • Destinations now expect every state message to include
sourceStats
with a
recordCount
. If it’s missing, you get errors/warnings. [ClickHouse state bug] • This is enforced in the worker code that reads state messages. [Custom connector state] Given that, and that resetting the connection + full refresh didn’t help, the next concrete steps are: 1. Confirm whether your source is customized ◦ If you have any custom wrapper/modified Postgres source, you must update it so that every emitted state message sets
sourceStats.recordCount
(the number of records associated with that state). Missing
sourceStats
is exactly what triggers this kind of error in other destinations. [ClickHouse state bug] 1. If you are using the stock
source-postgres:3.7.2
with no changes
The docs and issues provided do not mention a known
sourceStats
bug for this version, so this may be an unreported edge case. In that case, the only reliable path based on the available information is to: ◦ Collect: ▪︎ Full job logs for a failing sync. ▪︎ A sample of the state messages from the logs (look for
type=state
messages and show their JSON). ▪︎ Exact versions: Airbyte platform version,
source-postgres:3.7.2
,
destination-postgres:3.0.7
. ◦ Open a GitHub issue against
source-postgres
or
destination-postgres
, or share these details on the forum, so the team can inspect why
sourceStats
is missing or rejected. Because the knowledge sources don’t document any config toggle or version combination that resolves this specific warning for Postgres→Postgres, I can’t suggest a guaranteed in-place fix beyond verifying custom code and escalating with logs. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
a
@kapa.ai i'm using standard postgres connectors
k
The knowledge sources don’t mention this
sourceStats must be set with recordCount for state message
warning specifically for the standard Postgres source 3.7.2 → Postgres destination 3.0.7, so I can’t point to a documented, guaranteed fix. I’ll outline what is known and what you can concretely do next. What we know from the docs/issues: • Destinations built on the newer CDK expect every state message to include a
sourceStats
object with a
recordCount
. If it’s missing, the destination can error or warn. [ClickHouse state issue] • In that ClickHouse case, the problem was that the source wasn’t populating
sourceStats
, and the destination threw a
NullPointerException
. [ClickHouse state issue] • There is no mention in the provided sources of a known bug in
source-postgres
3.7.2 or
destination-postgres
3.0.7 around
sourceStats
. Because you’re on the stock connectors and a reset + full refresh didn’t help, this looks like either: • An edge-case bug in the Postgres source’s state emission, or • A bug in how the Postgres destination validates/uses state. Given the limits of the docs, the best actionable steps are: 1. *Capture and inspect the state messages from logs*This is exactly how a similar issue was diagnosed for ClickHouse: by seeing that
sourceStats
was missing in the state. [ClickHouse state issue] ◦ Run a sync that produces the warning. ◦ In the job logs, search for lines containing
STATE
or
type: STATE
(or JSON with
"type": "STATE"
). ◦ Check whether those state messages actually contain a
sourceStats
field and a non-null
recordCount
. 1. *If
sourceStats
is missing or
recordCount
is null/0 in all states*With standard connectors, that would indicate a product bug not covered in the current knowledge sources. In that case, you’ll need to escalate:The ClickHouse issue shows that the team treats missing
sourceStats
as a connector bug and fixes it at the connector level. [ClickHouse state issue] ◦ Open a GitHub issue against
destination-postgres
(and optionally
source-postgres
) including: ▪︎ Airbyte platform version ▪︎ Source:
source-postgres:3.7.2
▪︎ Destination:
destination-postgres:3.0.7
▪︎ The exact warning text ▪︎ A redacted sample of one or two state messages from the logs (showing missing/incorrect
sourceStats
) 1. *If
sourceStats.recordCount
is present and looks correct*Then the warning is likely coming from the destination’s validation logic despite valid data, which again points to a bug not documented in the sources you provided. The same escalation path applies: open an issue with logs and example state messages so engineering can reproduce. Because the current knowledge sources don’t document this warning for Postgres 3.7.2 → 3.0.7, I can’t recommend a specific version downgrade/upgrade combo or config toggle as a known fix. The only reliable path, based on what we have, is to: • Confirm the actual content of the state messages in your logs, and • File an issue with those details so the team can patch the connector(s). 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.