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 1vQA0j-000Dtd-1x for pgsql-www@arkaria.postgresql.org; Mon, 01 Dec 2025 19:56:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vQA0i-004DsT-2A for pgsql-www@arkaria.postgresql.org; Mon, 01 Dec 2025 19:56:36 +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 1vQA0i-004DsL-1X for pgsql-www@lists.postgresql.org; Mon, 01 Dec 2025 19:56:36 +0000 Received: from mail-yx1-xb135.google.com ([2607:f8b0:4864:20::b135]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vQA0g-002cxm-0v for pgsql-www@lists.postgresql.org; Mon, 01 Dec 2025 19:56:35 +0000 Received: by mail-yx1-xb135.google.com with SMTP id 956f58d0204a3-641e4744e59so4767712d50.2 for ; Mon, 01 Dec 2025 11:56:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hagander.net; s=mail; t=1764618994; x=1765223794; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=+xxl/R70a/MPH5Q+fwNpf4jgsl2WZS7G1uQ+W8VJ6mk=; b=fKcRG5CTmUCpEMB5m7PGydX4dYhQ3oipWOm3Nj91yfezuC0i9u7nIsyP5Wk+oNJaGK /LX7N8Zj9K143Ib/HoR0xDcFqxraoGjtHka19aEYvDeXxZibdtfee0B05emGZPRNQC+9 4ZgDbjmRQlLgz1RRXfj7jqTLmJBMw2uGnWod/UdYLz6h3DzGp2bZQfWxZ4aejFJ2qERG Jm5uujrt842Qs7juQ4umd2Gv9kyArJmuWE6lxoAjCWzRuEtF6BCN5UyUY0clPRHbiBFq opq2AZasxMctdbrRQouMhdDLIjM7ZuYnnIHpRIPCgW85nVlR81AEOzVmMbxeWpuEtyzQ XE2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764618994; x=1765223794; h=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=+xxl/R70a/MPH5Q+fwNpf4jgsl2WZS7G1uQ+W8VJ6mk=; b=UjDOc5zyrQ7U4DCch5KGCpH4AAXXlOUF4iIDJwcuEEX3p+ADzyCYg9L1gGyskjSwN3 QhJUg6E7Job8771W2bIqp7rUVr7ecqxF4M25rr8T0iXUcbTGIRnWEO2Jio1osHPKbKkV Mm6pF9N71/hq6MjFHuCnkE9QHrSnMbmgl/HKLOdu6os9p7eirUw9y0Rhhemegpi/3yhW pXUa7IwfxBYWjVm4Dp93dRtMWQNQany/3pQI3ybc+oUGNQdHDtZTK6z3srd0u1X/CI6g oz39rWz9mHplfKdPf1kkkD2T6dkvzhsTpQwX42kyhUyGtbThecNuAS++nJFb9shsi3ld zBeg== X-Gm-Message-State: AOJu0YwqJmJMpePQvJtU1MQeYhu3tVBuqPddvcOlNYTUbRcLKYIdMVk1 jRpT/jxX31jZlNOzCuk6SHeIbhxD2LNO95RMrO7m/p2Bm7SRdsLDE1LVWB8z32hOamXsobwm5FA QMcHd/ogdFXJHRZV3fKPelWuaurx+5FT/HH3j4ryYMGxvfW2Cv/HJeg== X-Gm-Gg: ASbGncseMPOvqfVnJdrb3VzTTT/cIjUmigheGkOg58zbkuFYK4qQ7mFbjQVSVQpV5nM DAC3cIqRiwjzty0OzBjS9bJzg1Xu7JBTCi3zjSUYNygEsu6Q65m15XXcg6eEkX0leHBOavzCSt0 F7yzwOoyCj7fsf/hNvoVWe7cmYq6Ez47FD14bO4kAz/Kl3jlR9ysA5kGrgJyALZXf7esG/D2lu/ bKAMLxD0BdLxmlIAs3QTr9QiDQzVy7ZHbD/Tyom2h6lX1DJsivkKK41v3kl/sP+Qe46tM4= X-Google-Smtp-Source: AGHT+IHxFUKAIJaUnjn+hv3u8E1aP14OrosUFP4bk783vmPYuyNAsVwmbIQjS6WQzqKRyjKLnRdDfLA9ET+FqbFfvF0= X-Received: by 2002:a05:690e:1482:b0:63f:b222:e14d with SMTP id 956f58d0204a3-64302a2d1d1mr28410946d50.14.1764618993949; Mon, 01 Dec 2025 11:56:33 -0800 (PST) MIME-Version: 1.0 References: <281f9ff6-62fd-45fa-9396-0dbf1b4abae0@cmatte.me> <6127117d-6490-4dee-a5ce-d8d17b65a717@cmatte.me> In-Reply-To: <6127117d-6490-4dee-a5ce-d8d17b65a717@cmatte.me> From: Magnus Hagander Date: Mon, 1 Dec 2025 20:56:21 +0100 X-Gm-Features: AWmQ_bmRYmn4vWiwIWodI5KTk2kzXI1Roy55DX7_Rm7HT7kkV1EI_OfTimgMrV4 Message-ID: Subject: Re: [PATCH] pgarchives: bugfix: increase listsubscription username length To: =?UTF-8?Q?C=C3=A9lestin_Matte?= Cc: PostgreSQL WWW Content-Type: multipart/alternative; boundary="0000000000004c699e0644e960be" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000004c699e0644e960be Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi! Better late than never, this has been pushed. Sorry about the delay! //Magnus On Mon, 22 Sept 2025 at 21:28, C=C3=A9lestin Matte wrote: > Correction: the field is copied from auth_user.username, which is max 150 > characters: > https://docs.djangoproject.com/en/5.2/ref/contrib/auth/#django.contrib.au= th.models.User.username > > Corrected patch attached > > On 22/09/2025 21:13, C=C3=A9lestin Matte wrote: > > The listsubscription username field is populated by pglister_sync, > > copying information from auth_user.email, which can be up to > > 254 characters. > > If a user defined an email address that is longer than 30 > > characters, pglister_sync will crash: > > > > Traceback (most recent call last): > > File "/path/pglister_sync.py", line 83, in > > curs.execute("WITH t(u) AS (SELECT UNNEST(%(usernames)s::text[])), > ins(un) AS (INSERT INTO listsubscribers (username, list_id) SELECT u, > %(listid)s FROM t WHERE NOT EXISTS (SELECT 1 FROM listsubscribers WHERE > username=3Du AND list_id=3D%(listid)s) RETURNING username), del(un) AS (D= ELETE > FROM listsubscribers WHERE list_id=3D%(listid)s AND NOT EXISTS (SELECT 1 = FROM > t WHERE u=3Dusername) RETURNING username) SELECT 'ins',un FROM ins UNION = ALL > SELECT 'del',un FROM del ORDER BY 1,2", { > > psycopg2.errors.StringDataRightTruncation: value too long for type > character varying(30) > > > > This patch fixes the issue by using the same max length as any > > django email field for this field. > > > -- > C=C3=A9lestin Matte --0000000000004c699e0644e960be Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi!

Better late than never, = this has been pushed. Sorry about the delay!

//Mag= nus

On Mon, 22 Sept 2025 at 21:28, C=C3=A9lestin Matte= <celestin.matte@cmatte.me> wrote:
Co= rrection: the field is copied from auth_user.username, which is max 150 cha= racters: https://docs.djangoproject.com/en/5.2/ref/contrib/auth/#django.contrib= .auth.models.User.username

Corrected patch attached

On 22/09/2025 21:13, C=C3=A9lestin Matte wrote:
> The listsubscription username field is populated by pglister_sync,
> copying information from auth_user.email, which can be up to
> 254 characters.
> If a user defined an email address that is longer than 30
> characters, pglister_sync will crash:
>
> Traceback (most recent call last):
>=C2=A0 =C2=A0 File "/path/pglister_sync.py", line 83, in <= module>
>=C2=A0 =C2=A0=C2=A0=C2=A0 curs.execute("WITH t(u) AS (SELECT UNNES= T(%(usernames)s::text[])), ins(un) AS (INSERT INTO listsubscribers (usernam= e, list_id) SELECT u, %(listid)s FROM t WHERE NOT EXISTS (SELECT 1 FROM lis= tsubscribers WHERE username=3Du AND list_id=3D%(listid)s) RETURNING usernam= e), del(un) AS (DELETE FROM listsubscribers WHERE list_id=3D%(listid)s AND = NOT EXISTS (SELECT 1 FROM t WHERE u=3Dusername) RETURNING username) SELECT = 'ins',un FROM ins UNION ALL SELECT 'del',un FROM del ORDER = BY 1,2", {
> psycopg2.errors.StringDataRightTruncation: value too long for type cha= racter varying(30)
>
> This patch fixes the issue by using the same max length as any
> django email field for this field.


--
C=C3=A9lestin Matte

--0000000000004c699e0644e960be--