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 1hF6ET-0004Qt-N7 for pgsql-general@arkaria.postgresql.org; Sat, 13 Apr 2019 00:09:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hF6ES-0007Tq-3J for pgsql-general@arkaria.postgresql.org; Sat, 13 Apr 2019 00:09:20 +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 1hF6ER-0007RZ-MO for pgsql-general@lists.postgresql.org; Sat, 13 Apr 2019 00:09:19 +0000 Received: from mail-oi1-x241.google.com ([2607:f8b0:4864:20::241]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hF6EP-0005nP-7R for pgsql-general@lists.postgresql.org; Sat, 13 Apr 2019 00:09:18 +0000 Received: by mail-oi1-x241.google.com with SMTP id v7so9390467oie.8 for ; Fri, 12 Apr 2019 17:09:17 -0700 (PDT) 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-language; bh=VgQqZdtRl0XOFAKBn3SV/W8Q33dGvMHhs5RNpgRr2f8=; b=qo9yhOfN7ORvGt/MFjsmg+emID0DCgJdbM1Y8n1kCtbQ2lRXbLrnvZbYsnhFPB4QZt sJkACwje1P/MU7JMyWqge2K+772zL7onYUg20MKpqPIL+06ogYK7yMefyd7Tjwz7eTpN ovCbQknm4w2bAAQJcp66/FAF0KW2zhxAl+vfYwQQ5hvK4UAomYSov9ftNrz6R+fMSZpc Wr1ghMF1WhNMMpYC13KZTk6g6LvgLUP1/Q0Eg0ZdHXhSWf+fKWKdIxvM1s2I+hFDUGz/ 8+mmanFA9+9E4dESh2HL95plD4WqVkxYlXnmGWZCGAijiuCJ4/Yd5siL/CNjPywlc14I l65Q== 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-language; bh=VgQqZdtRl0XOFAKBn3SV/W8Q33dGvMHhs5RNpgRr2f8=; b=td2Xkyi1bd87Ee8Alz7Nm4KlocAptopaFVZAtL1Pr4MNwq3Yr5oShduf+ujyzSEy6N feYFi7nWCECmStKOwW5rjcfxcVtdHX/8IW1a0Zh4v8AFbNYVGlbaqyMBFeHV5Tbl7NT1 CGzgoxKzr1E2x8nW+WtBFWS025m6RNnzeghTQbX6FolciFhdprEe8lHtahR8arS+dxgq 6h4ukVhdG8az7y0y/F10cYK6vTS4ssIsoMJuW7yybhP5MBygqPw4bMlNpL5r8TCG7LTw /bNiAay6Ag6dwp0MNLe2H0EFG/tLqRtfTHhYc7DzAcVAe+fJK8DYkyV5nJYudftzmBzi 4aYg== X-Gm-Message-State: APjAAAU1BxLCUWYcDcwGYmGPwl5MT+ut8EpeZgieCsKvYPGWab1mEgil YPe1ndgFvPh57A0dvH6IHie5Zynjg3k= X-Google-Smtp-Source: APXvYqxd0orTNBaaSRgnJikAWEbgqQ/HhkKWen4XBO2KXXXi7EFsQZrfY565x3FlOiNP/60Gjl826w== X-Received: by 2002:aca:bdc4:: with SMTP id n187mr12440032oif.140.1555114156438; Fri, 12 Apr 2019 17:09:16 -0700 (PDT) Received: from [192.168.1.10] (ip70-171-116-89.no.no.cox.net. [70.171.116.89]) by smtp.googlemail.com with ESMTPSA id f3sm18199863oih.38.2019.04.12.17.09.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Apr 2019 17:09:15 -0700 (PDT) Subject: Re: Safe to delete files? To: pgsql-general@lists.postgresql.org References: From: Ron Message-ID: <31232131-bd95-eac3-aecb-c4fee717666f@gmail.com> Date: Fri, 12 Apr 2019 19:09:15 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------0D87B842F9258B189B24C614" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------0D87B842F9258B189B24C614 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 4/12/19 3:11 PM, Paul van der Linden wrote: > Hi, > > For my process, I needed to drop all the tables in a tablespace except one > which I truncated. > After that I would have expected to have a couple of KB max in that > folder, but there was about 200GB in it. Did you vacuum afterwards? > > There were 2 sets of files (, .1 .. .99, and the same for id2). > Tried the various options from > https://blog.2ndquadrant.com/postgresql-filename-to-table/ and oid2name > (with -i), to trace it back to a table but all came up empty. > > Now this folder has a bit of a history spanning several postgres versions > and upgrades, and sometime in the past one of the upgrades went horribly > wrong, so my first thought was that this was possibly some leftovers from > that mishap, but the filetimes were a bit later than that. > Also hard to tell because those tables are used as write-once, read-alot > so could not base the last usage on filedate. > > Normally I probably would dare to risk deleting those files, but after the > dropping and truncating, the 2 files without extension had the time of > drop/truncate and were 0 bytes in length (unfortunately I didn't check the > filesize before drop/truncating). > > Are there other options to see if these files are leftovers from previous > stuff and not used by postgres (so i can safely delete them)? > > Postgres 11, just one used database on it (the other one being a postgis > template), running on windows server 2012. > > In replies please use reply to all... -- Angular momentum makes the world go 'round. --------------0D87B842F9258B189B24C614 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit On 4/12/19 3:11 PM, Paul van der Linden wrote:
Hi,

For my process, I needed to drop all the tables in a tablespace except one which I truncated.
After that I would have expected to have a couple of KB max in that folder, but there was about 200GB in it.

Did you vacuum afterwards?


There were 2 sets of files (<id1>, <id1>.1 .. <id1>.99, and the same for id2).
Tried the various options from https://blog.2ndquadrant.com/postgresql-filename-to-table/ and oid2name (with -i), to trace it back to a table but all came up empty.

Now this folder has a bit of a history spanning several postgres versions and upgrades, and sometime in the past one of the upgrades went horribly wrong, so my first thought was that this was possibly some leftovers from that mishap, but the filetimes were a bit later than that.
Also hard to tell because those tables are used as write-once, read-alot so could not base the last usage on filedate.

Normally I probably would dare to risk deleting those files, but after the dropping and truncating, the 2 files without extension had the time of drop/truncate and were 0 bytes in length (unfortunately I didn't check the filesize before drop/truncating).

Are there other options to see if these files are leftovers from previous stuff and not used by postgres (so i can safely delete them)?

Postgres 11, just one used database on it (the other one being a postgis template), running on windows server 2012.

In replies please use reply to all...

--
Angular momentum makes the world go 'round.
--------------0D87B842F9258B189B24C614--