# PostgresSaver

> **Class** in `langgraph.checkpoint.postgres`

📖 [View in docs](https://reference.langchain.com/python/langgraph.checkpoint.postgres/PostgresSaver)

Checkpointer that stores checkpoints in a Postgres database.

## Signature

```python
PostgresSaver(
    self,
    conn: _internal.Conn,
    pipe: Pipeline | None = None,
    serde: SerializerProtocol | None = None,
)
```

## Extends

- `BasePostgresSaver`

## Constructors

```python
__init__(
    self,
    conn: _internal.Conn,
    pipe: Pipeline | None = None,
    serde: SerializerProtocol | None = None,
) -> None
```

| Name | Type |
|------|------|
| `conn` | `_internal.Conn` |
| `pipe` | `Pipeline \| None` |
| `serde` | `SerializerProtocol \| None` |


## Properties

- `lock`
- `conn`
- `pipe`
- `supports_pipeline`

## Methods

- [`from_conn_string()`](https://reference.langchain.com/python/langgraph.checkpoint.postgres/PostgresSaver/from_conn_string)
- [`setup()`](https://reference.langchain.com/python/langgraph.checkpoint.postgres/PostgresSaver/setup)
- [`list()`](https://reference.langchain.com/python/langgraph.checkpoint.postgres/PostgresSaver/list)
- [`get_tuple()`](https://reference.langchain.com/python/langgraph.checkpoint.postgres/PostgresSaver/get_tuple)
- [`put()`](https://reference.langchain.com/python/langgraph.checkpoint.postgres/PostgresSaver/put)
- [`put_writes()`](https://reference.langchain.com/python/langgraph.checkpoint.postgres/PostgresSaver/put_writes)
- [`delete_thread()`](https://reference.langchain.com/python/langgraph.checkpoint.postgres/PostgresSaver/delete_thread)
- [`get_delta_channel_history()`](https://reference.langchain.com/python/langgraph.checkpoint.postgres/PostgresSaver/get_delta_channel_history)

---

[View source on GitHub](https://github.com/langchain-ai/langgraph/blob/398d6cc59d4cf81ab23c09f037e9f521c3fedcd6/libs/checkpoint-postgres/langgraph/checkpoint/postgres/__init__.py#L40)