pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Use plain mkdir() not pg_mkdir_p() to create subdirectories of P
5+ messages / 1 participants
[nested] [flat]

* pgsql: Use plain mkdir() not pg_mkdir_p() to create subdirectories of P
@ 2016-01-07 20:22  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2016-01-07 20:22 UTC (permalink / raw)
  To: pgsql-committers

Use plain mkdir() not pg_mkdir_p() to create subdirectories of PGDATA.

When we're creating subdirectories of PGDATA during initdb, we know darn
well that the parent directory exists (or should exist) and that the new
subdirectory doesn't (or shouldn't).  There is therefore no need to use
anything more complicated than mkdir().  Using pg_mkdir_p() just opens us
up to unexpected failure modes, such as the one exhibited in bug #13853
from Nuri Boardman.  It's not very clear why pg_mkdir_p() went wrong there,
but it is clear that we didn't need to be trying to create parent
directories in the first place.  We're not even saving any code, as proven
by the fact that this patch nets out at minus five lines.

Since this is a response to a field bug report, back-patch to all branches.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/33b054bc797628e418e379badd38b00e4b523115

Modified Files
--------------
src/bin/initdb/initdb.c |   49 +++++++++++++++++++++--------------------------
1 file changed, 22 insertions(+), 27 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Use plain mkdir() not pg_mkdir_p() to create subdirectories of P
@ 2016-01-07 20:22  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2016-01-07 20:22 UTC (permalink / raw)
  To: pgsql-committers

Use plain mkdir() not pg_mkdir_p() to create subdirectories of PGDATA.

When we're creating subdirectories of PGDATA during initdb, we know darn
well that the parent directory exists (or should exist) and that the new
subdirectory doesn't (or shouldn't).  There is therefore no need to use
anything more complicated than mkdir().  Using pg_mkdir_p() just opens us
up to unexpected failure modes, such as the one exhibited in bug #13853
from Nuri Boardman.  It's not very clear why pg_mkdir_p() went wrong there,
but it is clear that we didn't need to be trying to create parent
directories in the first place.  We're not even saving any code, as proven
by the fact that this patch nets out at minus five lines.

Since this is a response to a field bug report, back-patch to all branches.

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/32e7e7fa77bab73c9df8ea4bdb1fd65793451ff6

Modified Files
--------------
src/bin/initdb/initdb.c |   49 +++++++++++++++++++++--------------------------
1 file changed, 22 insertions(+), 27 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Use plain mkdir() not pg_mkdir_p() to create subdirectories of P
@ 2016-01-07 20:22  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2016-01-07 20:22 UTC (permalink / raw)
  To: pgsql-committers

Use plain mkdir() not pg_mkdir_p() to create subdirectories of PGDATA.

When we're creating subdirectories of PGDATA during initdb, we know darn
well that the parent directory exists (or should exist) and that the new
subdirectory doesn't (or shouldn't).  There is therefore no need to use
anything more complicated than mkdir().  Using pg_mkdir_p() just opens us
up to unexpected failure modes, such as the one exhibited in bug #13853
from Nuri Boardman.  It's not very clear why pg_mkdir_p() went wrong there,
but it is clear that we didn't need to be trying to create parent
directories in the first place.  We're not even saving any code, as proven
by the fact that this patch nets out at minus five lines.

Since this is a response to a field bug report, back-patch to all branches.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/9486d0202778074e3af4371e6a4580ab4ce18336

Modified Files
--------------
src/bin/initdb/initdb.c |   53 ++++++++++++++++++++---------------------------
1 file changed, 23 insertions(+), 30 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Use plain mkdir() not pg_mkdir_p() to create subdirectories of P
@ 2016-01-07 20:22  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2016-01-07 20:22 UTC (permalink / raw)
  To: pgsql-committers

Use plain mkdir() not pg_mkdir_p() to create subdirectories of PGDATA.

When we're creating subdirectories of PGDATA during initdb, we know darn
well that the parent directory exists (or should exist) and that the new
subdirectory doesn't (or shouldn't).  There is therefore no need to use
anything more complicated than mkdir().  Using pg_mkdir_p() just opens us
up to unexpected failure modes, such as the one exhibited in bug #13853
from Nuri Boardman.  It's not very clear why pg_mkdir_p() went wrong there,
but it is clear that we didn't need to be trying to create parent
directories in the first place.  We're not even saving any code, as proven
by the fact that this patch nets out at minus five lines.

Since this is a response to a field bug report, back-patch to all branches.

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/d6d6400cc0357c409262dc95d3001e70da8605c4

Modified Files
--------------
src/bin/initdb/initdb.c |   53 ++++++++++++++++++++---------------------------
1 file changed, 23 insertions(+), 30 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Use plain mkdir() not pg_mkdir_p() to create subdirectories of P
@ 2016-01-07 20:22  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2016-01-07 20:22 UTC (permalink / raw)
  To: pgsql-committers

Use plain mkdir() not pg_mkdir_p() to create subdirectories of PGDATA.

When we're creating subdirectories of PGDATA during initdb, we know darn
well that the parent directory exists (or should exist) and that the new
subdirectory doesn't (or shouldn't).  There is therefore no need to use
anything more complicated than mkdir().  Using pg_mkdir_p() just opens us
up to unexpected failure modes, such as the one exhibited in bug #13853
from Nuri Boardman.  It's not very clear why pg_mkdir_p() went wrong there,
but it is clear that we didn't need to be trying to create parent
directories in the first place.  We're not even saving any code, as proven
by the fact that this patch nets out at minus five lines.

Since this is a response to a field bug report, back-patch to all branches.

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/099541e8f1988cd8c1ae1a00ded015370fbc61b2

Modified Files
--------------
src/bin/initdb/initdb.c |   53 ++++++++++++++++++++---------------------------
1 file changed, 23 insertions(+), 30 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2016-01-07 20:22 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-01-07 20:22 pgsql: Use plain mkdir() not pg_mkdir_p() to create subdirectories of P Tom Lane <tgl@sss.pgh.pa.us>
2016-01-07 20:22 pgsql: Use plain mkdir() not pg_mkdir_p() to create subdirectories of P Tom Lane <tgl@sss.pgh.pa.us>
2016-01-07 20:22 pgsql: Use plain mkdir() not pg_mkdir_p() to create subdirectories of P Tom Lane <tgl@sss.pgh.pa.us>
2016-01-07 20:22 pgsql: Use plain mkdir() not pg_mkdir_p() to create subdirectories of P Tom Lane <tgl@sss.pgh.pa.us>
2016-01-07 20:22 pgsql: Use plain mkdir() not pg_mkdir_p() to create subdirectories of P Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox