On-prem PostgreSQL config review


So I run an on-prem instance. I’d LOVE to just use the hosted service instead, but I can’t, because our applications are so private.

I have assembled the following PostgreSQL database configuration. Mostly by following the official Django documentation.

Port 6433 is actually pgbouncer in transaction pooling mode.

    'default': {
        'ENGINE':   'sentry.db.postgres',

        'HOST':     '<REDACTED>',
        'PORT':     '6433',
        'USER':     'sentry',
        'PASSWORD': '**********',
        'NAME':     'sentry',

        'CONN_MAX_AGE':                None, # https://docs.djangoproject.com/en/1.11/ref/databases/#persistent-database-connections
        'DISABLE_SERVER_SIDE_CURSORS': True, # https://docs.djangoproject.com/en/1.11/ref/databases/#transaction-pooling-and-server-side-cursors
        'AUTOCOMMIT':                  True,
        'ATOMIC_REQUESTS':             True, # https://docs.djangoproject.com/en/1.11/ref/settings/#atomic-requests

It works. But is it optimal? What would you add, remove, or change?

I couldn’t find any info on this in Sentry docs.

Thanks for your time!


My configuration is almost identical, except that I have ATOMIC_REQUESTS set to False.

It seems to work fine. :man_shrugging:

If you have no issues with your setup, I’d say that is pretty fine too.