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
2+ messages / 2 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; 2+ 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_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/882c592d0c0cfc29a8265f382316c58cb8b81c66

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] 2+ messages in thread

* pgsql: doc PG 18 relnotes: add pg_log_backend_memory_contexts() mention
@ 2025-05-08 00:36  Bruce Momjian <bruce@momjian.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Bruce Momjian @ 2025-05-08 00:36 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

doc PG 18 relnotes: add pg_log_backend_memory_contexts() mention

Now zero-based.

Reported-by: David Rowley

Discussion: https://postgr.es/m/CAApHDvqMfTBdfwc0Z-tHXLnBMKJLYEZDApgUzA7x_PUDZsY3GA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f8d49aa130b213d66beae0f574917c1884f7b2a9

Modified Files
--------------
doc/src/sgml/release-18.sgml | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)



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


end of thread, other threads:[~2025-05-08 00:36 UTC | newest]

Thread overview: 2+ 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>
2025-05-08 00:36 pgsql: doc PG 18 relnotes: add pg_log_backend_memory_contexts() mention Bruce Momjian <bruce@momjian.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