Skip site navigation (1) Skip section navigation (2)

pgsql: Clean up CREATE DATABASE processing to make it more robust and

From: tgl(at)svr1(dot)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Clean up CREATE DATABASE processing to make it more robust and
Date: 2005-08-02 19:02:33
Message-ID: 20050802190233.538A6528DF@svr1.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Clean up CREATE DATABASE processing to make it more robust and get rid
of special case for Windows port.  Put a PG_TRY around most of createdb()
to ensure that we remove copied subdirectories on failure, even if the
failure happens while creating the pg_database row.  (I think this explains
Oliver Siegmar's recent report.)  Having done that, there's no need for
the fragile assumption that copydir() mustn't ereport(ERROR), so simplify
its API.  Eliminate the old code that used system("cp ...") to copy
subdirectories, in favor of using copydir() on all platforms.  This not
only should allow much better error reporting, but allows us to fsync
the created files before trusting that the copy has succeeded.

Modified Files:
--------------
    pgsql:
        configure (r1.444 -> r1.445)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/configure.diff?r1=1.444&r2=1.445)
        configure.in (r1.417 -> r1.418)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/configure.in.diff?r1=1.417&r2=1.418)
    pgsql/src:
        Makefile.global.in (r1.218 -> r1.219)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/Makefile.global.in.diff?r1=1.218&r2=1.219)
    pgsql/src/backend/commands:
        dbcommands.c (r1.168 -> r1.169)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/dbcommands.c.diff?r1=1.168&r2=1.169)
    pgsql/src/include:
        port.h (r1.79 -> r1.80)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/port.h.diff?r1=1.79&r2=1.80)
    pgsql/src/port:
        copydir.c (r1.11 -> r1.12)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/port/copydir.c.diff?r1=1.11&r2=1.12)

pgsql-committers by date

Next:From: User NwakefieldDate: 2005-08-02 19:07:53
Subject: bizgres - bizgres: Example Warehouse and Metadata
Previous:From: User NwakefieldDate: 2005-08-02 17:06:46
Subject: bizgres - bizgres: added support for multiple locations of jars

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group