~ubuntu-branches/ubuntu/trusty/postgresql-8.4/trusty

« back to all changes in this revision

Viewing changes to src/backend/postmaster/walwriter.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-11 16:59:35 UTC
  • mfrom: (5.1.1 karmic)
  • Revision ID: james.westby@ubuntu.com-20090711165935-jfwin6gfrxf0gfsi
Tags: 8.4.0-2
* debian/libpq-dev.install: Ship catalog/genbki.h. (Closes: #536139)
* debian/rules: Drop --enable-cassert for final release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 *
35
35
 *
36
36
 * IDENTIFICATION
37
 
 *        $PostgreSQL: pgsql/src/backend/postmaster/walwriter.c,v 1.5 2009/01/01 17:23:46 momjian Exp $
 
37
 *        $PostgreSQL: pgsql/src/backend/postmaster/walwriter.c,v 1.7 2009/06/11 14:49:01 momjian Exp $
38
38
 *
39
39
 *-------------------------------------------------------------------------
40
40
 */
288
288
        PG_SETMASK(&BlockSig);
289
289
 
290
290
        /*
291
 
         * DO NOT proc_exit() -- we're here because shared memory may be
292
 
         * corrupted, so we don't want to try to clean up our transaction. Just
293
 
         * nail the windows shut and get out of town.
294
 
         *
 
291
         * We DO NOT want to run proc_exit() callbacks -- we're here because
 
292
         * shared memory may be corrupted, so we don't want to try to clean up our
 
293
         * transaction.  Just nail the windows shut and get out of town.  Now that
 
294
         * there's an atexit callback to prevent third-party code from breaking
 
295
         * things by calling exit() directly, we have to reset the callbacks
 
296
         * explicitly to make this work as intended.
 
297
         */
 
298
        on_exit_reset();
 
299
 
 
300
        /*
295
301
         * Note we do exit(2) not exit(0).      This is to force the postmaster into a
296
302
         * system reset cycle if some idiot DBA sends a manual SIGQUIT to a random
297
303
         * backend.  This is necessary precisely because we don't clean up our
298
 
         * shared memory state.
 
304
         * shared memory state.  (The "dead man switch" mechanism in pmsignal.c
 
305
         * should ensure the postmaster sees this as a crash, too, but no harm in
 
306
         * being doubly sure.)
299
307
         */
300
308
        exit(2);
301
309
}