[PATCH] pgarchives: Bugfix: allow message's parentid to be null

From: Célestin Matte <celestin(dot)matte(at)cmatte(dot)me>
To: PostgreSQL WWW <pgsql-www(at)lists(dot)postgresql(dot)org>
Subject: [PATCH] pgarchives: Bugfix: allow message's parentid to be null
Date: 2021-10-25 14:52:55
Message-ID: 4280598e-cbe7-c5d3-fbce-fefce11da5f3@cmatte.me
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

Hello,

Upon execution of load_messages.py, when creating a new thread, I get a crash:
(Sorry about the format, I get this out of strace)

Traceback (most recent call last):\n File \"/srv/pgarchives/local/loader/load_message.py\", lin\
e 174, in <module>\n ap.store(conn, listid, opt.overwrite, opt.overwrite)\n File \"/srv/pgarchives/local/loader/li\
b/storage.py\", line 232, in store\n 'rawtxt': bytearray(self.rawtxt),\npsycopg2.errors.NotNullViolation: null valu\
e in column \"parentid\" violates not-null constraint\nDETAIL: Failing row contains (2, 2, cmatte <cmatte(at)[my_domain]\
.tld>, helloworld(at)[my_pglister_domain], , Test archive after redeployment 2, 2021-10-25 14:13:32+00, 1635171212.3\
49997(dot)1068459(dot)nullmailer(at)[my_domain], hello world\n\n\n\n, null, f, null, \\x46726f6d2068656c6c6f776f726c642d6f776\
e65722b617263686976654062..., '2':5A 'after':3A 'archive':2A 'hello':6 'redeployment':4A 'test...).\n\n

I think the way to fix this is simply to allow message.parentid to be null.

Cheers,
--
Célestin Matte

Attachment Content-Type Size
0001-Bugfix-allow-message-s-parentid-to-be-null.patch text/x-patch 1.1 KB

Responses

Browse pgsql-www by date

  From Date Subject
Next Message Célestin Matte 2021-10-25 15:04:53 [PATCH] pgarchives: Add pglister section in archives.ini.sample
Previous Message Magnus Hagander 2021-10-23 14:30:43 Re: [PATCH] pgarchives: Fix database install procedure: remove redundant tables in schema.sql