From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | MauMau <maumau307(at)gmail(dot)com> |
Cc: | Asif Naeem <anaeem(dot)it(at)gmail(dot)com>, 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-03-16 12:31:53 |
Message-ID: | CAA4eK1+xH8tYoFK3=T3UiTf=5s66a1cC1st9jEScLYc0t1UnsQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jan 15, 2014 at 8:12 PM, MauMau <maumau307(at)gmail(dot)com> wrote:
> 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.
If create_tablespace_directories() needs to handle with directory both on
Windows/Linux, then shouldn't it be a runtime check as in your first
version rather than compile time check?
Also isn't that the reason why destroy_tablespace_directories() have similar
check?
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2014-03-16 12:39:53 | Re: requested shared memory size overflows size_t |
Previous Message | Andrew Dunstan | 2014-03-16 12:23:40 | Re: jsonb status - 'JsonbValue' has no member named 'size' |