Return-Path: owner-postman
Received: from localhost.Berkeley.EDU (localhost.Berkeley.EDU [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.10/8.6.3) with SMTP id DAA03020 for postgres-redist; Tue, 7 Mar 1995 03:37:18 -0800
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199503071137.DAA03020@nobozo.CS.Berkeley.EDU>
X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost.Berkeley.EDU didn't use HELO protocol
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from Relay1.Austria.EU.net (relay1.Austria.EU.net [192.92.138.47]) by nobozo.CS.Berkeley.EDU (8.6.10/8.6.3) with SMTP id DAA03010 for <postgres@nobozo.CS.Berkeley.EDU>; Tue, 7 Mar 1995 03:37:15 -0800
Received: from zen.UUCP by Relay1.Austria.EU.net with UUCP id AA07609
  (5.67b/IDA-1.5 for nobozo.CS.Berkeley.EDU!postgres); Tue, 7 Mar 1995 12:37:08 +0100
Message-Id: <m0rlxYU-000I3jC@eka>
To: postgres@postgres.Berkeley.EDU
Subject: Re: synchronous writes WARNING: do NOT (!!) use the -o-S flag 
X-Mailer: exmh version 1.4 6/24/94
Date: Tue, 07 Mar 1995 12:35:55 +0100
From: "V.Grabner" <zen@eka.gklw.co.at>
Resent-To: postgres-redist@postgres.Berkeley.EDU
Resent-Date: Tue, 07 Mar 95 03:37:18 -0800
Resent-XMts: smtp


The previous discussion was at the the linux-postgres list, but there are mail
troubles at the moment, it's a general problem anyway...

Hi,

I found the error I was traceing for weeks, no race conditions, not array 
ranges .....  >>>> the -o-S flag !!!!!

WARNING:
 
Do NOT use the -S flag for the postgres backend (not to be confused with the 
postmaster -S flag) unless you want to destroy your database right after 
creation.

The minus -S flag does not only fsync, but does a FlushBufferPool() upon
the exit of the backend. 
This does not seem to be a problem, but it crashes postgres (not just a
single database) once in a while. The symptoms are deadlocks, most of the time.

The problem is, the programmers of postgres seemed to have relied on 
the sync and invalidation of a buffer after each successfully commited 
transaction. The -S Flag does not sync back, it only syncs upon exit.

If some minor error occures (during the !sync and exit), the whole system gets 
out of order, and about ten statements after the bad one, the database goes 
defunct .... (deadlock, xid table corrupted, cache corrupted, shm error ....)
I have learned 'NOTICE:' == the beginning of the end ...)

createdb dummy
echo "" | monitor dummy 

is enough to crash anything (I don't know exactly how, but this one works for
sure).

My advice : disable the -S flag in postgres.c


> the original question was, what happens when i turn off the sync writes.
> the answer is, with the current storage system, you lose any ability to 
> recover the database.

and you lose your database right away ...., there is no need to recover -:).

- --zen

 -----------------------------------------------------------------------------
 Vinzenz Grabner				Voice	: + 43 1 817 62 30-11  
 GKL&W GmbH.					Fax	: + 43 1 817 62 30-17
 Schoenbrunnerstr. 179/II/4.St. 
 A-1120 Vienna/Austria/Europe			e-mail	: zen@gklw.co.at      
 -----------------------------------------------------------------------------
			--->>>> We moved <<<<---
 -----------------------------------------------------------------------------
 Be aware: The rat will always win, because it's a rat and what else has he 
           got to do but thinking about you ..
 -----------------------------------------------------------------------------


------- End of Forwarded Message



==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU".
   If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================
              URL: http://s2k-ftp.CS.Berkeley.EDU:8000/postgres/
