# During high load Hibernate does not set schema when transaction pooling is set

**URL:** <https://discourse.hibernate.org/t/during-high-load-hibernate-does-not-set-schema-when-transaction-pooling-is-set/7938>\
**Category:** Hibernate ORM\
**Created:** [July 6, 2023, 11:20am UTC](https://discourse.hibernate.org/t/during-high-load-hibernate-does-not-set-schema-when-transaction-pooling-is-set/7938 "2023-07-06T11:20:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nitin](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/nitin/32/2552_2.png) [@nitin](https://discourse.hibernate.org/u/nitin)\
**Post date:** [July 6, 2023, 11:20am UTC](https://discourse.hibernate.org/t/during-high-load-hibernate-does-not-set-schema-when-transaction-pooling-is-set/7938/1 "2023-07-06T11:20:52Z")

</div>

We have pgbouncer setup which uses transaction pool mode. From our Multi tenant (Schema per tenant) Spring boot app(which uses HikariCP) we are making CRUD operations. We also have p6spy in place to log statement execution(slightly modified to include schema name as well).

Frequently we observed that schema is not set for during statement execution, because of which it throw “relation xyz does not exist”.

Issue is similar to [How can I disable prepared statements…](https://discourse.hibernate.org/t/how-can-i-disable-prepared-statements-for-using-pgbouncer-with-transaction-pooling/6236) but the resolution the question poster had to set the hibernate.default\_schema, which we cannot do because ours is mulit-tenant app.

Hibernate version: 5.6.9  
Spring boot 2.7.12

 ![concurrent_issues](https://canada1.discourse-cdn.com/flex035/uploads/hibernate/original/2X/2/2b5acf41734facb72b07772c0ddac2ea6f990d6d.png)

---

<div class="post-metadata">

**Author:** ![beikov](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/beikov/32/258_2.png) [@beikov](https://discourse.hibernate.org/u/beikov)\
**Post date:** [July 14, 2023, 12:25pm UTC](https://discourse.hibernate.org/t/during-high-load-hibernate-does-not-set-schema-when-transaction-pooling-is-set/7938/2 "2023-07-14T12:25:20Z")

</div>

Try updating to 5.6.15.Final
