electric icon indicating copy to clipboard operation
electric copied to clipboard

Feature request: Support reads to existing shapes even when connection to Postgres is lost

Open robacourt opened this issue 9 months ago • 4 comments

We could read existing shapes even when connection to Postgres is lost as we just need to read from disk. Currently it's not supported.

robacourt avatar Apr 10 '25 14:04 robacourt

Since #2576 reads to existing shapes will be held until Postgres connectivity is reestablished. Before that, the reads would have errored with "the table identifier does not refer to an existing ETS table" due to the LsnTracker ets table not being available as the ShapeLogCollector is torn down with the other replication processes.

robacourt avatar Apr 10 '25 14:04 robacourt

What would be a good semantic for live requests? They are not really live.

balegas avatar Apr 10 '25 14:04 balegas

Potenitally "live" requests still get held for 20sec and return an "up-to-date" but also mark whether replication is active so the client can decide what to do?

msfstef avatar Apr 10 '25 15:04 msfstef

we can have up-to-date and replication sate, or a new control-message. up-to-date is not really the most accurate name.

Alternatively, we can reject the live requests and give a proper status code, so that clients fall back to non-live requests.

balegas avatar Apr 10 '25 15:04 balegas

Closing this as we have opened plenty of tasks to work towards this goal

msfstef avatar Sep 07 '25 15:09 msfstef