Skip to content

Commit a212279

Browse files
authored
chore: Add missing changeset for generated columns feature (#3311)
Missing changeset for feature implemented in #3297
1 parent 59f6b14 commit a212279

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

.changeset/silent-windows-judge.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@core/sync-service': patch
3+
---
4+
5+
Support generated column replication in Postgres 18 with new `publish_generated_columns = stored` setting on publication.

packages/sync-service/test/electric/shape_cache_test.exs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -868,20 +868,26 @@ defmodule Electric.ShapeCacheTest do
868868
Support.TestUtils.patch_snapshotter(fn _, _, _, _ -> nil end)
869869
%{shape_cache_opts: opts} = with_shape_cache(ctx)
870870

871+
test_pid = self()
872+
871873
Repatch.patch(
872874
Electric.Shapes.DynamicConsumerSupervisor,
873875
:start_shape_consumer,
874876
[mode: :shared],
875-
fn _, _ -> Process.sleep(:infinity) end
877+
fn _, _ ->
878+
send(test_pid, :about_to_start_consumer)
879+
Process.sleep(:infinity)
880+
end
876881
)
877882

878883
Repatch.allow(self(), opts[:server])
879884

880885
start_supervised({Task, fn -> ShapeCache.get_or_create_shape_handle(@shape, opts) end})
881886

882-
Process.sleep(10)
883-
884-
{shape_handle, _} = ShapeCache.get_or_create_shape_handle(@shape, opts)
887+
{shape_handle, _} =
888+
receive do
889+
:about_to_start_consumer -> ShapeCache.get_or_create_shape_handle(@shape, opts)
890+
end
885891

886892
wait_task = Task.async(fn -> ShapeCache.await_snapshot_start(shape_handle, opts) end)
887893

0 commit comments

Comments
 (0)