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 1uj1J1-001kzj-6w for pgsql-hackers@arkaria.postgresql.org; Mon, 04 Aug 2025 19:57:11 +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 1uj1I1-004X7Y-42 for pgsql-hackers@arkaria.postgresql.org; Mon, 04 Aug 2025 19:56:09 +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 1uj1I0-004X7N-Qc for pgsql-hackers@lists.postgresql.org; Mon, 04 Aug 2025 19:56:08 +0000 Received: from mail-il1-x129.google.com ([2607:f8b0:4864:20::129]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uj1Hy-000kq4-0h for pgsql-hackers@lists.postgresql.org; Mon, 04 Aug 2025 19:56:08 +0000 Received: by mail-il1-x129.google.com with SMTP id e9e14a558f8ab-3e41b930105so8504615ab.1 for ; Mon, 04 Aug 2025 12:56:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1754337364; x=1754942164; darn=lists.postgresql.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=bFs5H9hiXEXp4LrksQJgN8ngPADHdYgL5LRfunzvz3o=; b=PrJDD+wIG5jNEbQvwexckH9AkuXnNkC4G0RZJWiqBcl7BueYVQMrPoNgtZfpc5C/JY s2hHt2ylCiINeg3i/u4EEoqW6py3bbsfPWs+ESQoZ9OmblDv3h30GcxKXFnCG83/BNe6 bHX/741haDaMyIyhibaJGb1HywZbW9Zr11Ou4nPKYnzeVkw06hVvPo3gbocaiB2AjyGM KVvFx+38JwK2Kv6U1MYXjYP4ZP/VmL1DoeXdnHtlvf6r5t6G13WhNdSqTUOqPzZ64Itf hbDRChJXQhDfeKebr9vSFiH3kv/F/mn/2Npjmhj2IeAlZd3fTYZ88yuy0DxhQK2OxDCB dbVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754337364; x=1754942164; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bFs5H9hiXEXp4LrksQJgN8ngPADHdYgL5LRfunzvz3o=; b=WNxlvnUa5bU5WB+lMFxAb6PwavbR7DuwXFMGM2sT507J1Sj14m6k8cUs2oYIV2QYNr 7qYHe88Uu74i0Lzh1x/tvekR+SyO9owIS6gOW47qyth2NHfQc5AKyGn03FNj9W+TmGoO AVaABTzFUpZYN5ESklRip0a9zbq7f/11JobO3jpziqN4XJHTUocqy+em4LqnTt4oDd7d XEsz8W/+Qe+YE723LcVlVrmvxIs/Mk+fVLTb8or052SJYJCg7KU/kEUzGpMVLkbl6U1h EbkaKhDdhE54wiM4A24S5ITpPvpz0bb/Ix2MAsR5uVggIKzxDrz6GqEuMxJHaYdyUupS ZeAg== X-Forwarded-Encrypted: i=1; AJvYcCXPKCfFoss/7gM8/qGvAzJ4e+HbOwXlCNCBBMDLyN3E+pslJi/vOppSbKIABzxDQWLXyftkyyNR82GPZw4j@lists.postgresql.org X-Gm-Message-State: AOJu0YzvHOqpP03c8jy59+u3E9uJlBl7PW/VQt44vLszMu87jRO7DR6d SEmEiYSaWgsFW68D8EnSSefOULDiZBdIzTBMN5ADK72nHkflk6O2QzGM X-Gm-Gg: ASbGncvCCWOZX+t8W5M97GtEJlk1XNBLRJTngcJge59sXL6uRq+TUoMCVKNNWv/uZOr /I5MVUgGLsAzXaIlkwj3iNhxUkAiw44EGaq1SPTewmAaIByIP3zZq7J1Oum3ZEtrtv0T1cwRCQs PDubS3AgYdpsftzYfB01Dqj7UypZJJZgiyZFU2S5c/MjZmczRbvxwSv5lbN4n1pnmuNrwlNssjW hSMAh9YGOC+tV0lOc/htsob7QmN3SpmueMPJsmJevgPBcxhVcwDL34LyKl+hRQectNT2+4TTXMP hNRqSuL6JtBA7PpHiHqTwz0SYR8Z6PZmdRUKmexwIgdnTtfNzzgxXcX2suc6ukSYfzYqYXcWzwh zeLhruh6zAFhHvVm5V1wFvrfuPR3Q8eoURmjJqwMBIVBBQAjXM3vPJbWyA2r5SWN5CHbd80PMPL OH4eZlKQku7cElWozxpvdiO44= X-Google-Smtp-Source: AGHT+IG4VNUS48X/YYcm5ON5pm9vyhraRaTMA+5zifnn1Sq3zek/UxA/IAbOGjBISb33jFMGR4hqYg== X-Received: by 2002:a92:c266:0:b0:3e2:9f5c:520f with SMTP id e9e14a558f8ab-3e51037e02dmr16736135ab.3.1754337363990; Mon, 04 Aug 2025 12:56:03 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3e402b34532sm44682875ab.56.2025.08.04.12.56.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Aug 2025 12:56:03 -0700 (PDT) Date: Mon, 4 Aug 2025 14:56:01 -0500 From: Nathan Bossart To: =?iso-8859-1?Q?=C1lvaro?= Herrera Cc: Dave Cramer , Jacob Champion , PostgreSQL Hackers Subject: Re: More protocol.h replacements this time into walsender.c Message-ID: References: <202508041231.myxuzx2udlze@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <202508041231.myxuzx2udlze@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Aug 04, 2025 at 02:31:05PM +0200, Álvaro Herrera wrote: > +/* Replication Protocol, sent by the primary */ > + > +#define PqReplMsg_WALData 'w' > +#define PqReplMsg_PrimaryKeepAlive 'k' > +#define PqReplMsg_PrimaryStatusUpdate 's' > + > +/* Replication Protocol, sent by the standby */ > + > +#define PqReplMsg_StandbyStatus 'r' > +#define PqReplMsg_HotStandbyFeedback 'h' > +#define PqReplMsg_RequestPrimaryStatus 'p' I know I previously +1'd a new prefix for these, but upon further review, I'm not so sure about that. The replication protocol uses many of the existing PqMsg macros already, so it would be a little strange if only a subset of the replication protocol messages used the special prefix. And IMO it would also be weird to duplicate all the macros used by both protocols. There's also backups, which use the replication protocol but have their own special characters [0]. If we're going the prefix route, would we add another prefix for those, or use the replication one? [0] https://postgr.es/m/aIOkE7fgvFOu0FI_%40nathan -- nathan