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 1gwcNg-0005lG-5z for pgsql-admin@arkaria.postgresql.org; Thu, 21 Feb 2019 00:38:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gwcNf-0004Cs-0s for pgsql-admin@arkaria.postgresql.org; Thu, 21 Feb 2019 00:38:27 +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 1gwcNe-0004Cl-KP for pgsql-admin@lists.postgresql.org; Thu, 21 Feb 2019 00:38:26 +0000 Received: from mail-it1-x142.google.com ([2607:f8b0:4864:20::142]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gwcNb-00050O-UW for pgsql-admin@lists.postgresql.org; Thu, 21 Feb 2019 00:38:25 +0000 Received: by mail-it1-x142.google.com with SMTP id e24so6246602itl.1 for ; Wed, 20 Feb 2019 16:38:23 -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=TzhbgAIZ0X+Y/zKZLoWJmjGNmMSLTn1kyQe14qSFr6s=; b=A1j870647R48YylYUmYk0mdaPkTJkxJA8yfDvhUgfH+t30JzdNNx3U7VjnFOZnk1Lt V8fAQjhWRsJH2KJaWSuHtynTGkqKSszSEBbnPvWCVQP2tP9Rnbv6eSwz11CSokiUb4tT 3XgoCyo6yECTBTKOrEYVVN63bEcr8akuWzhptLliIaTTh2tpjA1LFlCQSOgWd8Fw+daB AyqsbN5WzmJlFGcOFZWWP85RR2xxrcxrTjY3mVYZPHZhluVBeX5Y3epVAlwsdPPaHjD6 /dzyiDjBdc1QIKHGdMhkO1XXvOg53ORc5DfA5D8Dycj8E4dQaYw4mjCE4epNLzpl/SO/ 4XGg== 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=TzhbgAIZ0X+Y/zKZLoWJmjGNmMSLTn1kyQe14qSFr6s=; b=MFl0GBc0GN2EW4oph0vAnX4xjLPmO3pfFOkjpDlUuiIejzWJ/b/O9CMPD8qRwko8h7 ChmKPvsYp6SXPup4RQQfij+vPmTcGsxJqYOf1pt8q4VBQjjJ43kFPyoBa5hhgmww4rs1 RiWIUV4+Ijd0+010BSiCgYGwaqPwEK5SHgR2/8XhG3gpk2F5a76a2V6c9Dswm7UJTR2S B9TPbc4j8mzTQHz+WysUhK8ib0BMoEhMLcOiJYrX0eeWICYq1ox6MMYDBX4eDBNWdPF4 gaiCk7MUfNvblvOW+wWfyhjibwlBLbfAEq4MWcJbwsUO8aMe1vTeFvjupqZbpwpOqHgU qCXg== X-Gm-Message-State: AHQUAub8xZF/jiqppwdUyAHNpJhXbzfupjtDhD97tvW52GOyZmznfmq1 aWql4ZFTCrAl6nhPm6ITX22nfM1F X-Google-Smtp-Source: AHgI3IZ1LIQwVHeExlh8uaQ+fgjG0B7pWoT3Ld8QXFlRJ5KuU8KUA87IE5Sp+cQ2sxJDUDgttKWW2w== X-Received: by 2002:a24:3c05:: with SMTP id m5mr8092221ita.78.1550709502681; Wed, 20 Feb 2019 16:38:22 -0800 (PST) Received: from [10.22.10.6] ([172.98.67.72]) by smtp.googlemail.com with ESMTPSA id t69sm3412096itb.26.2019.02.20.16.38.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Feb 2019 16:38:21 -0800 (PST) Subject: Precompressed data in TOASTed columns (was Re: Regarding postgreSQL performance on DRAM) To: pgsql-admin@lists.postgresql.org References: <87va1exlfo.fsf@jsievers.enova.com> <29251.1550696663@sss.pgh.pa.us> From: Ron Message-ID: Date: Wed, 20 Feb 2019 18:38:20 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <29251.1550696663@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2/20/19 3:04 PM, Tom Lane wrote: [snip] > Well, the entire tuple would be 25600 bytes plus some overhead, which > cannot fit on a Postgres page (8K, unless the OP changed compile options > without mentioning it). So something has to be done to make it fit, and > that something is going to be toasting any fields that can be toasted. > > From memory, our threshold for trying to make tuples narrower is only > a quarter-page anyway, so that the toaster will be trying to get this > down to 2K if it can. That's certainly going to involve compressing > every field, and I wouldn't be surprised if a lot of them get shoved > out-of-line too. > > The OP might care to read > > https://www.postgresql.org/docs/current/storage-toast.html Based on that and https://www.postgresql.org/docs/9.6/sql-altertable.html should I think about doing a SET STORAGE=EXTERNAL on columns with PDF and compressed TIFF data? Thanks -- Angular momentum makes the world go 'round.