Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nDVH9-0002ek-1x for pgsql-www@arkaria.postgresql.org; Fri, 28 Jan 2022 17:43:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nDVH7-0007JQ-U2 for pgsql-www@arkaria.postgresql.org; Fri, 28 Jan 2022 17:43:05 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nDVH7-0007JH-Nd for pgsql-www@lists.postgresql.org; Fri, 28 Jan 2022 17:43:05 +0000 Received: from host-213-189-163-85.dynamic.voo.be ([213.189.163.85] helo=ploudseeker.com) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nDVH5-00009G-JN for pgsql-www@lists.postgresql.org; Fri, 28 Jan 2022 17:43:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cmatte.me; s=myselector; t=1643391781; bh=0HZkX/40nJ85yhBPQlWHpy8XVxH7w2GK9aJEDhRW3qo=; h=Date:Subject:To:References:From:In-Reply-To; b=uzskorfPS/tJ9OSuxm6AIlvMXroqLNR0xZ4XpXTcOlGf9TvURQ5MmUHQlZ7r5aF4k xJtyo+e7W5PFwiHaNaVGEkvfuLluEmtzXjaFJSul8UrX/Igp73fWZ1S625xmXPFymy qAI1cMcXK0DuUDu1zLWWhCxXj25f6JMBItL+4rbPodwGgSvROgQwxp00RPFjawy8pG 0UX4RbSDnUDusZfZxEa9LHU42wqxCqmoZk0+5+B3sRE7IJlVMKJsf82e1AZAJJVdzD MSLgfvspHw0U0kQTi8QdODG1R5+nX/L2dLm0UCIty9HKimWWluOYKovpcVBXi1wQjc bet9aQvb2RqIA== Message-ID: Date: Fri, 28 Jan 2022 18:43:01 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH] pgarchives: pglister_sync: import lists with subscriber_access set to True Content-Language: en-US To: pgsql-www@lists.postgresql.org References: <1d060463-e562-7783-decd-b5a7f3c4c06c@cmatte.me> From: =?UTF-8?Q?C=c3=a9lestin_Matte?= In-Reply-To: <1d060463-e562-7783-decd-b5a7f3c4c06c@cmatte.me> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Sorry, accidentally sent unfinished email containing contradictory information... Please ignore the previous one. pglister_sync.py is a script used to synchronize things between pglister and pgarchives: lists, subscribers etc. subscriber_access is not set in pglister_sync's query, and is set to null=False in Django's model. As a consequence, pglister_sync fails to add new lists: Traceback (most recent call last): File "/srv/pgarchives/local/loader/pglister_sync.py", line 68, in 'groupname': l['group']['groupname'], psycopg2.errors.NotNullViolation: null value in column "subscriber_access" violates not-null constraint DETAIL: Failing row contains (8, test-pglister-sync, test-pglister-sync, , t, 1, null). I don't know if there is a way to configure postgres to use the default value , but I think it would be wiser to explicitly set this variable in pglister_sync.py (attached patch in previous email) It seems more logical to me to set this value to True, as otherwise access to lists on private servers is restricted to superusers, and there is no easier way to modify that than to edit the database manually. But then, the model may need to be update to have this value set to default=True as well. What do you think? That said, it may be better to have a way to modify that within the web interface in pglister. -- Célestin Matte