Skip to content

Instantly share code, notes, and snippets.

@jay-babu
Created September 24, 2025 16:42
Show Gist options
  • Select an option

  • Save jay-babu/e2b2efc4d900b4e9c22dccbe5b93ec95 to your computer and use it in GitHub Desktop.

Select an option

Save jay-babu/e2b2efc4d900b4e9c22dccbe5b93ec95 to your computer and use it in GitHub Desktop.
State: {:no_state, %Postgrex.ReplicationConnection{protocol: %Postgrex.Protocol{sock: {:ssl, {:sslsocket, #Port<0.2107>, #PID<0.7639.0>, #PID<0.7638.0>, :gen_tcp, :tls_gen_connection, #Reference<0.3647976500.65929220.105144>, :undefined}}, connection_id: 48168, connection_key: 2147115721, peer: {{98, 84, 63, 156}, 5432}, types: {Postgrex.DefaultTypes, #Reference<0.3647976500.65667075.166132>}, null: nil, timeout: 15000, ping_timeout: 15000, parameters: #Reference<0.3647976500.65798147.190519>, queries: #Reference<0.3647976500.65929219.190515>, postgres: :idle, transactions: :naive, buffer: :active_once, disconnect_on_error_codes: [], scram: %{iterations: 4096, auth_message: "n=,r=MdyAFNSMDftO3lIaqTmpphHU,r=MdyAFNSMDftO3lIaqTmpphHU/qxlrdH8F1ZRLVu6EDhuq4GS,s=xhC8KreahQLY8lgigi3bjQ==,i=4096,c=biws,r=MdyAFNSMDftO3lIaqTmpphHU/qxlrdH8F1ZRLVu6EDhuq4GS", salt: <<198, 16, 188, 42, 183, 154, 133, 2, 216, 242, 88, 34, 130, 45, 219, 141>>}, disable_composite_types: false, messages: []}, state: {Electric.Postgres.ReplicationClient, %Electric.Postgres.ReplicationClient.State{stack_id: "single_stack", connection_manager: #PID<0.7626.0>, transaction_received: {Electric.Replication.ShapeLogCollector, :store_transaction, [{:via, Registry, {:"Electric.ProcessRegistry:single_stack", {Electric.Replication.ShapeLogCollector, nil}}}]}, relation_received: {Electric.Replication.ShapeLogCollector, :handle_relation_msg, [{:via, Registry, {:"Electric.ProcessRegistry:single_stack", {Electric.Replication.ShapeLogCollector, nil}}}]}, publication_name: "electric_publication_zeus", try_creating_publication?: true, recreate_slot?: nil, start_streaming?: false, slot_name: "electric_slot_zeus", slot_temporary?: false, display_settings: [], txn_collector: %Electric.Postgres.ReplicationClient.Collector{transaction: %Electric.Replication.Changes.Transaction{xid: 164027015, commit_timestamp: ~U[2025-09-22 17:05:32.085853Z], lsn: #Lsn<BE/47588F1A>, last_log_offset: nil, changes: [%Electric.Replication.Changes.UpdatedRecord{relation: {"public", "entity_item"}, old_record: %{"aisle_location" => nil, "average_cost" => "0.0000", "case_cost" => nil, "changed_by" => nil, "cohort_item_id" => "4080273", "cohort_item_vintage_id" => nil, "cost" => "9.00", "created_at" => "2025-02-06 22:24:02.175382+00", "discount_allowed" => "t", "entity_id" => "76", "exclusive" => "f", "fridge_location" => nil, "id" => "3372765", "item_type_id" => nil, "last_cohort_vendor_id" => nil, "last_order_date" => nil, "last_quantity_received" => nil, "migration_id" => "46521_level_1", "minimum_price" => "9.79", "preferred_cohort_vendor_id" => "68211", "price" => "13.99", "quantity" => "0.0000", "sellable" => "t", ...}, record: %{"aisle_location" => nil, "average_cost" => "0.0000", "case_cost" => nil, "changed_by" => nil, "cohort_item_id" => "4080273", "cohort_item_vintage_id" => nil, "cost" => "9.00", "created_at" => "2025-02-06 22:24:02.175382+00", "discount_allowed" => "t", "entity_id" => "76", "exclusive" => "f", "fridge_location" => nil, "id" => "3372765", "item_type_id" => "1", "last_cohort_vendor_id" => nil, "last_order_date" => nil, "last_quantity_received" => nil, "migration_id" => "46521_level_1", "minimum_price" => "9.79", "preferred_cohort_vendor_id" => "68211", "price" => "13.99", "quantity" => "0.0000", ...}, log_offset: LogOffset.new(817240772378, 2257978), key: nil, old_key: nil, tags: [], changed_columns: MapSet.new(["item_type_id"]), last?: false}, %Electric.Replication.Changes.UpdatedRecord{relation: {"public", "entity_item"}, old_record: %{"aisle_location" => nil, "average_cost" => "75.0000", "case_cost" => nil, "changed_by" => nil, "cohort_item_id" => "4080272", "cohort_item_vintage_id" => nil, "cost" => "12.52", "created_at" => "2025-02-10 23:16:02.396351+00", "discount_allowed" => "t", "entity_id" => "77", "exclusive" => "f", "fridge_location" => nil, "id" => "3593735", "item_type_id" => nil, "last_cohort_vendor_id" => nil, "last_order_date" => nil, "last_quantity_received" => nil, "migration_id" => "46520_level_1", "minimum_price" => "11.89", "preferred_cohort_vendor_id" => "68230", "price" => "16.99", "quantity" => "0.0000", ...}, record: %{"aisle_location" => nil, "average_cost" => "75.0000", "case_cost" => nil, "changed_by" => nil, "cohort_item_id" => "4080272", "cohort_item_vintage_id" => nil, "cost" => "12.52", "created_at" => "2025-02-10 23:16:02.396351+00", "discount_allowed" => "t", "entity_id" => "77", "exclusive" => "f", "fridge_location" => nil, "id" => "3593735", "item_type_id" => "1", "last_cohort_vendor_id" => nil, "last_order_date" => nil, "last_quantity_received" => nil, "migration_id" => "46520_level_1", "minimum_price" => "11.89", "preferred_cohort_vendor_id" => "68230", "price" => "16.99", ...}, log_offset: LogOffset.new(817240772378, 2257976), key: nil, old_key: nil, tags: [], changed_columns: MapSet.new(["item_type_id"]), last?: false}, %Electric.Replication.Changes.UpdatedRecord{relation: {"public", "entity_item"}, old_record: %{"aisle_location" => nil, "average_cost" => "75.0000", "case_cost" => nil, "changed_by" => nil, "cohort_item_id" => "4080272", "cohort_item_vintage_id" => nil, "cost" => "12.52", "created_at" => "2025-02-10 23:12:01.380227+00", "discount_allowed" => "t", "entity_id" => "79", "exclusive" => "f", "fridge_location" => nil, "id" => "3549420", "item_type_id" => nil, "last_cohort_vendor_id" => nil, "last_order_date" => nil, "last_quantity_received" => nil, "migration_id" => "46520_level_1", "minimum_price" => "11.89", "preferred_cohort_vendor_id" => "68230", "price" => "16.99", ...}, record: %{"aisle_location" => nil, "average_cost" => "75.0000", "case_cost" => nil, "changed_by" => nil, "cohort_item_id" => "4080272", "cohort_item_vintage_id" => nil, "cost" => "12.52", "created_at" => "2025-02-10 23:12:01.380227+00", "discount_allowed" => "t", "entity_id" => "79", "exclusive" => "f", "fridge_location" => nil, "id" => "3549420", "item_type_id" => "1", "last_cohort_vendor_id" => nil, "last_order_date" => nil, "last_quantity_received" => nil, "migration_id" => "46520_level_1", "minimum_price" => "11.89", "preferred_cohort_vendor_id" => "68230", ...}, log_offset: LogOffset.new(817240772378, 2257974), key: nil, old_key: nil, tags: [], changed_columns: MapSet.new(["item_type_id"]), last?: false}, %Electric.Replication.Changes.UpdatedRecord{relation: {"public", "entity_item"}, old_record: %{"aisle_location" => nil, "average_cost" => "75.0000", "case_cost" => nil, "changed_by" => nil, "cohort_item_id" => "4080272", "cohort_item_vintage_id" => nil, "cost" => "12.52", "created_at" => "2025-02-10 18:22:02.260064+00", "discount_allowed" => "t", "entity_id" => "78", "exclusive" => "f", "fridge_location" => nil, "id" => "3417006", "item_type_id" => nil, "last_cohort_vendor_id" => nil, "last_order_date" => nil, "last_quantity_received" => nil, "migration_id" => "46520_level_1", "minimum_price" => "11.89", "preferred_cohort_vendor_id" => "68230", ...}, record: %{"aisle_location" => nil, "average_cost" => "75.0000", "case_cost" => nil, "changed_by" => nil, "cohort_item_id" => "4080272", "cohort_item_vintage_id" => nil, "cost" => "12.52", "created_at" => "2025-02-10 18:22:02.260064+00", "discount_allowed" => "t", "entity_id" => "78", "exclusive" => "f", "fridge_location" => nil, "id" => "34 (truncated)

16:35:40.870 pid=<0.8149.0> request_id=GGhFLpDA1bWDVzgAAZYh [debug] Sent 200 in 20083ms

16:35:40.879 pid=<0.7626.0> [warning] Collected transaction exceeds limit of 262144000 bytes.

16:35:40.883 pid=<0.7626.0> [error] Failed to execute query: SELECT pg_drop_replication_slot('electric_slot_zeus');
Error: %Postgrex.Error{message: nil, postgres: %{code: :object_not_in_prerequisite_state, line: "1274", message: "replication slots cannot be used on RO (Read Only) node", file: "slot.c", unknown: "ERROR", severity: "ERROR", pg_code: "55000", routine: "CheckSlotRequirements"}, connection_id: 35384, query: nil}

16:35:40.885 pid=<0.7626.0> [error] Failed to execute query: DROP PUBLICATION electric_publication_zeus
Error: %Postgrex.Error{message: nil, postgres: %{code: :read_only_sql_transaction, line: "421", message: "cannot execute DROP PUBLICATION in a read-only transaction", file: "utility.c", unknown: "ERROR", severity: "ERROR", pg_code: "25006", routine: "PreventCommandIfReadOnly"}, connection_id: 35385, query: nil}

16:35:40.907 pid=<0.7626.0> [debug] [SET] /app/persistent/state/timeline_id_single_stack

16:35:40.907 pid=<0.7626.0> [debug] Terminating connection manager with reason {:shutdown, :exceeded_max_tx_size}.

16:35:40.908 pid=<0.8002.0> shape_handle=7998984-1758731413303508 [debug] Shapes.Consumer terminating with reason: :shutdown

16:35:40.909 pid=<0.8088.0> shape_handle=59684434-1758731423140407 [debug] Shapes.Consumer terminating with reason: :shutdown

16:35:40.908 pid=<0.8041.0> shape_handle=48553733-1758731422750472 [debug] Shapes.Consumer terminating with reason: :shutdown

16:35:40.908 pid=<0.8044.0> shape_handle=72376935-1758731422751824 [debug] Shapes.Consumer terminating with reason: :shutdown

16:35:40.908 pid=<0.8016.0> shape_handle=83904285-1758731422730120 [debug] Shapes.Consumer terminating with reason: :shutdown

16:35:40.908 pid=<0.8119.0> shape_handle=20819592-1758731426322698 [debug] Shapes.Consumer terminating with reason: :shutdown

16:35:40.908 pid=<0.8047.0> shape_handle=94078510-1758731422754587 [debug] Shapes.Consumer terminating with reason: :shutdown

16:35:40.908 pid=<0.8122.0> shape_handle=19977896-1758731426781617 [debug] Shapes.Consumer terminating with reason: :shutdown

16:35:40.908 pid=<0.8022.0> shape_handle=42638648-1758731422738904 [debug] Shapes.Consumer terminating with reason: :shutdown

16:35:40.908 pid=<0.8051.0> shape_handle=66125077-1758731423070896 [debug] Shapes.Consumer terminating with reason: :shutdown

16:35:40.908 pid=<0.8025.0> shape_handle=65808904-1758731422743379 [debug] Shapes.Consumer terminating with reason: :shutdown

16:35:40.908 pid=<0.8116.0> shape_handle=61289925-1758731425509267 [debug] Shapes.Consumer terminating with reason: :shutdown

16:35:40.909 pid=<0.8054.0> shape_handle=71276302-1758731423078604 [debug] Shapes.Consumer terminating with reason: :shutdown

16:35:40.908 pid=<0.8057.0> shape_handle=126883233-1758731423079312 [debug] Shapes.Consumer terminating with reason: :shutdown

16:35:40.908 pid=<0.8148.0> shape_handle=46707298-1758731428980920 [debug] Shapes.Consumer terminating with reason: :shutdown

16:35:40.909 pid=<0.8060.0> shape_handle=10739529-1758731423084690 [debug] Shapes.Consumer terminating with reason: :shutdown

16:35:40.909 pid=<0.8067.0> shape_handle=79731417-1758731423087098 [debug] Shapes.Consumer terminating with reason: :shutdown

16:35:40.908 pid=<0.8019.0> shape_handle=68619131-1758731422733352 [debug] Shapes.Consumer terminating with reason: :shutdown

16:35:40.908 pid=<0.8030.0> shape_handle=23631070-1758731422744048 [debug] Shapes.Consumer terminating with reason: :shutdown

16:35:40.909 pid=<0.8082.0> shape_handle=103032519-1758731423137282 [debug] Shapes.Consumer terminating with reason: :shutdown

16:35:40.908 pid=<0.8070.0> shape_handle=39702958-1758731423090596 [debug] Shapes.Consumer terminating with reason: :shutdown

16:35:40.908 pid=<0.8034.0> shape_handle=115951313-1758731422748390 [debug] Shapes.Consumer terminating with reason: :shutdown

16:35:40.909 pid=<0.8085.0> shape_handle=30754064-1758731423139376 [debug] Shapes.Consumer terminating with reason: :shutdown

16:35:40.908 pid=<0.8073.0> shape_handle=9098341-1758731423091648 [debug] Shapes.Consumer terminating with reason: :shutdown

16:35:40.909 pid=<0.8076.0> shape_handle=9641295-1758731423092307 [debug] Shapes.Consumer terminating with reason: :shutdown

16:35:40.909 pid=<0.7858.0> [debug] 26 consumers of replication stream

16:35:40.909 pid=<0.8079.0> shape_handle=6977357-1758731423094701 [debug] Shapes.Consumer terminating with reason: :shutdown

16:35:40.909 pid=<0.8037.0> shape_handle=124458102-1758731422749318 [debug] Shapes.Consumer terminating with reason: :shutdown

16:35:40.911 pid=<0.7858.0> [debug] 25 consumers of replication stream

16:35:40.911 pid=<0.7858.0> [debug] 24 consumers of replication stream

16:35:40.911 pid=<0.7858.0> [debug] 23 consumers of replication stream

16:35:40.911 pid=<0.7858.0> [debug] 22 consumers of replication stream

16:35:40.912 pid=<0.7858.0> [debug] 21 consumers of replication stream

16:35:40.912 pid=<0.7855.0> [info] Terminating shape status owner, backing up state for faster recovery.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment