> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PostgreSQL logical replication source

> Apply transaction-bounded changes from a dedicated PostgreSQL publication and logical slot.

Pass `postgresLogical({ endpoint: "inventory.example:5432", … })` with its receiver block: `label`, `credential: login`, `requests: { retain, message }`, a reviewed `isolation` statement and a retention budget `hold` (bytes such as `"8GiB"`, or an age). At the budget the source releases its log (`onHold: "release"`), which is a gap. Use it as `provider` in the [SQL mount example](https://docs.bijection.com/integrations/native-sql.md#mount-and-bind).
Use a fresh mount with one PostgreSQL 17 or later primary. A mount can
use public or [protected data](https://docs.bijection.com/integrations/native-connectors.md#installer-bound-labels).

Provision a dedicated permanent `pgoutput` slot and a publication for one
ordinary unpartitioned table. Use the default replica identity with one
`bigint` primary key. Configure the publication for inserts, updates, deletes
and truncates, without a row filter, and include exactly the key and the
named projection in its column list. Keep the slot exclusively for this
mount and keep the publication stable. Use a replication login that can
inspect the table and call `pg_control_system` and `pg_control_checkpoint`.
The declared endpoint must pass TLS verification using deployment trust.

Seal the receiver credential with `bijection secret set`.

```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "username": "inventory_replica",
  "password": "<database password>",
  "database": "inventory",
  "schema": "publishing",
  "table": "items",
  "key": "id",
  "columns": ["id", "name", "quantity"],
  "publication": "items_bijection",
  "slot": "items_bijection",
  "incarnation": "inventory-items-1"
}
```

The mount starts at the slot's confirmed position and reads subsequent
changes. Pre-existing rows appear when later transactions write them. It
keeps primary keys as decimal strings and projects PostgreSQL text values
or JSON null. Deletes remove keys. One complete transaction publishes
together with its WAL position. The next read acknowledges only the
position already committed by the mount.

Use built-in column types and keep projected values small enough for
complete text tuples. Reads refuse unchanged toasted values. A transaction
can use up to 128 protocol messages, 32 published changes, 24 KiB of JSON
per row, and 48 KiB of encoded changes. An oversized transaction leaves the
published cursor intact.

Health reports the slot's oldest retained WAL, observed flushed head and
Bijection's retained position as LSN strings. A lost slot, changed timeline,
changed publication or truncation stops capture. Use a fresh slot and mount
with a new configured incarnation after replacement or restore. The
installer owns the slot and publication, including monitoring WAL usage and
retiring both resources after use.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.