Thread

  1. SET FSYNC command?

    Tatsuo Ishii <t-ishii@sra.co.jp> — 2000-05-31T01:03:15Z

    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
    
    
    
  2. Re: SET FSYNC command?

    Bruce Momjian <pgman@candle.pha.pa.us> — 2000-05-31T01:33:16Z

    > 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
    
    
  3. Re: SET FSYNC command?

    Grant Finnemore <gaf@ucs.co.za> — 2000-05-31T05:12:04Z

    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
    
    
    
    
    
  4. Re: SET FSYNC command?

    Tom Lane <tgl@sss.pgh.pa.us> — 2000-05-31T06:14:37Z

    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
    
    
  5. Re: SET FSYNC command?

    Tom Lane <tgl@sss.pgh.pa.us> — 2000-05-31T06:20:55Z

    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
    
    
  6. Re: SET FSYNC command?

    Peter Eisentraut <e99re41@docs.uu.se> — 2000-05-31T10:43:54Z

    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
    
    
    
  7. Re: SET FSYNC command?

    Thomas Lockhart <lockhart@alumni.caltech.edu> — 2000-05-31T13:47:45Z

    > > 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
    
    
  8. Re: SET FSYNC command?

    Peter Eisentraut <peter_e@gmx.net> — 2000-05-31T18:44:03Z

    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