Guest User

Untitled

a guest
Oct 5th, 2022
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.76 KB | None | 0 0
  1. supabase-db | 172.23.0.7 2022-10-05 12:41:10.282 UTC [52] postgres@postgres LOG: logical decoding found consistent point at 0/199BC50
  2. supabase-db | 172.23.0.7 2022-10-05 12:41:10.282 UTC [52] postgres@postgres DETAIL: There are no running transactions.
  3. supabase-db | 172.23.0.7 2022-10-05 12:41:10.282 UTC [52] postgres@postgres STATEMENT: with pub as (
  4. supabase-db | select
  5. supabase-db | concat_ws(
  6. supabase-db | ',',
  7. supabase-db | case when bool_or(pubinsert) then 'insert' else null end,
  8. supabase-db | case when bool_or(pubupdate) then 'update' else null end,
  9. supabase-db | case when bool_or(pubdelete) then 'delete' else null end
  10. supabase-db | ) as w2j_actions,
  11. supabase-db | coalesce(
  12. supabase-db | string_agg(
  13. supabase-db | realtime.quote_wal2json(format('%I.%I', schemaname, tablename)::regclass),
  14. supabase-db | ','
  15. supabase-db | ) filter (where ppt.tablename is not null),
  16. supabase-db | ''
  17. supabase-db | ) w2j_add_tables
  18. supabase-db | from
  19. supabase-db | pg_publication pp
  20. supabase-db | left join pg_publication_tables ppt
  21. supabase-db | on pp.pubname = ppt.pubname
  22. supabase-db | where
  23. supabase-db | pp.pubname = $1
  24. supabase-db | group by
  25. supabase-db | pp.pubname
  26. supabase-db | limit 1
  27. supabase-db | ),
  28. supabase-db | w2j as (
  29. supabase-db | select
  30. supabase-db | x.*, pub.w2j_add_tables
  31. supabase-db | from
  32. supabase-db | pub,
  33. supabase-db | pg_logical_slot_get_changes(
  34. supabase-db | $2, null, $3,
  35. supabase-db | 'include-pk', '1',
  36. supabase-db | 'include-transaction', 'false',
  37. supabase-db | 'include-timestamp', 'true',
  38. supabase-db | 'write-in-chunks', 'true',
  39. supabase-db | 'format-version', '2',
  40. supabase-db | 'actions', pub.w2j_actions,
  41. supabase-db | 'add-tables', pub.w2j_add_tables
  42. supabase-db | ) x
  43. supabase-db | )
  44. supabase-db | select
  45. supabase-db | xyz.wal,
  46. supabase-db | xyz.is_rls_enabled,
  47. supabase-db | xyz.subscription_ids,
  48. supabase-db | xyz.errors
  49. supabase-db | from
  50. supabase-db | w2j,
  51. supabase-db | realtime.apply_rls(
  52. supabase-db | wal := w2j.data::jsonb,
  53. supabase-db | max_record_bytes := $4
  54. supabase-db | ) xyz(wal, is_rls_enabled, subscription_ids, errors)
  55. supabase-db | where
  56. supabase-db | w2j.w2j_add_tables <> ''
  57. supabase-db | and xyz.subscription_ids[1] is not null
Advertisement
Add Comment
Please, Sign In to add comment