# Migrating from AsyncShallowPostgresSaver

**URL:** <https://forum.langchain.com/t/migrating-from-asyncshallowpostgressaver/1634>\
**Category:** LangGraph\
**Tags:** self-hosted, product-feedback, python-help\
**Created:** [September 24, 2025, 5:15pm UTC](https://forum.langchain.com/t/migrating-from-asyncshallowpostgressaver/1634 "2025-09-24T17:15:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kapis](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/kapis/32/1084_2.png) [@kapis](https://forum.langchain.com/u/kapis)\
**Post date:** [September 24, 2025, 5:15pm UTC](https://forum.langchain.com/t/migrating-from-asyncshallowpostgressaver/1634/1 "2025-09-24T17:15:50Z")

</div>

Hi, as far as I can see, the AsyncShallowPostgresSaver will be depretiated in the future versions, with a recommendations to:

\>“Use AsyncPostgresSaver instead, and invoke the graph with `await graph.ainvoke(..., durability='exit')`.”,

But as far as I understand, this is not an equivalent replacement. Using `durability='exit'` will disable a lot of nice features (like using interrupts) and make the whole thing… Not durable at all!

Is there still an option to have both:

1. Durable execution (interrupts, saving state after each node)#
2. Only saving the latest version of the state (no time-travel)

---

<div class="post-metadata">

**Author:** ![wfh](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/wfh/32/33_2.png) [@wfh](https://forum.langchain.com/u/wfh)\
**Post date:** [September 24, 2025, 5:19pm UTC](https://forum.langchain.com/t/migrating-from-asyncshallowpostgressaver/1634/2 "2025-09-24T17:19:23Z")

</div>

Interrupts still work with `exit`!

---

<div class="post-metadata">

**Author:** ![kapis](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/kapis/32/1084_2.png) [@kapis](https://forum.langchain.com/u/kapis)\
**Post date:** [September 28, 2025, 8:23am UTC](https://forum.langchain.com/t/migrating-from-asyncshallowpostgressaver/1634/3 "2025-09-28T08:23:11Z")

</div>

Good to know!

I had this false impression due to this line [in documentation](https://docs.langchain.com/oss/python/langgraph/durable-execution#%22exit%22):

> Changes are persisted only when graph execution completes (either successfully or with an error). This provides the best performance for long-running graphs but means intermediate state is not saved, so **you cannot** recover from mid-execution failures or **interrupt the graph execution.**

---

<div class="post-metadata">

**Author:** ![kapis](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/kapis/32/1084_2.png) [@kapis](https://forum.langchain.com/u/kapis)\
**Post date:** [September 28, 2025, 8:35am UTC](https://forum.langchain.com/t/migrating-from-asyncshallowpostgressaver/1634/4 "2025-09-28T08:35:18Z")

</div>

Still, I’d like to know if there’s an option to have:

1. `sync` level durability
2. save only the latest state

---

<div class="post-metadata">

**Author:** ![kapis](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/kapis/32/1084_2.png) [@kapis](https://forum.langchain.com/u/kapis)\
**Post date:** [October 5, 2025, 2:50pm UTC](https://forum.langchain.com/t/migrating-from-asyncshallowpostgressaver/1634/6 "2025-10-05T14:50:19Z")

</div>

Sorry to bother, but are there any suggestions to the issue described?

---

<div class="post-metadata">

**Author:** ![petar-studocu](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/petar-studocu/32/1448_2.png) [@petar-studocu](https://forum.langchain.com/u/petar-studocu)\
**Post date:** [October 30, 2025, 2:08pm UTC](https://forum.langchain.com/t/migrating-from-asyncshallowpostgressaver/1634/7 "2025-10-30T14:08:26Z")

</div>

Similarly interested in updates 👁

Even if the `exit` durability setting covers interrupts (which the docs indicate otherwise), there really should be a mechanism to cap the number of checkpoints that are persisted. Only 1 makes sense, and `N` of them would be even more generalised.

When used in production, the default setup gets out of hand pretty quickly, meaning either:

1. not using the checkpointer/saver, and dealing with persistence and interrupts manually
2. manually cleaning old checkpoints
