Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sbzHU-0030Lx-Hd for pgsql-general@arkaria.postgresql.org; Thu, 08 Aug 2024 09:18:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sbzHT-00CrZB-1A for pgsql-general@arkaria.postgresql.org; Thu, 08 Aug 2024 09:17:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sbkYO-008uzj-5t for pgsql-general@lists.postgresql.org; Wed, 07 Aug 2024 17:34:28 +0000 Received: from mail-vk1-xa2c.google.com ([2607:f8b0:4864:20::a2c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sbkYL-003fOA-IC for pgsql-general@lists.postgresql.org; Wed, 07 Aug 2024 17:34:27 +0000 Received: by mail-vk1-xa2c.google.com with SMTP id 71dfb90a1353d-4f524fa193aso660698e0c.0 for ; Wed, 07 Aug 2024 10:34:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dbtune.com; s=google; t=1723052063; x=1723656863; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=VCK461g0qIY7KFATcqEUfFUVoawilchgkDIJfOICGUo=; b=BbHXXAO+8Ez0jdmjMn1dcbMOzfcHfaZ7zOUcTAubUosDzyCQY/WjGn+NTesEtjoLqT 0ksF7G3z6y+D7LBk5yA5sFHCHjSVXrTVYNMV9rfeR2bNwsQIe4t6kjEZUZ4/NotbZpu1 ym7GTSk8uQj0OdjEAVizI7c+tKNUAG9/oGs2pSkiwLlOjGxOqeWS/RHTmFcmhu23953+ hMEwXkPIsCTkJA+TClhQatAyBMPFBXR+TR2nfqky6MCUCYqDpsDXxAww5x9bSc4gi9G3 EQ9O1JfsO/kICGgUD+LB5SQIXQGEhzs8r2RWKBsXvdYoJcNw3pT1nXShfJ/0tJILDxgW YIVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723052063; x=1723656863; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=VCK461g0qIY7KFATcqEUfFUVoawilchgkDIJfOICGUo=; b=SssdQ0y/BlIOIUYl1pHRKySjzS18iKabAsAIzy+D5qOK0632Sd3ApnIljq9odqhRwk fG7wYE6IPSoNqNr98l66vhhYdSVovtlGX4HrPrInChG2yIf7xgUm/9eSW1QyAFRac458 YHEFQlp0LU/w/TKa/oqTP3ttFZhHKANVyylBU9CfJY7w5SkG4zUp1s8U9B0ONmPzlJv/ i8vXopGESioiqefZxIxUooLcTmps6akgcNhRJfFwAQFzgkp1ssnxokip5KoFIACLN+Mj g6MQWwjY9wx7DEQYw9vDYBcxQ3L54dpKVmEKe5ZA0radrvO1EdJSd0Fg/dUxp7WYJX4h S1zg== X-Gm-Message-State: AOJu0YxRvTFkbzMI2LgtJpi/JF4zyJs03ebKgmwyDZMv2pbAcXDV+eue o81SXNfXIoaqzfdHiIfGa+KIUrEPTqdFwAE0l0HZh7VaQua2A+4sUeHtqFg0MWsMBxqY0XdNTkC 2sIWmjVRspXhGqCwu7m9awVKBCeN9W18kH7jT+QWuGEJFzdSeVJc= X-Google-Smtp-Source: AGHT+IHkuz040/6VBtROMeJ+dUUFlM1cbpcS6qLEmD3OWGGQYnqUBabUdG5DCfXXrjd4GBPbzeRxSR2MQODra9DF/W4= X-Received: by 2002:a05:6122:35c2:b0:4ef:54dd:c806 with SMTP id 71dfb90a1353d-4f8f55df347mr1829493e0c.7.1723052063560; Wed, 07 Aug 2024 10:34:23 -0700 (PDT) MIME-Version: 1.0 From: Costa Alexoglou Date: Wed, 7 Aug 2024 19:34:12 +0200 Message-ID: Subject: Vacuum full connection exhaustion To: pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000002db74e061f1b5202" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000002db74e061f1b5202 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hey folks, I noticed something weird, and not sure if this is the expected behaviour or not in PostgreSQL. So I am running Benchbase (a benchmark framework) with 50 terminals (50 concurrent connections). There are 2-3 additional connections, one for a postgres-exporter container for example. So far so good, and with a `max_connections` at 100 there is no problem. What happens is that if I execute manually `VACUUM FULL` the connections are exhausted. Also tried this with 150 `max_connections` to see if it just =E2=80=9Cdoubl= es=E2=80=9D the current connections, but as it turned out, it still exhausted all the connections until it reached `max_connections`. This was cross-checked, as the postgres-exporter could not connect, and I manually was not allowed to connect with `psql`. Is this expected or is this a bug? postgres-exporter logs: ``` sql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: sorry, too many clients already ``` --0000000000002db74e061f1b5202 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hey folks,

I noticed something weird, and not sure = if this is the expected behaviour or not in PostgreSQL.

So I am runn= ing Benchbase (a benchmark framework) with 50 terminals (50 concurrent conn= ections).
There are 2-3 additional connections, one for a postgres-expo= rter container for example.

So far so good, and with a `max_connecti= ons` at 100 there is no problem. What happens is that if I execute manually= `VACUUM FULL` the connections are exhausted.

Also tried this with 1= 50 `max_connections` to see if it just =E2=80=9Cdoubles=E2=80=9D the curren= t connections, but as it turned out, it still exhausted all the connections= until it reached `max_connections`.

This was cross-checked, as the = postgres-exporter could not connect, and I manually was not allowed to conn= ect with `psql`.

Is this expected or is this a bug?


postg= res-exporter logs:
```
sql: error: connection to server on socket &qu= ot;/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: =C2=A0sorry, too = many clients already
```
--0000000000002db74e061f1b5202--