From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | John R Pierce <pierce(at)hogranch(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Table seems empty but its size is in gigabytes |
Date: | 2016-04-12 16:35:56 |
Message-ID: | CAKFQuwa3+F6x4Gkz7LL8fOu4CUtn=LdaNERN+cA_WyCjsdiNBw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Apr 12, 2016 at 9:30 AM, John R Pierce <pierce(at)hogranch(dot)com> wrote:
> On 4/12/2016 9:16 AM, David G. Johnston wrote:
>
> Now my big table statistics shows tuples inserted and its size is in order
>> of gigabytes, but a simple SELECT has no rows, is there any way to recover
>> the data in this table?
>>
>
> Do you want to recover the dead data or the space that it consumes?
>
>
> to free the disk space, use...
>
> vacuum full tablename;
>
>
In the table is (should be) empty you could also do TRUNCATE tablename; I
suspect there isn't a functional difference between the two options - the
later does work on non-empty tables though it has some performance
implications if done on one containing data.
> I don't know how to reclaim tuples that were written but rolled back.
>
This is the request - got an off-list reply to that effect.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2016-04-12 16:45:29 | Re: Freezing localtimestamp and other time function on some value |
Previous Message | John R Pierce | 2016-04-12 16:30:09 | Re: Table seems empty but its size is in gigabytes |