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 1s6rlG-002BgS-Cd for pgsql-bugs@arkaria.postgresql.org; Tue, 14 May 2024 13:00:07 +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 1s6rlG-00EOle-BZ for pgsql-bugs@arkaria.postgresql.org; Tue, 14 May 2024 13:00:06 +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.94.2) (envelope-from ) id 1s6rlG-00EOlW-3Y for pgsql-bugs@lists.postgresql.org; Tue, 14 May 2024 13:00:06 +0000 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1s6rlD-000A0j-Jq for pgsql-bugs@lists.postgresql.org; Tue, 14 May 2024 13:00:04 +0000 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2e3e18c24c1so58960241fa.1 for ; Tue, 14 May 2024 06:00:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715691602; x=1716296402; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Ww0jXJm53vPfkTLXrWhcjcUv9pBqtq1VZQ3R7giLF8A=; b=maWgEjf7FhXRtT5KdY7mnQDbZed100dSfDgVg2NXVr2badwRiEfonujWOitJaf0JZ2 NpNNuX0RHMiud6QC0us+A94ahZRXy+SWDX0E0RPdDTV733QQOh4OB5TTB9+PAiYrLhPg dfqgbxZpWy54SWInFBDVmOL1Ml0PjbMod2w1gCcEZu2FERfdNQGi4pieBGWLzy/rgE6T pVlhgUjIhLS3LqcbyRJJ1d879y3tVTcbiTuZWx6fYv1en2AqHcUz3RadqIhujPqLH7yV m3os42Tm+as27FhIcXRKKhCk8b32d0J1sZjbjkFfwyB2zJuzN25kpXI8geoA4Kaxv4sc 9bPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715691602; x=1716296402; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Ww0jXJm53vPfkTLXrWhcjcUv9pBqtq1VZQ3R7giLF8A=; b=J9Eth628YooskcSilFSsIlbTJ0Y0ry2pbSteBzCDuungSI9U/qIFaR4hB997BIbTaJ IajQ06y9t+YYNZpMF2eN+72+0eypBoQRuBzjCfehRLF2kLezGroLB6Lx+xg5Ct+HoMF5 SO4poZ8YMOYuBq53Y0fnEYpfdV7njeQI0mXOLJ22Tkp3DClXVdT51YefmSh83G16TSzA Pemi4GLX4UiUL+1YMpo+wHOHDfbQKYJWAZwJaolKNRCyMlYZMtOIpfspIe9xX4fL1LNR NQZ0pFK0K9LlSG5n3HqxAb41yQmqFZz00gOwwYuPzG/12B0tJgWSpFGkPnPfw0h4Xw2G GT9w== X-Forwarded-Encrypted: i=1; AJvYcCWRzR36/KVlEkY3i+aTPp5ON4/lNtWk53TbSwO728xTRZgLFcEejZmhR9Acw5hESHnvAbO+C1Y3PYRkpFN+W4FyumZrxzotQKMmOZDPl+tM X-Gm-Message-State: AOJu0YxVpnnDYW2+qHrdR1SC1EnzDGQWrk2+SKKK/wKHoHd170GXu+GB dw9TevC0sj/FwyLynQujgqsfWLULeQQpbSoVn5kQLifEhCVWHxmn X-Google-Smtp-Source: AGHT+IEgdVpgr3yfI5COoqPRiSFzgXzspcGdZiXs4YRFv4ctSgVLZU2ynnfGve38qW80e7UNhTSPxA== X-Received: by 2002:a2e:87cc:0:b0:2da:b59c:a94b with SMTP id 38308e7fff4ca-2e51ff4d654mr82524381fa.25.1715691601705; Tue, 14 May 2024 06:00:01 -0700 (PDT) Received: from [1.0.0.7] ([178.155.16.152]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2e4d0ef78a2sm17572721fa.72.2024.05.14.06.00.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 May 2024 06:00:01 -0700 (PDT) Message-ID: <9749e358-60e5-51e8-aa05-1eaf39ef339e@gmail.com> Date: Tue, 14 May 2024 16:00:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: BUG #18146: Rows reappearing in Tables after Auto-Vacuum Failure in PostgreSQL on Windows Content-Language: en-US To: Thomas Munro , Robert Haas Cc: Michael Paquier , Tom Lane , Laurenz Albe , rootcause000@gmail.com, pgsql-bugs@lists.postgresql.org References: <18146-04e908c662113ad5@postgresql.org> From: Alexander Lakhin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello Thomas, 23.04.2024 10:48, Thomas Munro wrote: > Related bug #18426 sent me back here. > > Here is a new attempt to see what it might take to put > RelationTruncate() into a critical section. When running 027_stream_regress on a slow machine with the aggressive autovacuum settings, having those patches applied, I've stumbled upon: TRAP: failed Assert("CritSectionCount == 0 || (context)->allowInCritSection"), File: "mcxt.c", Line: 1353, PID: 24468 ... 2024-05-14 12:30:03.542 UTC [22964:4] LOG:  server process (PID 24468) was terminated by signal 6: Aborted 2024-05-14 12:30:03.542 UTC [22964:5] DETAIL:  Failed process was running: autovacuum: VACUUM ANALYZE pg_catalog.pg_class with the following stack trace: Core was generated by `postgres: primary: autovacuum worker regression                               '. Program terminated with signal SIGABRT, Aborted. #0  __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47 (gdb) bt #0  __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47 #1  0xb63c90ae in __libc_signal_restore_set (set=0xbe99f34c) at ../sysdeps/unix/sysv/linux/internal-signals.h:84 #2  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:48 #3  0xb63bb1f2 in __GI_abort () at abort.c:79 #4  0xb6d3e2d0 in ExceptionalCondition (conditionName=, fileName=, lineNumber=lineNumber@entry=1353) at assert.c:66 #5  0xb6d61834 in palloc0 (size=3062661664) at mcxt.c:1353 #6  0xb6bcd304 in CompactCheckpointerRequestQueue () at checkpointer.c:1173 #7  ForwardSyncRequest (ftag=ftag@entry=0xbe99f7d0, type=type@entry=SYNC_REQUEST) at checkpointer.c:1113 #8  0xb6c4b3c4 in RegisterSyncRequest (ftag=ftag@entry=0xbe99f7d0, type=type@entry=SYNC_REQUEST, retryOnError=retryOnError@entry=false) at sync.c:605 #9  0xb6c48e62 in register_dirty_segment (reln=reln@entry=0xb8ec75a8, forknum=forknum@entry=MAIN_FORKNUM, seg=, seg=) at md.c:1369 #10 0xb6c4a0c6 in mdtruncate (reln=0xb8ec75a8, forknum=MAIN_FORKNUM, nblocks=45) at md.c:1229 #11 0xb6c4abe8 in smgrtruncate (reln=0xb8ec75a8, forknum=forknum@entry=0xbe99f86c, nforks=nforks@entry=2, nblocks=nblocks@entry=0xbe99f878) at smgr.c:743 #12 0xb6a3e8c6 in RelationTruncate (rel=0xb2e969a0, nblocks=nblocks@entry=45) at ../../../src/include/utils/rel.h:574 #13 0xb69b8042 in lazy_truncate_heap (vacrel=0xb8ee8f38) at vacuumlazy.c:2642 ... Best regards, Alexander