On 2025-07-17 13:36, Mark Felder wrote:
On Jul 14, 2025, at 15:15, Arnt Gulbrandsen<[email protected]> wrote:

FWIW If I hadn't fallen ill a few months ago, I expect that Abhijit and I would 
have made a new release on the anniversary of the two previous ones. I had 
booked tickets to visit him, and the visit spanned that day. Oh well. A release 
might still happen, when I feel that the code I have is nice, but not on any 
anniversary.

No worries, take care of yourself! I've had a few people hesitate to try Aox because the 
last "release" was so long ago that they felt it was insecure or abandonware, 
but honestly it's amazing how resilient this software has been over the years. I think 
it's a testament to good engineering principals and avoiding needless complexity. A new 
release would be very welcomed though :)


I have encountered the long query again

select mm.uid, mm.modseq, mm.message from mailbox_messages mm join part_numbers pn on 
(pn.message=mm.message) join bodyparts bp on (bp.id=pn.bodypart) left join 
address_fields af1 on (af1.message=mm.message) left join addresses a1 on 
(a1.id=af1.address and ((af1.field=1 or af1.field=7 or af1.field=8) and 
(lower(a1.name) like '%'||$2||'%' or lower(a1.localpart) like '%'||$2||'%' or 
lower(a1.domain) like '%'||$2||'%'))) left join header_fields hf2 on 
(mm.message=hf2.message and hf2.part='' and (octet_length(hf2.value)<640000 and 
to_tsvector('simple'::regconfig, hf2.value) @@ plainto_tsquery($2) and hf2.value 
ilike '%'||$2||'%') and hf2.field=20) left join address_fields af3 on 
(af3.message=mm.message) left join addresses a3 on (a3.id=af3.address and 
((af3.field=1 or af3.field=7 or af3.field=8) and (lower(a3.name) like '%'||$3||'%' or 
lower(a3.localpart) like '%'||$3||'%' or lower(a3.domain) like '%'||$3||'%'))) left 
join header_fields hf4 on (mm.message=hf4.message and hf4.part='' and 
(octet_length(hf4.value)<


According to pg_stat_activity, the backend_start is "2025-07-17 15:32:34.018624 +00:00" 
but the curent date is "2025-07-17 17:34:14" so it has been running for a few hours now.

I see something like this a few times per day; I've also been successfully running regular pg_dumps ever since I implemented the timeout (2 minutes seems fine, no user complaints)

Aug 19 22:22:32 MTL-NTL-PG8 postgres[50107]: [6345959-1] ERROR:  canceling statement due to statement timeout Aug 19 22:22:32 MTL-NTL-PG8 postgres[50107]: [6345959-2] STATEMENT:  select mm.uid, mm.modseq, mm.message from mailbox_messages mm join part_numbers pn on (pn.message=mm.message) join Aug 19 22:22:32 MTL-NTL-PG8 postgres[50107]: [6345959-3]  bodyparts bp on (bp.id=pn.bodypart) left join header_fields hf2 on (mm.message=hf2.message and ((hf2.field=20 and hf2.value Aug 19 22:22:32 MTL-NTL-PG8 postgres[50107]: [6345959-4]  ilike '%'||$2||'%'))) left join header_fields hf4 on (mm.message=hf4.message and ((hf4.field=20 and hf4.value ilike Aug 19 22:22:32 MTL-NTL-PG8 postgres[50107]: [6345959-5]  '%'||$4||'%'))) left join header_fields hf6 on (mm.message=hf6.message and ((hf6.field=20 and hf6.value ilike '%'||$2||'%'))) Aug 19 22:22:32 MTL-NTL-PG8 postgres[50107]: [6345959-6]  left join header_fields hf8 on (mm.message=hf8.message and ((hf8.field=20 and hf8.value ilike '%'||$4||'%'))) left join Aug 19 22:22:32 MTL-NTL-PG8 postgres[50107]: [6345959-7]  header_fields hf10 on (mm.message=hf10.message and ((hf10.field=20 and hf10.value ilike '%'||$6||'%'))) left join Aug 19 22:22:32 MTL-NTL-PG8 postgres[50107]: [6345959-8]  address_fields af1 on (af1.message=mm.message) left join addresses a1 on (a1.id=af1.address and ((af1.field=1 or af1.field=7 or Aug 19 22:22:32 MTL-NTL-PG8 postgres[50107]: [6345959-9]  af1.field=8) and (lower(a1.name) like '%'||$3||'%' or lower(a1.localpart) like '%'||$3||'%' or lower(a1.domain) like Aug 19 22:22:32 MTL-NTL-PG8 postgres[50107]: [6345959-10]  '%'||$3||'%'))) left join address_fields af3 on (af3.message=mm.message) left join addresses a3 on (a3.id=af3.address and Aug 19 22:22:32 MTL-NTL-PG8 postgres[50107]: [6345959-11]  ((af3.field=1 or af3.field=7 or af3.field=8) and (lower(a3.name) like '%'||$4||'%' or lower(a3.localpart) like '%'||$4||'%' or Aug 19 22:22:32 MTL-NTL-PG8 postgres[50107]: [6345959-12]  lower(a3.domain) like '%'||$4||'%'))) left join address_fields af5 on (af5.message=mm.message) left join addresses a5 on Aug 19 22:22:32 MTL-NTL-PG8 postgres[50107]: [6345959-13]  (a5.id=af5.address and ((af5.field=1 or af5.field=7 or af5.field=8) and (lower(a5.name) like '%'||$3||'%' or Aug 19 22:22:32 MTL-NTL-PG8 postgres[50107]: [6345959-14]  lower(a5.localpart) like '%'||$3||'%' or lower(a5.domain) like '%'||$3||'%'))) left join address_fields af7 on Aug 19 22:22:32 MTL-NTL-PG8 postgres[50107]: [6345959-15]  (af7.message=mm.message) left join addresses a7 on (a7.id=af7.address and ((af7.field=1 or af7.field=7 or af7.field=8) and Aug 19 22:22:32 MTL-NTL-PG8 postgres[50107]: [6345959-16]  (lower(a7.name) like '%'||$4||'%' or lower(a7.localpart) like '%'||$4||'%' or lower(a7.domain) like '%'||$4||'%'))) left join Aug 19 22:22:32 MTL-NTL-PG8 postgres[50107]: [6345959-17]  address_fields af9 on (af9.message=mm.message) left join addresses a9 on (a9.id=af9.address and ((af9.field=1 or af9.field=7 or Aug 19 22:22:32 MTL-NTL-PG8 postgres[50107]: [6345959-18]  af9.field=8) and lower(a9.name) like '%'||$5||'%')) where mm.mailbox=$1 and not mm.deleted and (((bp.text ilike '%'||$2||'%' or Aug 19 22:22:32 MTL-NTL-PG8 postgres[50107]: [6345959-19]  a1.id is not null or hf2.field is not null) and (bp.text ilike '%'||$4||'%' or a3.id is not null or hf4.field is not null)) or Aug 19 22:22:32 MTL-NTL-PG8 postgres[50107]: [6345959-20]  ((bp.text ilike '%'||$2||'%' or a5.id is not null or hf6.field is not null) and (bp.text ilike '%'||$4||'%' or a7.id is not Aug 19 22:22:32 MTL-NTL-PG8 postgres[50107]: [6345959-21]  null or hf8.field is not null)) or a9.id is not null or hf10.field is not null) and mm.uid=any($7)


Reply via email to