# `Electric.Replication.PublicationManager.RelationTracker`
[🔗](https://github.com/electric-sql/electric/tree/%40core/sync-service%401.6.2/packages/sync-service/lib/electric/replication/publication_manager/relation_tracker.ex#L1)

Provides interface for shapes to register and deregister themselves
from a publication, and tracks the overall set of relations that need
to be published using reference counting.

Relies on Electric.Replication.PublicationManager.Configurator
to perform the actual publication updates and handles status updates
to reply to shapes requesting to be registered.

# `relation_filters`

```elixir
@type relation_filters() :: MapSet.t(Electric.oid_relation())
```

# `add_shape`

```elixir
@spec add_shape(stack_id(), shape_handle(), Electric.Shapes.Shape.t()) :: :ok
```

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `fetch_current_filters!`

```elixir
@spec fetch_current_filters!(Keyword.t()) :: relation_filters()
```

# `name`

# `notify_configuration_error`

```elixir
@spec notify_configuration_error(
  {:error, any()},
  Keyword.t()
) :: :ok
```

# `notify_publication_status`

```elixir
@spec notify_publication_status(
  Electric.Postgres.Configuration.publication_status(),
  Keyword.t()
) :: :ok
```

# `notify_relation_configuration_result`

```elixir
@spec notify_relation_configuration_result(
  Electric.oid_relation(),
  {:ok, term()} | {:error, any()},
  Keyword.t()
) :: :ok
```

# `remove_shape`

```elixir
@spec remove_shape(stack_id(), shape_handle()) :: :ok
```

# `start_link`

# `wait_for_restore`

```elixir
@spec wait_for_restore(stack_id(), Keyword.t()) :: :ok
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
