Re: question on error during COPY FROM - Mailing list pgsql-general

From Rakesh Kumar
Subject Re: question on error during COPY FROM
Date
Msg-id CAJBB=EVQaZQ3vk1MN0ag+hxf9ebh0bH9wW395v8hpfg3z4CONw@mail.gmail.com
Whole thread Raw
In response to Re: question on error during COPY FROM  (Francisco Olarte <folarte@peoplecall.com>)
Responses Re: question on error during COPY FROM  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: question on error during COPY FROM  (Francisco Olarte <folarte@peoplecall.com>)
List pgsql-general
Is it true that one datafile in PG can only belong to one object (table/index)

On Tue, Aug 23, 2016 at 9:55 AM, Francisco Olarte
<folarte@peoplecall.com> wrote:
> On Tue, Aug 23, 2016 at 2:32 PM, Ilya Kazakevich
> <Ilya.Kazakevich@jetbrains.com> wrote:
>>>does that mean that I should always execute a VACUUM to recover the
>>>wasted space when an error is triggered or will the auto-vacuum mechanism
>>>do the job by itself ?
>> If you have autovacuum enabled it will clean up tablespace. However, space will not be returned to filesystem but
willbe reused by database. 
>> You may run VACUUM FULL manually to return it to filesystem.
>
> A normal vacuum may also return some space, specially after a big bulk
> load, see second paragraph of 23.1.2 the URL you posted:
>> https://www.postgresql.org/docs/9.1/static/routine-vacuuming.html
>
> Where it says "However, it will not return the space to the operating
> system, except in the special case where one or more pages at the end
> of a table become entirely free and an exclusive table lock can be
> easily obtained.". A big aborted bulk load may just fit the case, as
> it may put a lot of tuples at new pages at the end and be executed in
> a low-load period where the lock is easier to acquire.
>
>
> Francisco Olarte.
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Why insertion throughput can be reduced with an increase of batch size?
Next
From: Adrian Klaver
Date:
Subject: Re: question on error during COPY FROM