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 1icOr0-00005m-6P for pgsql-general@arkaria.postgresql.org; Wed, 04 Dec 2019 07:13:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1icOqw-0008EQ-Nj for pgsql-general@arkaria.postgresql.org; Wed, 04 Dec 2019 07:13:38 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1icOqw-0008EI-Ax for pgsql-general@lists.postgresql.org; Wed, 04 Dec 2019 07:13:38 +0000 Received: from mail-oi1-x243.google.com ([2607:f8b0:4864:20::243]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1icOqo-0004U3-FS for pgsql-general@lists.postgresql.org; Wed, 04 Dec 2019 07:13:37 +0000 Received: by mail-oi1-x243.google.com with SMTP id v140so5815955oie.0 for ; Tue, 03 Dec 2019 23:13:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=HIu5bPJ0t2S2FNO4TRzvESQrt+DmS4v3PP6nkUZYBJc=; b=CLm56D+jW172moNV8gDGbbo5gDZ4V+0Pd9LKXJyWK0J1NBm/aQ4SpeIIqvJ1L5mTHg UnsySL4qxXYSnPodE3VrhacRWVIWYdRzJc7HIAhfqRZWIpIqsMlE/XkJIOBpeXr3OgPZ zCNZg622s38+46UQFx5mcidCJrpqDBGNHHVtWk5jmkmRmZhKptPHkcKsnMh8vyHiuRLi XRkgPV8lq6iHAeNJL4D//xoTqkjvsvICCTG50tzrBFaqjaNo1QfQLh2xbg0nwQUPDQ+r qA6w5XCx1zd+yg26e5Fb4nxaORarzc4Wdf3m2VjujL/4JzAriXBKkqQQX7fHjMX4A5Uc u0Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=HIu5bPJ0t2S2FNO4TRzvESQrt+DmS4v3PP6nkUZYBJc=; b=jBnkbARhHLgqPiU5+YPSBgBUF8iBSGPToA9Dq5iejXLY+MpmnDI92nhkMGhYgUTg3t 072jL3Ar9tmgv20aFP4t7Z7Rle1xNhWCDADiqMBdxwrreuxwWGG64tWKykOVV0T6mQDh F5FWNTdN1ziJu0VVvheU1u/mWP5yeb66IeNmsGc61cEvfygxCda3t7L3IKsEeo/2eudO qc4/bL23bTpPdQEeHUEbqg74DEJy/pNL/67+2hFb7xu7crxr9nlkYla4imfoKhdIqiEV 3zZZuEdtfncbKGrt2ImN8BE3RfTbDhVrRlCUkriGNecGiUwyLvNwYc2ii7wppCjCaOcu ShXA== X-Gm-Message-State: APjAAAVxiULb25rGRghoomawRtu5gqpAUdOnkeRiTgT6G/gdDYI8R9bh 2ghRfHCRcSZ4hUaVeuONxK5l3o3uu4E= X-Google-Smtp-Source: APXvYqzDFYfku7HDkNpqOB/0gfEYOOoBvtYB2AxkQPyBrXnc/EqQ8iVXhAk/Lon5SW2qcJ1x2PEDvw== X-Received: by 2002:aca:554d:: with SMTP id j74mr1485791oib.92.1575443607896; Tue, 03 Dec 2019 23:13:27 -0800 (PST) Received: from [192.168.1.10] (ip70-186-126-197.no.no.cox.net. [70.186.126.197]) by smtp.googlemail.com with ESMTPSA id w123sm2017216oiw.47.2019.12.03.23.13.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Dec 2019 23:13:27 -0800 (PST) Subject: Re: upgrade and migrate To: pgsql-general@lists.postgresql.org References: <20191204044843.GD2381@paquier.xyz> From: Ron Message-ID: <5680bbda-f9a0-24bb-9554-a485d0449aeb@gmail.com> Date: Wed, 4 Dec 2019 01:13:26 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191204044843.GD2381@paquier.xyz> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 12/3/19 10:48 PM, Michael Paquier wrote: > On Tue, Dec 03, 2019 at 10:32:22PM +0000, Julie Nishimura wrote: >> Hello, what is the best way to migrate from PostgreSQL 8.3.11 on >> x86_64-redhat-linux-gnu to PostgreSQL 9.6.16 on x86_64-pc-linux-gnu >> server, with minimal downtime? >> The caveat is the source has about 80 databases overall almost 30 >> TB. I could migrate the smallest ones (up to 1 tb) using pg_dump and >> pg_restore, but the largest hot database is almost 17 tb, and I am >> not sure how to approach this effort in a better and efficient way? > pg_upgrade could be one way to go here. That's not the scale pg_dump > would be very good at. I would have personally avoided using pg_dump > above 10~20GB. I've successfully migrated three 1-2 TB databases across data centers in about 12 hours each, from 8.4 to 9.6.  Used eight threads, and the 9.6 pg_dump against the 8.4 database.  17TB is a "bridge too far", though... > Depending on the downtime you are ready to accept, > a migration based on Slony could be something to investigate. > -- > Michael -- Angular momentum makes the world go 'round.