Re: [HACKERS] [review] PostgreSQL Service on Windows does not start if data directory given is relative path
On 05 April 2014 04:14, Tom Lane [ pgctl_win32service_rel_dbpath_v6.patch ] Committed with minor corrections, mostly but not all cosmetic. Thanks a lot... -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] [review] PostgreSQL Service on Windows does not start if data directory given is relative path
Rajeev rastogi rajeev.rast...@huawei.com writes: [ pgctl_win32service_rel_dbpath_v6.patch ] Committed with minor corrections, mostly but not all cosmetic. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] [review] PostgreSQL Service on Windows does not start if data directory given is relative path
While registering the service for PostgreSQL on windows, we cannot expect user to give absolute path always. So it is required to support relative path as data directory. So this patch will be very useful to handle the same. This patch has been in Ready for committer stage for long time. Please check if this can be committed now or any other changes required. Thanks and Regards, Kumar Rajeev Rastogi -Original Message- From: MauMau [mailto:maumau...@gmail.com] Sent: 24 February 2014 15:31 To: Rajeev rastogi Cc: pgsql-hackers@postgresql.org; Magnus Hagander Subject: Re: [HACKERS] [review] PostgreSQL Service on Windows does not start if data directory given is relative path From: Rajeev rastogi rajeev.rast...@huawei.com Please find the attached modified patch. Thanks, reviewed and made this patch ready for committer. Regards MauMau -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] [review] PostgreSQL Service on Windows does not start if data directory given is relative path
From: Rajeev rastogi rajeev.rast...@huawei.com Please find the attached modified patch. Thanks, reviewed and made this patch ready for committer. Regards MauMau -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] [review] PostgreSQL Service on Windows does not start if data directory given is relative path
On 22 February 2014 06:16, MauMau Wrote: Thanks for reviewing again. Please make small cosmetic changes so that make_absolute_path() follows the style of other parts. Then I'll make this ready for committer. (1) Add the function name in the comment as in: /* * make_absolute_path * * ...existing function descripton */ Added. (2) Add errno description as in: fprintf(stderr, _(could not get current working directory: %s\n, strerror(errno))); Modified. Please find the attached modified patch. Thanks and Regards, Kumar Rajeev Rastogi pgctl_win32service_rel_dbpath_v6.patch Description: pgctl_win32service_rel_dbpath_v6.patch -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] [review] PostgreSQL Service on Windows does not start if data directory given is relative path
Hi Rajeev, From: Rajeev rastogi rajeev.rast...@huawei.com Changed the patch as per your suggestion. Now only one version of make_absolute_path there defined in src/port/path.c Found one small memory leak in the existing function make_absolute_path(miscinit.c), fixed the same. Thanks for refactoring. I confirmed that the revised patch applies to HEAD cleanly, the source files built without extra warnings, and the original intended problem was solved. Please make small cosmetic changes so that make_absolute_path() follows the style of other parts. Then I'll make this ready for committer. (1) Add the function name in the comment as in: /* * make_absolute_path * * ...existing function descripton */ (2) Add errno description as in: fprintf(stderr, _(could not get current working directory: %s\n, strerror(errno))); Regards MauMau -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] [review] PostgreSQL Service on Windows does not start if data directory given is relative path
On 18 February 2014 21:47, MauMau Wrote: We already have two different versions of make_absolute_path() in the tree - one in src/backend/utils/init/miscinit.c and one in src/test/regress/pg_regress.c. I don't think we need a third one. If we put it in port/ like this patch done, then we should make the other callers use it. We might need one for frontend and one for backend (I haven't looked into that much detail), but definitely the one between pg_regress and pg_ctl should be shared. Agreed. Sorry, I should have proposed the refactoring. Rajeev, could you refactor the code so that there is only one make_absolute_path()? I think we can do like this: 1. Delete get_absolute_path() in src/port/path.c. 2. Delete make_absolute_path() in src/test/regress/pg_regress.c. 3. Move make_absolute_path() from src/backend/utils/init/miscinit.c to src/port/path.c, and delete the declaration in miscadmin.h. 4. Modify make_absolute_path() in path.c so that it can be used both in backend and frontend. That is, surround the error message output with #ifdef FRONTEND ... #else ... #endif. See some other source files in src/port. Changed the patch as per your suggestion. Now only one version of make_absolute_path there defined in src/port/path.c Found one small memory leak in the existing function make_absolute_path(miscinit.c), fixed the same. Please find the revised patch. Thanks and Regards, Kumar Rajeev Rastogi pgctl_win32service_rel_dbpath_v5.patch Description: pgctl_win32service_rel_dbpath_v5.patch -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] [review] PostgreSQL Service on Windows does not start if data directory given is relative path
On Mon, Feb 3, 2014 at 3:06 PM, MauMau maumau...@gmail.com wrote: From: Rajeev rastogi rajeev.rast...@huawei.com I will update commitFest with the latest patch immediately after sending the mail. OK, done setting the status to ready for committer. We already have two different versions of make_absolute_path() in the tree - one in src/backend/utils/init/miscinit.c and one in src/test/regress/pg_regress.c. I don't think we need a third one. If we put it in port/ like this patch done, then we should make the other callers use it. We might need one for frontend and one for backend (I haven't looked into that much detail), but definitely the one between pg_regress and pg_ctl should be shared. -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/
Re: [HACKERS] [review] PostgreSQL Service on Windows does not start if data directory given is relative path
From: Magnus Hagander mag...@hagander.net We already have two different versions of make_absolute_path() in the tree - one in src/backend/utils/init/miscinit.c and one in src/test/regress/pg_regress.c. I don't think we need a third one. If we put it in port/ like this patch done, then we should make the other callers use it. We might need one for frontend and one for backend (I haven't looked into that much detail), but definitely the one between pg_regress and pg_ctl should be shared. Agreed. Sorry, I should have proposed the refactoring. Rajeev, could you refactor the code so that there is only one make_absolute_path()? I think we can do like this: 1. Delete get_absolute_path() in src/port/path.c. 2. Delete make_absolute_path() in src/test/regress/pg_regress.c. 3. Move make_absolute_path() from src/backend/utils/init/miscinit.c to src/port/path.c, and delete the declaration in miscadmin.h. 4. Modify make_absolute_path() in path.c so that it can be used both in backend and frontend. That is, surround the error message output with #ifdef FRONTEND ... #else ... #endif. See some other source files in src/port. Regards MauMau -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] [review] PostgreSQL Service on Windows does not start if data directory given is relative path
From: Rajeev rastogi rajeev.rast...@huawei.com Please find the attached revised patch. Thanks, your patch looks good. I confirmed the following: * Applied cleanly to the latest source tree, and built on Linux and Windows (with MSVC) without any warnings. * Changed to D:\ and ran pg_ctl register -N pg -D pgdata, and checked the registry value ImagePath with regedit. It contained -D D:\pgdata. * Changed to D:\pgdata and ran pg_ctl register -N pg -D ..\pgdata, and checked the registry value ImagePath with regedit. It contained -D D:\pgdata. Finally, please change the function description comment of get_absolute_path() so that the style follows other function in path.c. That is: /* * function_name * * Function description */ Then update the CommitFest entry with the latest patch and let me know of that. Then, I'll change the patch status to ready for committer. Regards MauMau -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] [review] PostgreSQL Service on Windows does not start if data directory given is relative path
From: Rajeev rastogi rajeev.rast...@huawei.com I will update commitFest with the latest patch immediately after sending the mail. OK, done setting the status to ready for committer. Regards MauMau -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers