Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fK4pV-0007gA-Tl for pgsql-general@arkaria.postgresql.org; Sat, 19 May 2018 16:35:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fK4pT-0007QL-T5 for pgsql-general@arkaria.postgresql.org; Sat, 19 May 2018 16:35:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fK4pT-0007QB-LS for pgsql-general@lists.postgresql.org; Sat, 19 May 2018 16:35:35 +0000 Received: from mail-io0-x242.google.com ([2607:f8b0:4001:c06::242]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fK4pQ-0003ye-63 for pgsql-general@postgresql.org; Sat, 19 May 2018 16:35:34 +0000 Received: by mail-io0-x242.google.com with SMTP id p124-v6so9790300iod.1 for ; Sat, 19 May 2018 09:35:31 -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:references:mime-version :content-disposition:in-reply-to:user-agent; bh=RwWX36VLOGAG11BKpUR8CRTZSUtQlrqq/MT7tqENzhQ=; b=UoTPaxmgPGqSRCjhx/JvG/kgiOhVZ7YakrZB0sInhGqzy21nB5NMU+TXDuhGtSCdwd tWAfvTeuzKttl7JVHWOwh6vPxqASDqc4yNHs1D0txMAyTFo+ExhKst39R3YNRvQa8wAh jPr0f8NFhpVtjXkwS3VGlDRQjFyN9EHyt5abeCx/Skm2QCcqeUlZvm2JSnkeIU6jKbK3 cBTb3E+7md1ZHwU1PYPex4xPxOSdS46KgqkyaPI491uyVcFHOMZkrbnxJtKCvUm+kjWM Dgof+vEjT/NMY1nrSEngjP2lTY/ZBjYCBkjp8RD9YYMWbX4HapcAKs1fvNNMogGCUgST 3k3g== 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=RwWX36VLOGAG11BKpUR8CRTZSUtQlrqq/MT7tqENzhQ=; b=iLS0b9uIWV6iu19wORXDKndY/9PZHrB3Jrz7MBysKjEW6DJ7aum+gVq9lfYtV0Z8en 3uYHTAdhl0f0Kx5+Yzzx5vqCRXRadoiokzntj/33v43B9Ed2+jM+6r69O1RH/SM3tkKR zIt0vdFkxGZWkYsHGhEVOWCz9ErM6cjYG79L+2fOcAP+9j37lIXbAAHfTZ8IECbf+OO4 mSeHVWkrxaHK8bIRDZCemU1kyBhUsQktwNdG2qhZHnitgP0phM31NbllUtk9aSBYwK74 5aiKAWNHCgOfJjWjMMcvZz/pjsxIgjYZxCYL6yPwKcmlkqL5yJN47gk1gWPzIkARLzsl LcIA== X-Gm-Message-State: ALKqPwd1TecBJleIuKvS4XfvhhU4mrVLWANiCn8JrCTSrWZWXIrZ2vw3 BcoQxWMKkPOlmUaQdvCf0/KNKt9sWFg= X-Google-Smtp-Source: AB8JxZrlmqrx9uTHeFF7xviidEOvANyzUa8jwg+NrUIFkAlaZw3TEuKHqDh/XspLqKMz3EWMB2rdhA== X-Received: by 2002:a6b:1fd2:: with SMTP id f201-v6mr15956508iof.74.1526747730219; Sat, 19 May 2018 09:35:30 -0700 (PDT) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id v18-v6sm6573454ita.19.2018.05.19.09.35.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 19 May 2018 09:35:29 -0700 (PDT) Received: by pryzbyj (Postfix, from userid 1000) id 0DAD0801727; Sat, 19 May 2018 11:35:28 -0500 (CDT) Date: Sat, 19 May 2018 11:35:28 -0500 From: Justin Pryzby To: Tom Lane Cc: pgsql-general@postgresql.org Subject: Re: postgres=# VACUUM FULL pg_statistic => ERROR: missing chunk number 0 for toast value .. in pg_toast_2619 Message-ID: <20180519163528.GD30060@telsasoft.com> References: <20180519142603.GA30060@telsasoft.com> <26735.1526742503@sss.pgh.pa.us> <20180519162457.GC30060@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180519162457.GC30060@telsasoft.com> User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Sat, May 19, 2018 at 11:24:57AM -0500, Justin Pryzby wrote: > On Sat, May 19, 2018 at 11:08:23AM -0400, Tom Lane wrote: > > Justin Pryzby writes: > > > I'll defer fixing this for awhile in case someone wants me to save a copy of > > > the relation/toast/index. From last time, I recall this just needs the right > > > combination of REINDEX/VACUUM/ANALYZE, and the only complication was me > > > needing to realize the right combination of affected DB(s). > > > > If you could come up with such a sequence that causes the problem > > reproducibly, that would be of huge interest, and probably lead to > > a fix promptly. But I don't think that we can do much by looking > > at the post-mortem state --- once the toast rows are gone, they're > > gone, especially if the table's been vacuumed since. > > This is unlikely to allow reproducing it, but for sake of completeness here's a > fuller log. I'll try to trigger on another DB. Did not take long... [pryzbyj@database ~]$ while :; do for db in `psql postgres -Atc "SELECT datname FROM pg_database WHERE datallowconn"`; do for t in pg_statistic pg_attrdef pg_constraint; do echo "$db.$t..."; PGOPTIONS=-cstatement_timeout='9s' psql $db -qc "VACUUM FULL $t"; done; done; done ... postgres.pg_statistic... postgres.pg_attrdef... postgres.pg_constraint... template1.pg_statistic... template1.pg_attrdef... template1.pg_constraint... ts.pg_statistic... ERROR: canceling statement due to statement timeout ts.pg_attrdef... ts.pg_constraint... postgres.pg_statistic... ERROR: missing chunk number 0 for toast value 3372855171 in pg_toast_2619 I'm running this again on another DB, but I wonder if that's enough for anyone else to reproduce it with some consistency ? I think that took something like 10min before failing. Justin