> ## Content Index
> Fetch the complete content index at: https://til.codes/llms.txt
> Use this file to discover other available public pages before exploring further.

# Configure max_connections for PostgreSQL using nix
- URL: https://til.codes/configure-max_connections-postgresql-nix/
- Published: 2022-05-30T06:59:17.000Z
- Updated: 2022-05-30T06:59:17.000Z
- Description: How to configure max_connections value for PostgreSQL using nix
- Author: Manu Ajith
- Tags: nix, postgresql, #Import 2024-07-13 21:01

The default value of `max_connections` is 100, and if you ever wanted to configure it for a higher limit, it can be done so by updating the following:

```diff
{ pkgs, ... }:
{
  services.postgresql = {
    enable = true;
    package = pkgs.postgresql_14;
    dataDir = "/usr/local/var/postgres";
    + extraConfig = ''
    +  max_connections = 1000
    + '';
  };
}
```