In 7.0 release note, we have:

	Add SET FSYNC and SHOW PG_OPTIONS commands(Massimo)

I'm confused by this since we don't seem to have SET FSYNC command.

test=# set fsync to on;
NOTICE:  Unrecognized variable fsync
SET VARIABLE

Am I missing something?

Also if we have that command, I wonder it would be safe to issue on
the fly.

Comments?
--
Tatsuo Ishii


Wed, 31 May 2000 10:03:15 +0900
Tatsuo Ishii <t-ishii@sra.co.jp>
SET FSYNC command?
> In 7.0 release note, we have:
> 
> 	Add SET FSYNC and SHOW PG_OPTIONS commands(Massimo)
> 
> I'm confused by this since we don't seem to have SET FSYNC command.
> 
> test=# set fsync to on;
> NOTICE:  Unrecognized variable fsync
> SET VARIABLE
> 
> Am I missing something?
> 
> Also if we have that command, I wonder it would be safe to issue on
> the fly.

Gee, I think we removed it because we thought it would be unsafe, but
then Tom Lane made it safe, forgot to re-enable it.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Tue, 30 May 2000 21:33:16 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: SET FSYNC command?
Tatsuo Ishii wrote:

> In 7.0 release note, we have:
>
>         Add SET FSYNC and SHOW PG_OPTIONS commands(Massimo)
>
> I'm confused by this since we don't seem to have SET FSYNC command.

If SHOW PG_OPTIONS; is executed, one of the lines is
 o NOTICE: nofsync=0
now, SET PG_OPTIONS TO 'nofsync=1';
SHOW PG_OPTIONS;
 o NOTICE: nofsync=1

Does this actually work?

Regards
Grant

--
> Poorly planned software requires a genius to write it
> and a hero to use it.

Grant Finnemore BSc(Eng)  (mailto:gaf@ucs.co.za)
Software Engineer         Universal Computer Services
Tel  (+27)(11)712-1366    PO Box 31266 Braamfontein 2017, South Africa
Cell (+27)(82)604-5536    20th Floor, 209 Smit St., Braamfontein
Fax  (+27)(11)339-3421    Johannesburg, South Africa




Wed, 31 May 2000 07:12:04 +0200
Grant Finnemore <gaf@ucs.co.za>
Re: SET FSYNC command?
Grant Finnemore <gaf@ucs.co.za> writes:
>> Add SET FSYNC and SHOW PG_OPTIONS commands(Massimo)
>> 
>> I'm confused by this since we don't seem to have SET FSYNC command.

> If SHOW PG_OPTIONS; is executed, one of the lines is
>  o NOTICE: nofsync=0
> now, SET PG_OPTIONS TO 'nofsync=1';
> SHOW PG_OPTIONS;
>  o NOTICE: nofsync=1

> Does this actually work?

It does.  The syntax is unnecessarily obscure and arse-backwards :-(.
The only defense I can offer is that we had every intention of ripping
the variable out completely, until a nearly-last-minute revision of the
buffer manager (to fix a different bug report) that had as a side-effect
making it safe and reasonable to run different backends with different
fsync settings.  So the variable got left in as it stood.

Once the WAL revisions are done the whole issue will go away anyway,
so it's probably not worth spending any time fixing the bizarre user
interface for this preference setting...

			regards, tom lane

Wed, 31 May 2000 02:14:37 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: SET FSYNC command? 
Tatsuo Ishii <t-ishii@sra.co.jp> writes:
> Also if we have that command, I wonder it would be safe to issue on
> the fly.

I believe it is safe now, following the changes I made last month
to the buffer-sync algorithm.  It surely was not safe before to run
with different fsync settings in different backends.

			regards, tom lane

Wed, 31 May 2000 02:20:55 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: SET FSYNC command? 
On Wed, 31 May 2000, Tom Lane wrote:

> > If SHOW PG_OPTIONS; is executed, one of the lines is
> >  o NOTICE: nofsync=0
> > now, SET PG_OPTIONS TO 'nofsync=1';
> > SHOW PG_OPTIONS;
> >  o NOTICE: nofsync=1

> The syntax is unnecessarily obscure and arse-backwards :-(.

No kidding.

Actually, since yesterday you can disable fsync in a multitude of ways:

postmaster -F
postmaster -o '-F'
postmaster --enable-fsync=off
SET ENABLE_FSYNC TO OFF;

but feel free to not care because after all ...

> Once the WAL revisions are done the whole issue will go away anyway,


-- 
Peter Eisentraut                  Sernanders vï¿½g 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden


Wed, 31 May 2000 12:43:54 +0200 (MET DST)
Peter Eisentraut <e99re41@DoCS.UU.SE>
Re: SET FSYNC command? 
> > The syntax is unnecessarily obscure and arse-backwards :-(.
> SET ENABLE_FSYNC TO OFF;

Hi Peter. I was noticing that several of the SET keywords have redundant
elements. In this case, istm that

  SET FSYNC=ON;

would be adequate and preferred; the "ENABLE" is implied by the "ON" in
the last example. I realize that you are using a keyword style already
present, but perhaps for 7.1 we can shorten all of those keywords having
"ENABLE_"? 

Comments?

                     - Thomas

Wed, 31 May 2000 13:47:45 +0000
Thomas Lockhart <lockhart@alumni.caltech.edu>
Re: SET FSYNC command?
Thomas Lockhart writes:

> In this case, istm that
> 
>   SET FSYNC=ON;
> 
> would be adequate and preferred; the "ENABLE" is implied by the "ON" in

Actually I just noticed that it actually is that way for FSYNC, but I
agree totally.

> the last example. I realize that you are using a keyword style already
> present, but perhaps for 7.1 we can shorten all of those keywords having
> "ENABLE_"? 

You know me, I would change everything if you guys wouldn't hold me
back. :)

I could certainly agree to this.

-- 
Peter Eisentraut                  Sernanders vï¿½g 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden


Wed, 31 May 2000 20:44:03 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Re: SET FSYNC command?