Thread: pgsql: Have test_fsync honor -f filename argument.

pgsql: Have test_fsync honor -f filename argument.

From
momjian@svr1.postgresql.org (Bruce Momjian)
Date:
Log Message:
-----------
Have test_fsync honor -f filename argument.

Modified Files:
--------------
    pgsql/src/tools/fsync:
        test_fsync.c (r1.11 -> r1.12)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/tools/fsync/test_fsync.c.diff?r1=1.11&r2=1.12)

Re: pgsql: Have test_fsync honor -f filename argument.

From
"Qingqing Zhou"
Date:
"Bruce Momjian" <momjian@svr1.postgresql.org> wrote
> -----------
> Have test_fsync honor -f filename argument.
>

The patch may forget to change the error message (Also, it would be better
to append a '\n' in die() function). Another possible problem of this test
is that it pickups the "/var/tmp". OS may have IO optimization on temporary
directories, which will affect the confidence of the results.

Example:
---
$#./test_fsync -f $HOME/test.out
Simple write timing:
        write                    4.265149
$#./test_fsync -f /var/tmp/test.out
Simple write timing:
        write                    0.018404
$#./test_fsync -f /tmp/test.out
Simple write timing:
        write                    0.018511
---

Regards,
Qingqing



Re: pgsql: Have test_fsync honor -f filename argument.

From
Bruce Momjian
Date:
Qingqing Zhou wrote:
>
> "Bruce Momjian" <momjian@svr1.postgresql.org> wrote
> > -----------
> > Have test_fsync honor -f filename argument.
> >
>
> The patch may forget to change the error message (Also, it would be better
> to append a '\n' in die() function). Another possible problem of this test
> is that it pickups the "/var/tmp". OS may have IO optimization on temporary
> directories, which will affect the confidence of the results.
>
> Example:
> ---
> $#./test_fsync -f $HOME/test.out
> Simple write timing:
>         write                    4.265149
> $#./test_fsync -f /var/tmp/test.out
> Simple write timing:
>         write                    0.018404
> $#./test_fsync -f /tmp/test.out
> Simple write timing:
>         write                    0.018511
> ---

Thanks.  Updated error message and added mention of memory file systems
to README.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073