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.96) (envelope-from ) id 1w3gDD-001RvU-2T for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Mar 2026 20:12:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w3gCC-0087KF-1v for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Mar 2026 20:11:49 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w3gCC-0087K6-0r for pgsql-hackers@lists.postgresql.org; Fri, 20 Mar 2026 20:11:48 +0000 Received: from mail-qv1-xf30.google.com ([2607:f8b0:4864:20::f30]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w3gC8-00000000DoI-3Q4X for pgsql-hackers@lists.postgresql.org; Fri, 20 Mar 2026 20:11:45 +0000 Received: by mail-qv1-xf30.google.com with SMTP id 6a1803df08f44-899fc265126so31352226d6.1 for ; Fri, 20 Mar 2026 13:11:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774037504; cv=none; d=google.com; s=arc-20240605; b=kF/0hGNrTkgJS4V0LlhUKtGLHAJ0fgn9NO8GIomhFxeLRnBQESebiPe9o1fwW9y/y2 9B1/jVFBQEXnQr1A47bvVK+ds9RhpBWfrhgjkRBp7CYu14Q8zix1t8+0fc0Hrd/nt+dt VhuOUho8vBkjn46D6nagMvWey4Qza/G9CLC7vSlpcl2wxHOaAc/Td/Lv1JKB8jM7CQBO PkljkhlHcspwJCXQOl1xYRVQF8f/CaN5NI34/qz06dcDOoF5Z0OeololpcJJd6pvCqI0 uHBuk6V/80TIZZd/nrnE7ROVVgiGbFrVLplkhLxfcsM8AwN0SXhjAsb8raW6KARI0k0w k9Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=cOHOiZGWJhrt+86SGZ8q7+scRSRyjr25s14VAhrvLiM=; fh=ZovM8Q5HdJJKLSw0yoY3BLGi602E9i+4w4c5BgZc4q0=; b=fsryzlqH8FoGNSL+wWaXVyYUfy9E6ChcWdPViNpXBBLbGxC4mhaYQGcaRyS9+EB3Je EKQ60lssPNE8Z4DDEuuiVn9nysnI0djVkYrpmprPAXMJgzGUry+U1S/jJmeucQK9wtlc v3R5PWs/UnadADdQ5/HPxr6tRPJBhwo1qjcwjPjZ18uwchZisxa8fHd11pSTuDXWsvCG QUdzT1QWBCD+NFtRWDceZkKGwtNQ0IumDF22QmZFQKs/LuTLMYlWaCi1M5Xy6tdATnAw me4coUdl6xz/svGHx+ISlJRrNJXN6xG28JPOvTn1cPumeB5iRlM8o2AhMEWLQQeiv40C 0hWA==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1774037504; x=1774642304; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=cOHOiZGWJhrt+86SGZ8q7+scRSRyjr25s14VAhrvLiM=; b=fnQkhQE2uSyRO6LoZzr8WLPZO7XT629kBOEzdG3//1RCJGzMWisD6v6HN/qcdI+916 piADuc7bub5FPZOqjNLXvmM7rnP/LlZqFVf9Dc3IGV4nLPvwTdkZM2hmuxxSihSuS7mx /JAhlCBIMliFMTqLXTyC8tIKJGcAz0/lyUp1PEVnXzYPBjDIOjD34lwiiQYmnjSivtkL YjGvglGCHVTq9T1weaSfBHmoL9nQtt50MMJDdX0B9NxFXbfCHlYfkpDzGAjtTZv/TFNj sJC7xTrHj2hXGHJENMGDKUfDU0Y90VvkgKTj/Yu/c2I/zs8nA46eZSLKd2HA2TGp9b0H SZYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774037504; x=1774642304; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=cOHOiZGWJhrt+86SGZ8q7+scRSRyjr25s14VAhrvLiM=; b=Y9VXjX63vNmi8bW/lVhaMczWgPRhkO/02JQYylUQujVvwBtanEKMEQb3YLH2127CIp Rq2N/F8+tPO6WjcHIhgQpXc3L6uM045BCNhMVJsc7z+mD64qkoGXORONr0RuX2Dm0xai eFqOWAbpW7EZQ/JMt3Y8jaMACBPdAbWpCaAJtaniJA8KUixAq2VrKg5cZgDF8/zw0j0w zP1hVXMhGcvFOBf5iIJinwpMwZr5rhghJDs+i/BbqIlUbbetWdF0M7gmlyp85Z/4TieG 2Bg77AJi7ogbCctyeNipngsZMtbPwVOplrSx9TVbti2b0mVwGb45tXNidsmFrv3OS94/ dhqw== X-Forwarded-Encrypted: i=1; AJvYcCVSwIDWJXjCLFcN/Hlh1WfKs3m64AQViELXp2MSogoufv1YvfRX/mHb+t/0uzW93aLxb+5p5hm32RcGvYcw@lists.postgresql.org X-Gm-Message-State: AOJu0Yyjr4BeQj9yP5hhqX1NhPtNk1BagZRen5Ck26f32APzT2grs14K Owo02hFbcyIm/AE000yIUWHCAALbS7B//onXIKqLW6NmcZgWrFuY7yjkEmQb0KPV0CFE5Yqap0r iO3/Ki0J6/qt2eUc5CD8wr8RoKIb/FqlBdk7a7/je X-Gm-Gg: ATEYQzwfJ1lUYn5k1m17IVP5V7yjzy8RUBOPYQHnllUD0mgAVbLv5tIT1pdsLVaebJD VP9Ee+U+uqRgZwf+YeO+3yii9soWxFvDlRmGL7xyRMp0UoPCcVLfTFy5I7ZiQjFxAL5zNY0SPjS A0m4D3EiypAmiZqUPoa2s7Aacji1Inqs37VU/DsT4pJ3NGMGsWx2yXQ5kcSiQAsCaKDEJOZuvPx i0dJ9iQq9+iokqRhA2syUxAfCGBDR7veXx4SYG5iRQgH7e+YskLaJc6Xc5HPvSrxwl+UaadQZSo NvM1AgF+Iw== X-Received: by 2002:a05:6214:411c:b0:896:f5b1:87b2 with SMTP id 6a1803df08f44-89c85a5627amr68513876d6.40.1774037503669; Fri, 20 Mar 2026 13:11:43 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jacob Champion Date: Fri, 20 Mar 2026 13:11:32 -0700 X-Gm-Features: AaiRm53Uxn2AjJwc-KsRTPgZ2tW0vtRHyNU0OU-QD7mc0kw3624qI_8Cng1kFRs Message-ID: Subject: Re: Add GoAway protocol message for graceful but fast server shutdown/switchover To: Tomas Vondra Cc: Jelte Fennema-Nio , Zsolt Parragi , PostgreSQL Hackers , Dave Cramer , Heikki Linnakangas Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Mar 20, 2026 at 12:20=E2=80=AFPM Tomas Vondra wro= te: > * In fact, does it improve the smart shutdown case in practice? Let's > say we have a single instance, and we're restarting it. It'll send > GoAway to all the clients, the good clients will try to reconnect. But > if there's even a single "bad" client ignoring the GoAway, all the > well-behaved clients will get stuck. Ofc, that can happen without the > GoAway message too - a client may disconnect because of timeout etc. But > it makes it more likely, and it'll affect the well-behaved clients. > > * Would it make sense to have some payload in the GoAway message? I'm > thinking about (a) some deadline by which the client should disconnect, > e.g. time of planned restart / shutdown, (b) priority, expressing how > much the client should try to disconnect (and maybe take more drastic > actions). I'd been wondering about these as well, but in the context of the tangential thread [1]. HTTP has much stronger semantics for its GOAWAY frames, for instance. --Jacob [1] https://postgr.es/m/CAOYmi%2BmSn8xQ7ExqY07V6G2oFXN2nY%2B7f4yf_RV2%3D7xN= CKwW-Q%40mail.gmail.com