Re: [bug fix] PostgreSQL fails to start on Windows if it crashes after tablespace creation

From: "MauMau" <maumau307(at)gmail(dot)com>
To: "Asif Naeem" <anaeem(dot)it(at)gmail(dot)com>
Cc: "Andrew Dunstan" <andrew(at)dunslane(dot)net>, "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [bug fix] PostgreSQL fails to start on Windows if it crashes after tablespace creation
Date: 2014-01-15 14:42:47
Message-ID: B8A9EC1E51FD45A281A3B61F5744B4A1@maumau
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

From: "Asif Naeem" <anaeem(dot)it(at)gmail(dot)com>
> As you have
followed destroy_tablespace_directories() function, Is there any specific
reason not to use same logic to detect type of the file/link i.e.
“(lstat(linkloc, &st) == 0 && S_ISDIR(st.st_mode))”, It also seems have
more appropriate error message i.e.

Thanks for reviewing and testing the patch. Yes, at first I did what you
mentioned, but modified the patch according to some advice in the mail
thread. During redo, create_tablespace_directories() needs to handle the
case where the $PGDATA/pg_tblspc/xxx is not a symlink but a directory even
on UNIX/Linux. Please see TablespaceCreateDbspace is().
destroy_tablespace_directories() doesn't have to handle such situation.

Regards
MauMau

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2014-01-15 14:57:53 Re: ALTER TABLE lock strength reduction patch is unsafe
Previous Message Mel Gorman 2014-01-15 14:14:08 Re: Linux kernel impact on PostgreSQL performance (summary v1 2014-1-15)