# Problem with postgres upgrade

**URL:** <https://meta.discourse.org/t/problem-with-postgres-upgrade/254553>\
**Category:** Self-hosting\
**Created:** [February 9, 2023, 1:42am UTC](https://meta.discourse.org/t/problem-with-postgres-upgrade/254553 "2023-02-09T01:42:18Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)\
**Post date:** [February 9, 2023, 2:37am UTC](https://meta.discourse.org/t/problem-with-postgres-upgrade/254553/2 "2023-02-09T02:37:18Z")

</div>

Can’t you add the below to `hooks` to create the unaccent extension if it’s missing?

```plaintext
after_postgres:
    - exec: su postgres -c 'psql discourse -c "create extension if not exists unaccent;"'

```

---

_[View the full topic](https://meta.discourse.org/t/problem-with-postgres-upgrade/254553)._
