Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lXl0s-00077Q-VO for pgsql-general@arkaria.postgresql.org; Sat, 17 Apr 2021 13:29:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lXl0r-0002sA-T9 for pgsql-general@arkaria.postgresql.org; Sat, 17 Apr 2021 13:29:29 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lXl0r-0002s2-KL for pgsql-general@lists.postgresql.org; Sat, 17 Apr 2021 13:29:29 +0000 Received: from mout.gmx.net ([212.227.15.15]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lXl0l-0006tf-0B for pgsql-general@lists.postgresql.org; Sat, 17 Apr 2021 13:29:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1618666160; bh=me5iyx7QyP/aO1jVa18K0i5jPN5W2AU9vLiz/8/MIyw=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=OvFkOUakragqmdSJ86LrTHwbL87S3lKrjwVmxZeyR6h7qsa7udh7slqrfQmqO8zN3 3I7fkdjxcs368LC+YiuDXekBed0fTcnNvLDaUMvR0P/kX7rcMhvycChEnVTeJDwWnH q45b09jzMJlOF3xHc/LPbZRErD00Uml/CAc1s1WA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.178.20] ([83.171.167.145]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MWAOW-1l087p3C1a-00Xbb5 for ; Sat, 17 Apr 2021 15:29:19 +0200 Subject: Re: Size of PostgreSQL backup ./. Sybase DUMP To: pgsql-general@lists.postgresql.org References: <616119102ade0feacd7f0a1ec376859a26ffe83d.camel@cybertec.at> From: Thomas Kellerer Message-ID: <409c895e-af72-00fb-9397-64066c7a7062@gmx.net> Date: Sat, 17 Apr 2021 15:29:19 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.5.666 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:rbnd4jbxLsHKypRsgqacEVGezYyOlzW4OHfIYgezHRsmQzZqcUD TPkRYGbguKwe9ZO/r8zptdH86Egvfd75PrpzFwJdIOBDyNr7BYepWQMGUdmKc/NTt3FHRJv msW8BNW4w/qAXZUG04wXeGCZof5JecB2IFON5lRXA14w6QiFq72zmGl86FEVUyuasC2TIj2 8uiRTRT0JnvnPA982J38g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:ldXTomZVZSM=:JHPKJM5WissDbK2SDpmL0t 96jEqvsi9Lq5lTMJQxofmS9L1Qhif6zImsTkesDCAaWFcImqmj8G/vQVVB/MUyBGOOfc5zB6h 10uqF6hrMRyM3LVJDP3WucwqufAzyP+5dRqsbPXXo4Lcv45UMwpjbnzPotT5PzasgIJdipsYz x6WvMt++qLktuEFYbt3X6+nnyD5vEcD/FcnJIz0z7WkCrJSpqMr2inhH7+ksWHfzQb0x4Smad cDnddyNGPmU5vtxRCvR7dCvw1zU05C0148exLeELjzYdalD1D6C86VCyb2BradtKT2vMvrm/y o6Q2qcV0vjFU6GEXjksN2BA669FXEEtZV7ERfDHUUGB2+xSULA7fo+17/NX6Z3/zDHZxM+GAh cv14I9fRh88OLE7BiAttlCvhifzxyeqh79ezF7fgf7RY+iac18gUNcoBvaStFYq0Q+nmN33cN 3XAUb89F8Dso1xMSadgs4u9Y48XQhJdSn2S2yKadrfbE2IHUP7KNVLwTnJHgya3S5cnyifb3k RdDKPALQ7HxDBhkvzycUVhJAUtsm8qRzYhYN1nO0uyxNutR+5fWZof2cWa7Pnb0ro/tW1AQq7 wOyQO+jF7GEsVAuGMZ1e79VGV7k0b9+RnwbUanQv+aYZf1L5UFY42OZsHdhWGM1m05xXPAwNb a5TvQOyPvXzqncyRhqmB/QKm+gb+8PpKP3zQWhqNCpE6Ny19qpfCHeCe1Zx9idlbD3KIPX9AT 9YeM8vjrYsoQdCqiCO4IYKgTx8BdBHp5e+huyOSo87Er1FQ0krAaiGzRg63Kwce5DnxhuuCZk RsB8OFWBGv15tlcuPILIPiI77z/Rx7gJc2E3H086GAqQsO8NKEz8gcOUkW1tE5ENHy5jIepxH GcdHD3RXYzsO/Cpj4RoQN8oqHkzGvwBXQup+It7l/L8RWXuCb7+BNcwEEsHFx6ggwe8BErs/S rw5slVyXRg0svj8oNXdMwzRx6RziUJWCGt16mz5Qjr9VqeQLYlRhDP5pMUCLv4byXm1il8Xpv pX/6nPzVwjGEF9q8AvJ0TYyzNf3z9VMgeaKTLI9hpSnYuZJmhCjcFgDLp+5B9VfLMRREcRmiU mpBgAwnqo/07Es6N3EeWcpMCzMbTRSHRz9657aEmOj8qd2OIziIUOelYyki4eEVMa2mblIWyU 6k4kJACJ4Ts/018JF2NdYOYtkJ6Xgi9L1SUlBkxGG+aeYdvfG5QaqFoF+9AFJ87JE/z9U= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Matthias Apitz schrieb am 17.04.2021 um 08:59: > As I said, the Sybase DUMP command dumps a single database, i.e. works > more like pg_dump of PostgreSQL. Ofc, they're like apples and oranges, > but the netto data of the tables must be written to disk, and as I said > above in both cases compressed with gzip. > > Even more, the pg_basebackup does not only write the netto data of the > database, but also system tables and configuration information of the > PG server. That made me asking, why it's less than the half in size as > the gzip'ed DUMP of Sybase. > > One reason I could imagine is, that Sybase's DUMP writes all the pages, > even the unused pages into the output file. But this is a guess, because > I never investigated the internals of Sybase's DUMP command. Actually pg_basebackup writes the data of **all** databases, not just one. I wonder if the difference is because Sybase uses a single container file for each database. And that container file might be bigger than the actual content due to deleting data, or dropping tables. Postgres uses one file per table (multiple files if the table size exceeds 1GB). So if you drop a table in Postgres the space is immediately freed. I know that in SQL Server there is a way to shrink the database files (=3Dcontainers). If that is possible in Sybase as well, you could try and compare the size then.