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 1fK4fO-0006wV-Hn for pgsql-general@arkaria.postgresql.org; Sat, 19 May 2018 16:25:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fK4fJ-0002Qo-DH for pgsql-general@arkaria.postgresql.org; Sat, 19 May 2018 16:25:05 +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 1fK4fJ-0002Qe-5K for pgsql-general@lists.postgresql.org; Sat, 19 May 2018 16:25:05 +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 1fK4fF-0003gX-Nh for pgsql-general@postgresql.org; Sat, 19 May 2018 16:25:04 +0000 Received: by mail-io0-x242.google.com with SMTP id e12-v6so9764143iob.8 for ; Sat, 19 May 2018 09:25:01 -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=IqZJkc9jZ0aSoTvjepashC/FhBlgwKBTrk2Tp0+GLpc=; b=ZqzkFwzB4Rm3cLNFC/GgCy/5UTzKGGLBBxNeCiJJThoemI/H4Yb1QwL1K0Vc6ZUxDv htkh03YPtbH2dpa07kXRg/2HHT51T2uqPkgQBMr56vDpVqDbGLmp+cw+2wIckiPcPdLh iLxjwVwU+XGgsFcPbcoqGRxXZPLa01yuV1TK2UKXVA1gnYIYPunnBLygwX3aRGn6n74L +7sy0QHlq5XazGMvhqlydPXvrcaola/TgW6lJcab9KYFt9QonLY9zDpwfmXVGR+oYMZC RF0LFankC8GNU5duue/hh8BZ7zUbr6HCT74tY3WNGXGl2iRt57sJZpi7WgDrRW4vMTNd w/kA== 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=IqZJkc9jZ0aSoTvjepashC/FhBlgwKBTrk2Tp0+GLpc=; b=cDRqS9XJ/iY2vIBXV6iAM10FLuVsGVCaW8XwvOtWjj3qPz7UREorbtkQy1IqNk7piK jyCipwr1eIt+c2qk8HE2DHshE3KBT9vr9st5BiADyxOxqpR9PHQczf9xtWYwvikQuvCq LTUgv1AeoJnocoQFlBsGWYiYC1XolCa6jBKsJBERL9z2wyao52VCnZgpkYsxVIbZtvUN feGyQX9O+pxOPMEBZtQF0RuSy5T40546liI3o127d0scPIkfmOWoiR9FX7HSNreVjJ8g KMouFAecCYZ95INWCxDxyowvkHkMmMQXnzOxtwrlYaJpI2udmsEOgJTK/v8SyepSP1SU 5XjQ== X-Gm-Message-State: ALKqPwdk7MZv31cglbshrpqgIQoWz1pDJtF9JRXDmrDm24J1YzN4cJrl Gc4Drq5BJLb+iOm+zr1fRJg5u6rJrIc= X-Google-Smtp-Source: AB8JxZosUMg/PTCkHsJ04axEZFdF15h/gL120pag5olqjtnAZuJFPNxxngyl/nlX3GVSGC4mtkb8Ug== X-Received: by 2002:a6b:2b87:: with SMTP id r129-v6mr14699857ior.177.1526747099196; Sat, 19 May 2018 09:24:59 -0700 (PDT) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id f22-v6sm6064991ioi.61.2018.05.19.09.24.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 19 May 2018 09:24:58 -0700 (PDT) Received: by pryzbyj (Postfix, from userid 1000) id A20BE801727; Sat, 19 May 2018 11:24:57 -0500 (CDT) Date: Sat, 19 May 2018 11:24:57 -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: <20180519162457.GC30060@telsasoft.com> References: <20180519142603.GA30060@telsasoft.com> <26735.1526742503@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <26735.1526742503@sss.pgh.pa.us> 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: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. postgres=# SELECT log_time, database, session_id, left(message,99) FROM postgres_log WHERE log_time BETWEEN '2018-05-19 07:49:01' AND '2018-05-19 07:50' AND (database IS NULL OR database='postgres') ORDER BY 1 ; 2018-05-19 07:49:02.232-06 | | 5afbc238.382f | checkpoint complete: wrote 32175 buffers (6.1%); 0 WAL file(s) added, 0 removed, 8 recycled; write= 2018-05-19 07:49:02.261-06 | postgres | 5b002b4e.65f2 | statement: SHOW server_version 2018-05-19 07:49:02.278-06 | postgres | 5b002b4e.65f7 | statement: SELECT pg_get_indexdef('jrn_postgres_log_log_time_idx'::regclass) 2018-05-19 07:49:02.29-06 | postgres | 5b002b4e.65f9 | statement: SELECT 1 FROM information_schema.tables WHERE table_name='postgres_log' LIMIT 1 2018-05-19 07:49:02.311-06 | postgres | 5b002b4e.65fb | statement: SELECT 1 FROM pg_class WHERE relname='jrn_postgres_log' 2018-05-19 07:49:02.324-06 | postgres | 5b002b4e.65fd | statement: SELECT 1 FROM pg_class WHERE relname='jrn_postgres_log_unique_idx' 2018-05-19 07:49:02.338-06 | postgres | 5b002b4e.65ff | statement: SELECT 1 FROM pg_class WHERE relname='jrn_postgres_log_log_time_idx' 2018-05-19 07:49:02.353-06 | postgres | 5b002b4e.6601 | statement: SELECT 1 FROM pg_class WHERE relname='jrn_postgres_log_error_severity_idx' 2018-05-19 07:49:02.37-06 | postgres | 5b002b4e.6603 | statement: SELECT 1 FROM pg_class WHERE relname='jrn_postgres_log_message_system_idx' 2018-05-19 07:49:02.39-06 | postgres | 5b002b4e.6605 | statement: SELECT 1 FROM pg_class WHERE relname='jrn_postgres_log_error_message_idx' 2018-05-19 07:49:02.405-06 | postgres | 5b002b4e.6607 | statement: SELECT 1 FROM pg_class WHERE relname='jrn_postgres_log_duration_idx' 2018-05-19 07:49:02.422-06 | postgres | 5b002b4e.6609 | statement: SELECT 1 FROM pg_class WHERE relname='jrn_postgres_log_quotedquoted_idx' 2018-05-19 07:49:02.464-06 | postgres | 5b002b4e.6619 | statement: SELECT 1 FROM pg_class WHERE relname='postgres_log_2018_05_19_0700' 2018-05-19 07:49:02.482-06 | postgres | 5b002b4e.661c | statement: COPY postgres_log_2018_05_19_0700 FROM '/var/log/postgresql/postgresql-2018-05-19_074617 2018-05-19 07:49:04.711-06 | postgres | 5b002b50.6627 | statement: SELECT 1 FROM pg_class WHERE relname='postgres_log_2018_05_19_0700' 2018-05-19 07:49:04.724-06 | postgres | 5b002b50.662a | statement: COPY postgres_log_2018_05_19_0700 FROM '/var/log/postgresql/postgresql-2018-05-19_074643 2018-05-19 07:49:06.803-06 | postgres | 5b002b52.6637 | statement: SELECT pg_get_indexdef('jrn_postgres_log_duration_idx'::regclass) 2018-05-19 07:49:06.837-06 | postgres | 5b002b52.6639 | statement: SELECT inhrelid::regclass::text FROM pg_inherits i LEFT JOIN pg_constraint c ON i.inhrel 2018-05-19 07:49:06.867-06 | postgres | 5b002b52.663b | statement: SELECT inhrelid::regclass::text FROM pg_inherits WHERE inhparent='postgres_log'::regclas 2018-05-19 07:49:06.918-06 | postgres | 5b002b52.6641 | statement: SELECT log_time