# Is it necessary to delete a PIT?

**URL:** <https://discuss.elastic.co/t/is-it-necessary-to-delete-a-pit/277752>\
**Category:** Elasticsearch\
**Created:** [July 5, 2021, 12:58am UTC](https://discuss.elastic.co/t/is-it-necessary-to-delete-a-pit/277752 "2021-07-05T00:58:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhiyazw](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zhiyazw](https://discuss.elastic.co/u/zhiyazw)\
**Post date:** [July 5, 2021, 12:58am UTC](https://discuss.elastic.co/t/is-it-necessary-to-delete-a-pit/277752/1 "2021-07-05T00:58:11Z")

</div>

In search after section, ELasticsearch said, "When you’re finished, you should delete your PIT".

Is this necessary? Does a PIT get deleted automatically after timeout? Just as "Scroll" does.

It's not easy to find a good time to delete the PIT, as it's difficult to know when the end user finishes his pagination.

---

<div class="post-metadata">

**Author:** ![mayya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mayya/32/83147_2.png) [@mayya](https://discuss.elastic.co/u/mayya)\
**Post date:** [July 8, 2021, 10:33am UTC](https://discuss.elastic.co/t/is-it-necessary-to-delete-a-pit/277752/2 "2021-07-08T10:33:17Z")

</div>

As [PIT documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html) says Point-in-time is automatically closed when its `keep_alive` has been elapsed. So it works the same way as scroll. You don't need to manually delete it, as long as the last `keep_alive` value is not super big (how long the PIT still needs to be around).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 5, 2021, 10:33am UTC](https://discuss.elastic.co/t/is-it-necessary-to-delete-a-pit/277752/3 "2021-08-05T10:33:58Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
