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 1kF72Q-0007wM-FF for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Sep 2020 02:37:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kF72O-0008Sk-7q for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Sep 2020 02:37:44 +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 1kF72N-0008Sd-RH for pgsql-hackers@lists.postgresql.org; Mon, 07 Sep 2020 02:37:43 +0000 Received: from mail-io1-xd36.google.com ([2607:f8b0:4864:20::d36]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kF72K-0000oU-Rx for pgsql-hackers@postgresql.org; Mon, 07 Sep 2020 02:37:42 +0000 Received: by mail-io1-xd36.google.com with SMTP id g128so12507373iof.11 for ; Sun, 06 Sep 2020 19:37:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=HFsQPwJtmxzd/Y+wc8289Mtp85vTQBMOm/fTzhCaQso=; b=kllafxHZu2FQr/ufpLpuVF2+ul/Vn9muZafT9lpDB8EyVL+1RHJM13ZMNyUUsDay3j aXCyIC8MJD8vd+IFtlvSiCLu9BDmUrAsZzwE/L81PT6XMVfjhDv18qezEzBFW7tJc9oX uXyPh3bb8JoIsnPwmlXhs92IsqNRAOT0F2JJxuJR8JTGyI73dDnI+IpbB6h7olro1Q2F XT0sahcv0tEkrmlMbzePSLbvpE5ARX70e3ennW0dQTey2BEN9fZCfnN3Y4z2oCGfBymz 1yk7f6d8V3KKBjDx596eSu5PXfpSoZD27O6ELfoDSufiYe/2ZgbBowfoQklNvzFa0xJD 56CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=HFsQPwJtmxzd/Y+wc8289Mtp85vTQBMOm/fTzhCaQso=; b=GJNi4KQF9d6G4YJktmMu3IS6urd8zXgx9Gu2R58Xei1jDB6FOLkzbTNqDu6sXvQBpD LHSejBAz8mg4k68IGHtud9mbwztoEMAa+zH7RAODpelfsdAaE8+6MkcrjQtcmgzgc0hO rFA4SpuA+AS1mfMI184OYxL7JsrIQVVHn7as2tCUWdadGwso8TZAr6USBqCmcXgKJ7Fx 9IdO1YmF9lMqEVjOhSa9Z+yyrtk8HUHogbvDnlVJwP4epRr55xLQzeoUA0zY/fFMyzh/ n4tKr4Mf5zCughVVcJFWyTXPBQ8N9jZwaYyEux/Mq2jT/k0EeYsOdTi8ASEhjPsb2l1g vG6Q== X-Gm-Message-State: AOAM533fThrLeakAwmsO0xOoOPp+KPJ/W2P7ge13ph4QDN53HZZUuTIE UtmEAUK1gS/K6NmCi0ihGHSR4A== X-Google-Smtp-Source: ABdhPJy4+oe+/uvHiNZEFoXonkeynbnTPrudYoHfi0qSQ7TenVFmRuDhA4M6prnN+B6mNnMh4gVeBQ== X-Received: by 2002:a02:820b:: with SMTP id o11mr17911725jag.136.1599446259326; Sun, 06 Sep 2020 19:37:39 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id b23sm6437160ios.39.2020.09.06.19.37.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Sep 2020 19:37:38 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 9BEAD80064B; Sun, 6 Sep 2020 21:37:37 -0500 (CDT) Date: Sun, 6 Sep 2020 21:37:37 -0500 From: Justin Pryzby To: pgsql-hackers@postgresql.org Cc: Noah Misch , Kyotaro Horiguchi Subject: v13: CLUSTER segv with wal_level=minimal and parallel index creation Message-ID: <20200907023737.GA7158@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Following a bulk load, a CLUSTER command run by a maintenance script crashed. This is currently reproducible on that instance, so please suggest if I can provide more info. < 2020-09-06 15:44:16.369 MDT >LOG: background worker "parallel worker" (PID 2576) was terminated by signal 6: Aborted < 2020-09-06 15:44:16.369 MDT >DETAIL: Failed process was running: CLUSTER pg_attribute USING pg_attribute_relid_attnam_index The crash happens during: ts=# REINDEX INDEX pg_attribute_relid_attnum_index; ..but not: ts=# REINDEX INDEX pg_attribute_relid_attnam_index ; pg_catalog | pg_attribute_relid_attnam_index | index | postgres | pg_attribute | permanent | 31 MB | pg_catalog | pg_attribute_relid_attnum_index | index | postgres | pg_attribute | permanent | 35 MB | I suspect |commit c6b92041d Skip WAL for new relfilenodes, under wal_level=minimal. In fact, I set wal_level=minimal for the bulk load. Note also: override | data_checksums | on configuration file | checkpoint_timeout | 60 configuration file | maintenance_work_mem | 1048576 configuration file | max_wal_senders | 0 configuration file | wal_compression | on configuration file | wal_level | minimal configuration file | fsync | off configuration file | full_page_writes | off default | server_version | 13beta3 (gdb) bt #0 0x00007ff9999ad387 in raise () from /lib64/libc.so.6 #1 0x00007ff9999aea78 in abort () from /lib64/libc.so.6 #2 0x0000000000921da5 in ExceptionalCondition (conditionName=conditionName@entry=0xad4078 "relcache_verdict == RelFileNodeSkippingWAL(relation->rd_node)", errorType=errorType@entry=0x977f49 "FailedAssertion", fileName=fileName@entry=0xad3068 "relcache.c", lineNumber=lineNumber@entry=2976) at assert.c:67 #3 0x000000000091a08b in AssertPendingSyncConsistency (relation=0x7ff99c2a70b8) at relcache.c:2976 #4 AssertPendingSyncs_RelationCache () at relcache.c:3036 #5 0x000000000058e591 in smgrDoPendingSyncs (isCommit=isCommit@entry=true, isParallelWorker=isParallelWorker@entry=true) at storage.c:685 #6 0x000000000053b1a4 in CommitTransaction () at xact.c:2118 #7 0x000000000053b826 in EndParallelWorkerTransaction () at xact.c:5300 #8 0x000000000052fcf7 in ParallelWorkerMain (main_arg=) at parallel.c:1479 #9 0x000000000076047a in StartBackgroundWorker () at bgworker.c:813 #10 0x000000000076d88d in do_start_bgworker (rw=0x23ac110) at postmaster.c:5865 #11 maybe_start_bgworkers () at postmaster.c:6091 #12 0x000000000076e43e in sigusr1_handler (postgres_signal_arg=) at postmaster.c:5260 #13 #14 0x00007ff999a6c983 in __select_nocancel () from /lib64/libc.so.6 #15 0x00000000004887bc in ServerLoop () at postmaster.c:1691 #16 0x000000000076fb45 in PostmasterMain (argc=argc@entry=3, argv=argv@entry=0x237d280) at postmaster.c:1400 #17 0x000000000048a83d in main (argc=3, argv=0x237d280) at main.c:210 (gdb) bt f ... #4 AssertPendingSyncs_RelationCache () at relcache.c:3036 status = {hashp = 0x23cba50, curBucket = 449, curEntry = 0x0} locallock = rels = 0x23ff018 maxrels = nrels = 0 idhentry = i = #5 0x000000000058e591 in smgrDoPendingSyncs (isCommit=isCommit@entry=true, isParallelWorker=isParallelWorker@entry=true) at storage.c:685 pending = nrels = 0 maxrels = 0 srels = 0x0 scan = {hashp = 0x23edf60, curBucket = 9633000, curEntry = 0xe01600 } pendingsync = #6 0x000000000053b1a4 in CommitTransaction () at xact.c:2118 s = 0xe01600 latestXid = is_parallel_worker = true __func__ = "CommitTransaction"