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 1tfBBA-000E4R-QI for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Feb 2025 05:08:57 +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 1tfBB9-001KBx-Qk for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Feb 2025 05:08:55 +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 1tfBB9-001KBp-HI for pgsql-hackers@lists.postgresql.org; Tue, 04 Feb 2025 05:08:55 +0000 Received: from mail-oa1-x29.google.com ([2001:4860:4864:20::29]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tfBB6-003A4T-2w for pgsql-hackers@lists.postgresql.org; Tue, 04 Feb 2025 05:08:55 +0000 Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-2a3939a758dso1611411fac.1 for ; Mon, 03 Feb 2025 21:08:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738645732; x=1739250532; 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=4ww6rNsbkT8b2WIaqQ18x83UUi2lYbqsWDewtO9thPI=; b=Ax2whEzm/nBSc1sgPbbFvoLcj0qNLLZD5EHpzFwVxtfyfMmCQkkolhW7VcwiOIhivE 2FE+c8LYxtKrjFgVpDHL4oWEOtaBIJ7TGgR2cO3ynp0kR9CVkBBpkIJtjB81Yxuch2KY JSzh5NydhW3Yp157T2XUCekhA85FOpFeItKE6A1rFyw/LFr7+o6w/eKIxNNryyG5Rp/w VPMTMvH00+h6fON/qI/qEk+ieNDDDRhUTpzhn4491V6NBbxOBVMmJ7jxglCwueI6N2sd kwc9bDlMfjWBQcerSdIJwg7FGa4BDdbrG2kbpchToltV0/Ty4mC1h8ZPqkUxlPuAHXiB ZTWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738645732; x=1739250532; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4ww6rNsbkT8b2WIaqQ18x83UUi2lYbqsWDewtO9thPI=; b=h3uUDjhozoBVONcBzD2IN7LE4Uh3wsK7MD9/IXvq8XTJP1Xd3uKWkApf0p1LV4RQ3Z jg6VFEWe1B5SieqpaixgrRls/Es8Wzut8xlAGZTeXSpVEMIKbYzun6c6lRz3/YdVc8xa Ky1gLQeas5CCrx9nhi7mPKPjWaByD5w2V3wqUgHHy+/4mmnkVnmoJJ1LmTGPGf7wwoTL uP8S48QiGwcz2g6vzTJ0+q2tjKCyYs5CpkGEvK4py0XAZbWSz1h7TL3Wy/wBgzZeviRG z/T7jKVO/MQ8gm2r/hRh8lk+aC4JcvExbqf9HD/tled3p/jfNh0uw0Y8OmC7rCTkdSda ujUQ== X-Forwarded-Encrypted: i=1; AJvYcCUzCThqCoX2aFjRQ3CTsQ7Cg4AegNXX7RsqPl5dE9GH0+GV/pWG0JNeTgtkQ7uCkhq9/lentbR/vGHe32ov@lists.postgresql.org X-Gm-Message-State: AOJu0YxfRTmuMRrLNSlGheIOfeq/Ky08asi0Af+KHg72JWZJO51ToaO/ 1adQk8g2hBCXGHCyk1NktBm1kzovqDtZ/i+JXqu9P6OAvJ/dkBEeycPo8zVycS7t+tjRhBuDRdA jiXQIXMWEoT4nroWwCRiF7xNaqJg= X-Gm-Gg: ASbGncsqfwiIWWGDKxQkIQquXdRvymnUp5IvSZGJO0UHC18iQuQNF0jSWZgiNCtHAhS gFf97k5ZNClSXD/o6xqYenwRugORD9RwazGReYBtkWm84BBJKhM1keAXeNQe4N2I0cIN3tzXumS g= X-Google-Smtp-Source: AGHT+IFVpJJGS/gYXm0/50qyMAHYIM0C/pVvWfVsmonpAh2SwDcnsPt6BH6zOqMriBnSwBCi6pu3YfR4yMBY7xfsIH8= X-Received: by 2002:a05:6871:54a:b0:29e:43ce:a172 with SMTP id 586e51a60fabf-2b32f2dba1cmr16133152fac.28.1738645731550; Mon, 03 Feb 2025 21:08:51 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Tue, 4 Feb 2025 10:38:39 +0530 X-Gm-Features: AWEUYZlmQHDi-AiLuBvkvBmOjWrmHbCkIojvUU8pmR3s-btAr83i2-FT9iJ5QOo Message-ID: Subject: Re: Introduce XID age and inactive timeout based replication slot invalidation To: Peter Smith Cc: Nisha Moond , vignesh C , "Hayato Kuroda (Fujitsu)" , shveta malik , Bharath Rupireddy , Ajin Cherian , Bertrand Drouvot , Masahiko Sawada , Nathan Bossart , PostgreSQL Hackers 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 Tue, Feb 4, 2025 at 4:02=E2=80=AFAM Peter Smith = wrote: > > On Mon, Feb 3, 2025 at 5:34=E2=80=AFPM Amit Kapila wrote: > > > > On Mon, Feb 3, 2025 at 6:16=E2=80=AFAM Peter Smith wrote: > > > > > > > > > 2. > > > + appendStringInfo(&err_hint, "You might need to increase \"%s\".", > > > + "max_slot_wal_keep_size"); > > > break; > > > 2a. > > > In this case, shouldn't you really be using macro _("You might need t= o > > > increase \"%s\".") so that the common format string would be got usin= g > > > gettext()? > > > > > > ~ > > > > > > > > > ~~~ > > > > > > 3. > > > + appendStringInfo(&err_hint, "You might need to increase \"%s\".", > > > + "idle_replication_slot_timeout"); > > > + break; > > > > > > 3a. > > > Ditto above. IMO this common format string should be got using macro. > > > e.g.: _("You might need to increase \"%s\".") > > > > > > ~ > > > > Instead, we can directly use '_(' in errhint as we are doing in one > > other similar place "errhint("%s", _(view_updatable_error))));". I > > think we didn't use it for errdetail because, in one of the cases, it > > needs to use ngettext > > > > -1 for this suggestion because this will end up causing a gettext() on > the entire hint where the GUC has already been substituted. > > e.g. it is effectively doing > > _("You might need to increase \"max_slot_wal_keep_size\".") > _("You might need to increase \"idle_replication_slot_timeout\".") > > But that is contrary to the goal of reducing the burden on translators > by using *common* messages wherever possible. IMO we should only > request translation of the *common* part of the hint message. > Fair point. So, we can ignore my suggestion. --=20 With Regards, Amit Kapila.