pgsql: Clean up CREATE DATABASE processing to make it more robust and - Mailing list pgsql-committers

From tgl@svr1.postgresql.org (Tom Lane)
Subject pgsql: Clean up CREATE DATABASE processing to make it more robust and
Date
Msg-id 20050802190233.538A6528DF@svr1.postgresql.org
Whole thread Raw
List 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:

Previous
From: nwakefield@pgfoundry.org (User Nwakefield)
Date:
Subject: bizgres - bizgres: added support for multiple locations of jars
Next
From: nwakefield@pgfoundry.org (User Nwakefield)
Date:
Subject: bizgres - bizgres: Example Warehouse and Metadata