Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eixXr-0007oD-RV for pgsql-general@arkaria.postgresql.org; Tue, 06 Feb 2018 07:19:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eixXq-0004Mg-N1 for pgsql-general@arkaria.postgresql.org; Tue, 06 Feb 2018 07:19:58 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eixXq-0004MW-BL for pgsql-general@lists.postgresql.org; Tue, 06 Feb 2018 07:19:58 +0000 Received: from mail-io0-x243.google.com ([2607:f8b0:4001:c06::243]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eixXn-00045L-GR for pgsql-general@postgresql.org; Tue, 06 Feb 2018 07:19:56 +0000 Received: by mail-io0-x243.google.com with SMTP id d13so1443496iog.5 for ; Mon, 05 Feb 2018 23:19:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=pY94JqBVTUhFinYAbeRTlGTZYkASHadmIkuJm0SajC0=; b=jZm/LKHZhjBqc6D/MRw+f1kF+4QmlSjWJMj5e3OYmUohL9QohfNwLEW8djrywY1wMx p+pU6zhFZzOvimA+LulFM3tX6UHZhbSRzPF3VldMcLaajCpZTa9tiCqR8eWZzoBfex+e rLJOTMjoJPukgs5TutcdMKbSggV6ItOr6S1e3bsqZjBwu+5OcqgMjgdRy9SKqoHgMUXH 96WDq1iSydvnD+kJMBv07cpDLQ6zaVzX9qz1FBHijkuMPoarM4Fz0NUmNplp3exdQXmN P3qjHKztMANabnPHwX7bQagCl0/zApKrZdfI5yN2egVPVC3mnjhZzyHbyeks7nB+lCD2 Xj1w== 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; bh=pY94JqBVTUhFinYAbeRTlGTZYkASHadmIkuJm0SajC0=; b=acI3/85RbhFTWNPEh1wBKzV2FfF787oh0uvvwyyYHFdlotHQEvWFJdDJT3pQStMQ8m WevRHx4/WOWwczBdacgRZGe28c0sPeZH3BnjkzwqUQUWUVmZPL1fk/SLtRKtyWCZsSV0 fCAH3503kREfK/VhwGkDLWkvqZuvXxi6BBjcl2oybOBUthQmS5nCN6csigBi2f9tyZWv w1PIdpPSXUxqQ+t90LFAm5NdlEsy4cKr7sDBaDu3o28kSwTfY+7DIGmPgi3RwUOEAu3h TX2d8wpR7t9r5oOZn+HcYPXiFyVkopFlhENR/6gH3SWFIhZ6kvXYln6/yajbLcebtPUe UbUg== X-Gm-Message-State: APf1xPBirVCD6PhU5vKC3Vl8Wqo64ObwjxYbfKhIRIj+rYBl3i2TGaR6 f1ZUC+Y/jNSpgbxH2feVC9NOGQ== X-Google-Smtp-Source: AH8x225T99CbDqvcXAmjXWNtC0RD5DgSZjgbquZIOWDWKLVteRTnEljbTLw0PpIDXQeGvkO+Z2wmhw== X-Received: by 10.107.180.207 with SMTP id d198mr1833450iof.187.1517901594187; Mon, 05 Feb 2018 23:19:54 -0800 (PST) Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp. [61.215.137.162]) by smtp.gmail.com with ESMTPSA id k134sm6501820itb.34.2018.02.05.23.19.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Feb 2018 23:19:53 -0800 (PST) Date: Tue, 6 Feb 2018 16:19:48 +0900 From: Michael Paquier To: Jeremy Finzel Cc: Postgres General Subject: Re: Alter table set logged hanging after writing out all WAL Message-ID: <20180206071948.GC74355@paquier.xyz> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="UfEAyuTBtIjiZzX6" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --UfEAyuTBtIjiZzX6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 06, 2018 at 12:50:56AM -0600, Jeremy Finzel wrote: > The table I am setting to logged is 32GB with indexes. I see it writing > WAL files like crazy but after about an hour and a half, it has written o= ut > some 2500 WAL segments, then it just sits and continues to run as "active= ", > but no more WAL files are being created. There are no locks, and no other > transactions in the system running. Switching an unlogged table to be logged causes an entire image of the table to be WAL-logged so as the operation is consistent in case of a crash.=20 > Any ideas? Is it still doing something that I need to wait for? Do you have a backtrace with the process doing the ALTER TABLE hanging? How is structured you table with its indexes? It is a bit hard to guess much without more information. -- Michael --UfEAyuTBtIjiZzX6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlp5VxQACgkQnvQgOdby QH2YvQ/+PX+YF+4z9M+65RjPm2oawq3Jim+CR9Qz/Yo+1a5wbY+218N6hpeT2NmK oSVdAvYsA0olt9aeZAOcBYX/w5aEwuU6jOpXb2p7I6juLPKcRwrVgtte+RYphJSV nmPeptLgI+3e9cYq7ISB2Eta4+MhCdZcqlXYPUkYKgdFVSHBLIB3Q1mQHR1/0j7h S+7vXcujPxbAQX21c12Vxwfal/VUGOUiHRP5O0zQmcSFtH0QGN2H8htkvWQ/x+Pr 7eSWWQBNY+Ac758pqMjRI+2CUBraZvS2mq4dDfD5cj01iBfGzTp6mQ6IDlGZEOel hC6gJStK8fkb1F9DzHfCm+0tyhH7RIrGnMZhqycyvPwbOfhz+zSHowJ8joWpQ6+h nn0gLgw/uVHIxZg9D3sVVP1zHPfqz70EhibMifTrTYoo3BUPCy5QebGtcnVdO80J 2QJPo/VBKRmtnkyeWHYMMw96FncTKcY5wiGQugfyz8iRR6ubRJe98NYtO47pmiN/ RVEnZAWQOL9f8058Z9M6famkO3319Iyl8EiofroknQfll9vwzxAjzAgnPKw04VAk F3PQXw8uytNqXgnbKEruvQYVBzEBagqP4zTONgxpCODhk0jZnazljX/Lv7GsFGll WzhLj/83VRRUdzGKTHhCsWfTj2aLvVXO2PeZbs/SYyJMCplQoBY= =uCmG -----END PGP SIGNATURE----- --UfEAyuTBtIjiZzX6--