Re: Why does PostgreSQL ftruncate before unlink? - Mailing list pgsql-general

From Francisco Olarte
Subject Re: Why does PostgreSQL ftruncate before unlink?
Date
Msg-id CA+bJJbxjn1ExMsuSm5myJUcT1C_oEUCEk8-1e+o1huyhMb5acQ@mail.gmail.com
Whole thread Raw
In response to Re: Why does PostgreSQL ftruncate before unlink?  (Jon Nelson <jnelson+pgsql@jamponi.net>)
List pgsql-general
On Mon, Feb 24, 2014 at 6:38 PM, Jon Nelson <jnelson+pgsql@jamponi.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.


pgsql-general by date:

Previous
From: Jon Nelson
Date:
Subject: Re: Why does PostgreSQL ftruncate before unlink?
Next
From: Brian Crowell
Date:
Subject: GSSAPI/SSPI and mismatched user names