Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hNem4-0006zY-DA for pgsql-admin@arkaria.postgresql.org; Mon, 06 May 2019 14:39:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hNem2-0008Ij-Gi for pgsql-admin@arkaria.postgresql.org; Mon, 06 May 2019 14:39:22 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hNem2-0008Ex-3N for pgsql-admin@lists.postgresql.org; Mon, 06 May 2019 14:39:22 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hNelv-0006OT-AM for pgsql-admin@postgresql.org; Mon, 06 May 2019 14:39:20 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 622992016D; Mon, 6 May 2019 10:39:14 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 06 May 2019 10:39:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=ZN60P5kvx1SU46b5+rAsHZsEhhV IfYng9MI8CoEN5LU=; b=IIHFbq6LdO1m+Fju+U6qHy7zp58m34y9P3qRM6NJ/UO BOgEO7gJs0c/Q1sT8z+zPygS726OYOVbU61pt9YYCM1sbTH5BIAybMESgGt6NqAV qWGC7x0BujDm9Ms9IvIx3Mm/ao2VBN5XO8rh+tCNuLwlM5/ZrVwqctcz2IDiW1Ir SmambE2yJ+BU5uuajmY60shPgpu8qvV9f8SExqAxGf5+gCHcD/vIWf/f1SQDanAP VKZCiWFWySPNWgVGb9tpNb0PL9mOjfN9M0+PJRfqztxKjkK8triJYSvFfS7EG26r 9Atxjzx0PDQwfMBPa5AG/nUnZJbLiG46b8F5xOYiDjA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=ZN60P5 kvx1SU46b5+rAsHZsEhhVIfYng9MI8CoEN5LU=; b=gY/KWp/EsA7Z4hW+pg9IAY vftgpS4SJZFnhPSI5tTKBPUSDRALmswDHP4rlZmSqa3Y4dGHn77qWtoLctedRnTw zK08EIMDLtnQU37SvAwBFcvtMqIeIl8oWvfWsqQbzwiusEjwougJwZl/t7K6UZ83 ub0LTLOZl9GArS4IeDel2wmd3qtn/GWD8utoKur+FoC3XAXGMYPirgwz9XuGZJWS Yx7G1kY0OCWerpL1oFZv/qnG1tdLOX1TLi+SXau4aZfJVh/bqsQp6fbQe5+q7jwz Fr98nG7FnzrrSBqo0YVA2KoOM/vs5OQNnCdoJ5jDJ48S/CaJczlDjX4+9HURq8UQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrjeejgdekudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughrvghs ucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecukfhppeelke drvddutddrudegtddrudejudenucfrrghrrghmpehmrghilhhfrhhomheprghnughrvghs segrnhgrrhgriigvlhdruggvnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from intern.anarazel.de (c-98-210-140-171.hsd1.ca.comcast.net [98.210.140.171]) by mail.messagingengine.com (Postfix) with ESMTPA id B519D103CB; Mon, 6 May 2019 10:39:13 -0400 (EDT) Date: Mon, 6 May 2019 07:39:12 -0700 From: Andres Freund To: Siddharth Karandikar Cc: pgsql-admin@postgresql.org Subject: Re: Restoring from PostgreSQL 9.5 dump to 10 is super slow Message-ID: <20190506143912.4x6qmyvbktyya75p@alap3.anarazel.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2019-05-06 16:54:08 +0530, Siddharth Karandikar wrote: > I am trying to restore database dump created on PostgreSQL 9.5.16 to > PostgreSQL 10.7 and it is taking a lot of time to restore. Restoring > the same dump to 9.5 doesn't take that much. So I am wondering what > could be reason behind this slowness. Is there any chance the configuration is different between 9.5 and 10? If there e.g. is an index on the table, the maintanance_work_mem setting would make a large differerence when rebuilding. Note that the medium-tablecase is noticably faster in 10 and that there's been some speedup work around that in 10. > > Postgres configuration that I have on this setup: > shared_buffers = 128MB > > work_mem = 1MB > maintenance_work_mem = 16MB maintenance_work_mem = 16Mb is a very low value - it's e.g. used for index builds, to sort the data. Greetings, Andres Freund