Re: Why does PostgreSQL ftruncate before unlink?

From: Francisco Olarte <folarte(at)peoplecall(dot)com>
To: Jon Nelson <jnelson+pgsql(at)jamponi(dot)net>
Cc: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Re: Why does PostgreSQL ftruncate before unlink?
Date: 2014-02-24 18:33:25
Message-ID: CA+bJJbxjn1ExMsuSm5myJUcT1C_oEUCEk8-1e+o1huyhMb5acQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Feb 24, 2014 at 6:38 PM, Jon Nelson <jnelson+pgsql(at)jamponi(dot)net> wrote:
> Here is an example.
>
> % time seconds usecs/call calls errors syscall
> ------ ----------- ----------- --------- --------- ----------------
> 99.95 3.207681 4182 767 ftruncate
> 0.05 0.001579 1 2428 2301 unlink

Are this times for unlink after ftruncate? Because ( in linux which is
the one I use in the desktops and I'm familiar with ) unlinks of big
files are slow too, so to have a more meaningful comparison you would
need to time ftruncate+unlink and plain unlink of same files, IIRC
they take nearly equal time.

Francisco Olarte.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Brian Crowell 2014-02-24 18:34:04 GSSAPI/SSPI and mismatched user names
Previous Message Jon Nelson 2014-02-24 17:38:01 Re: Why does PostgreSQL ftruncate before unlink?