# Enabling Table Portioning in the Datastore (PostgreSQL)

**URL:** <https://community.openpbs.org/t/enabling-table-portioning-in-the-datastore-postgresql/2629>\
**Category:** Users/Site Administrators\
**Created:** [May 25, 2021, 11:49am UTC](https://community.openpbs.org/t/enabling-table-portioning-in-the-datastore-postgresql/2629 "2021-05-25T11:49:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![roy](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@roy](https://community.openpbs.org/u/roy)\
**Post date:** [May 25, 2021, 11:49am UTC](https://community.openpbs.org/t/enabling-table-portioning-in-the-datastore-postgresql/2629/1 "2021-05-25T11:49:11Z")

</div>

Hi,  
We are using a production environment with 12k running jobs and about 30k queued jobs (at any given time).  
We keep getting into a situation where autovacuum or VACUUM acquires ShareUpdateExclusiveLock and VACUUM FULL acquires an AcessExclusiveLock.  
And that is causing PSB to slowdown and sometimes even hang.

We are looking into an option of partition pbs.job into several partitions, perhaps based on Date or ID  
The idea is to break up the indexing across multiple partitions so the locking only happens on a partition, have anyone tried it before? are there any concerns with portioning pbs.job?

Thanks,  
Roy
