Thread

  1. can disks be read only?

    mikeo <mikeo@spectrumtelecorp.com> — 2000-07-25T18:10:49Z

    hi, 
      we wish to have a database that is history so we 
    want to make the disks read only after loading.  
    would this cause any problems with POSTGRES?  it's on 
    a linux 6.2 box with POSTGRES 7.0.2.  what we're 
    looking for here is that if the system crashes we 
    can do a fast boot and not have the system do an FSCK.
    
    one company bought another and we're going to warehouse
    the purchased company's data for reference.  they'll be
    no additions to it once loaded.  
    
    
    thanks,
       mikeo
    
    
  2. Re: can disks be read only?

    Tom Lane <tgl@sss.pgh.pa.us> — 2000-07-25T21:43:24Z

    mikeo <mikeo@spectrumtelecorp.com> writes:
    >   we wish to have a database that is history so we 
    > want to make the disks read only after loading.  
    > would this cause any problems with POSTGRES?
    
    In theory you could do it given that you vacuum the tables
    before locking down the files.  (The vacuum is needed to
    ensure that on-row commit status bits are up to date.)
    
    In practice you'd likely have problems with the minor detail
    that md.c opens everything with O_RDWR privilege requests.
    You could probably do a quick hack to try O_RDONLY if
    O_RDWR fails...
    
    			regards, tom lane
    
    
  3. Re: can disks be read only?

    Thomas Lockhart <lockhart@alumni.caltech.edu> — 2000-07-26T04:52:26Z

    > >   we wish to have a database that is history so we
    > > want to make the disks read only after loading.
    > > would this cause any problems with POSTGRES?
    
    You mentioned Linux: try using one of the logging file systems like
    reiserfs, which will reduce or eliminate the time now spent in fsck
    during boot.
    
                        - Thomas