SQLStreams

the messaging platform that is just Postgres

You last visited on 9999-99-99 Show what's new since then
[SOLVED]

stream still holds messages [SQL0006]

Edit this page
code SQL0006 · recovery permanent — an unchanged retry cannot succeed; retry machinery stops immediately
the log line · Report this thread
SQL0006 Permanent error

As it arrives in your log or error chain — example values stand where yours will:

stream still holds messages: schema "sqlstreams", stream_id 1 -- pass DestroyOptions.Force to destroy them with the stream [SQL0006]
ACCEPTED ANSWER Posted: 2026-09-09
brandon Site Admin brandon profile Posts: 677

pass DestroyOptions.Force to destroy them with the stream

brandon Site Admin brandon profile Posts: 677

Helpful info.

  1. how many messages the destroy would discard

    SELECT count(*) AS message_count FROM {schema}.message_log_{stream_id};
  2. the newest of them, to judge whether the stream is still in use

    SELECT
    	id,
    	routing_key,
    	created_at
    FROM {schema}.message_log_{stream_id}
    ORDER BY id DESC
    LIMIT 20;
Nothing pasted yet — the queries above show their blanks.

Looking for a different code? Search every thread.