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 1sUnby-005ktP-A2 for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Jul 2024 13:25:26 +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 1sUnbw-00GfaJ-DR for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Jul 2024 13:25:24 +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.94.2) (envelope-from ) id 1sUnbw-00GfaB-3D for pgsql-hackers@lists.postgresql.org; Fri, 19 Jul 2024 13:25:24 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sUnbt-000NJY-GK for pgsql-hackers@lists.postgresql.org; Fri, 19 Jul 2024 13:25:22 +0000 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a77d876273dso94462366b.0 for ; Fri, 19 Jul 2024 06:25:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1721395520; x=1722000320; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=4MIYUS5LiWR8SZ0GfkvMY477sJRL/u5UcuEE5FqksbE=; b=b1EbrmcbmRbruL5YVV/4vGfpuzoGwIge3QaFdAiq1CFrdB2WLsrOw3zll/lK4i+3d3 ewee4qQY4POSadgf+vgm/Zb9EWJSvRww1Axbe0Y2zNPXLH7e87ec+hoCgqUBq5/w+EO9 /lsd4c8C3DFmL2lqndKvHrgZonmexVmqwEBfakVuyPNSMxavjE18SAieoS8hcBxjwTjk 64rQdyOo/V16jTRXVaY785V9gy2SMfqA5JwJl08y3n0K8+YCmE2hO0nSt0QmT1vXt5OQ pwjc0IsUeK0mP3eLTpHQrfWg2YQyzVckvrEbEpwIT94NLnHJpiz/AnQOWHCl28DjUiMd 0VQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721395520; x=1722000320; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4MIYUS5LiWR8SZ0GfkvMY477sJRL/u5UcuEE5FqksbE=; b=h3iDj34RoD5dPqtbX3w4zs4GS8B+lFDtEvG+OWVLhyuqvVcLpTO1J1Xf35NVAodMTX r0h+1iY1ymjsZMu6bo5mocBhirDm3ccO8OFJTpzNLNP06VoQjTxRr+kRnZMbttfZ84JA BpG929Ds/99b1sboPqpHXd66o1Pq4qau2hmD02PCJc4vhT/P6/U6njSa0JkLjnTlkmoo CQLZx1hItR3IOAXWQ1uv47jEIaOSh5Odwhn5GL+OiON6iGV5WyoAkdGEjsJlF1wdT0gu P4bQGWpnWeGhrcyyT/sAIlSf6SkM/kQoWg6Rc2u7heBAK1fd/YOZ0qHje4sZAGR7otsq uZFQ== X-Gm-Message-State: AOJu0YwhM3X2YDGY2wAXeDKzuzS6eUMxmB6SUapK5QbubCnoPVhsFZWy LP0qWBwdHFqIaVmayp9CqXNFS6vbR4GDRrrIeUIiXhpHBBEetOVzfEm7mlWNNM+4lfYFSSbUaCE = X-Google-Smtp-Source: AGHT+IF3wvFTxEAxVXyCI2ttEgL0udwIopHjXZvPoYwNqcUwKv9LM9E+2FnZD0PHzchAgBOn/QPoNg== X-Received: by 2002:a05:6402:26c7:b0:58b:1a5e:c0e7 with SMTP id 4fb4d7f45d1cf-5a05d1e66camr7844791a12.35.1721395519776; Fri, 19 Jul 2024 06:25:19 -0700 (PDT) Received: from [10.137.0.18] (ip-86-49-229-30.bb.vodafone.cz. [86.49.229.30]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5a30c7d36f3sm1178060a12.91.2024.07.19.06.25.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Jul 2024 06:25:19 -0700 (PDT) Message-ID: Date: Fri, 19 Jul 2024 15:25:18 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: walsender.c fileheader comment To: Peter Smith Cc: PostgreSQL Hackers References: Content-Language: en-US From: Tomas Vondra In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 7/19/24 07:02, Peter Smith wrote: > ... >> >> To conclude, I think this probably makes the comments more confusing. If >> we want to make it clearer, I'd probably start by clarifying what the >> "stopping" state means. Also, it's a bit surprising we may not actually >> go through the "stopping" state during shutdown. >> > > I agree. My interpretation of the (ambiguous) "stopping" state led me > to believe the comment was quite wrong. So, this thread was only > intended as a trivial comment fix in passing but clearly there is more > to this than I anticipated. I would be happy if someone with more > knowledge about the WALSNDSTATE_STOPPING versus got_STOPPING could > disambiguate the file header comment, but that's not me, so I have > withdrawn this from the Commitfest. > Understood. Thanks for the patch anyway, I appreciate you took the time to try to improve the comments! I agree the state transitions in walsender are not very clear, and the fact that it may shutdown without ever going through STOPPING state is quite confusing. That being said, I personally don't have ambition to improve this. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company