Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jhY7t-0007Oa-N5 for pljava-dev@arkaria.postgresql.org; Sat, 06 Jun 2020 12:40:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jhY7s-0002aT-Lg for pljava-dev@arkaria.postgresql.org; Sat, 06 Jun 2020 12:40:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jhY7s-0002aM-F1 for pljava-dev@lists.postgresql.org; Sat, 06 Jun 2020 12:40:40 +0000 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jhY7r-0006Jy-3P for pljava-dev@lists.postgresql.org; Sat, 06 Jun 2020 12:40:40 +0000 Received: by mail-ej1-x62f.google.com with SMTP id a25so13110880ejg.5 for ; Sat, 06 Jun 2020 05:40:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=o4fyettIeLs2OrctoBoJSTtwj05ZZiPAyT1SjodubQ8=; b=a6G7Ddky5pKBuLHR4P0/e1quJYyQJ4su6UY5dciJCuOnDbpQ9LUhFgrSXWmDRXd7p5 2Ire9g0Ax8MGM8QzRKjaJry+YahMgHZErm+eS4DIr6kF+GIFVpvZDqmKTnROqaTz4pWy qtPBKkiTBGmmmKZjPagF2YgbRdq5ZBs+KejhL+LzEABPKKdy0k1ehvHoxFjrJjJYel7J NUHrnX2j8ftAUmuf8/XwuUYdrziU6IswpkUbAQ6KPW4FROLOosYY2MX6iFYLXasStEjx 6RC2sBXZXkCCC+u2eruj11QQc4VRtWkaaw+EKjRFxB3fgUA73+RMPdA7oZPBS3hxiihx XMtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=o4fyettIeLs2OrctoBoJSTtwj05ZZiPAyT1SjodubQ8=; b=mjSN4Yrmw77r3U2qzCRcOe/RyrtRjOHmjWsPGrR88v5eypN4NzlxaUkFVzVF9F6QwZ /reycF2nP8pqUCd+sTNjcuqUCU/jBVxDHR2LYUUx5F9rS1lywgMiJzNipZZnpKx5QCMQ W4t+/9HRLCZc10dTS9rEZBUd5YB5wdvo/6LNngnYiPQ69XYuYYk5yGwBuQL1LwhMvfa5 SDm+it/c9UGT+ogZblY5IrjdVvl1bKirZDb5iG69/O7GjuADtagMrth5vl4IsG2H21O1 utUoShghs/Gq1x3h0eK0PPubCfYbXYfpyN7WcyWqK/FrEP860vGdYDUrPsD+Ig/kacNr 0mKA== X-Gm-Message-State: AOAM531py3VlrCNl2eU9IoQQ5JkCmxz8reg0cBkA/g6j14S7jQSWXZ1R JGA5B8KzF6+Haz03TntQ1201vazNUrFCdHRePnS55lzO X-Google-Smtp-Source: ABdhPJwXSBbADzpg1iYprf61OY7BRzlGyEAYVP99WlEEH5LUfs9aIUQb8F0XSbJfr+oXFgFHxsoNc6zMxgeOAa5EncU= X-Received: by 2002:a17:906:39d9:: with SMTP id i25mr12872870eje.510.1591447237290; Sat, 06 Jun 2020 05:40:37 -0700 (PDT) MIME-Version: 1.0 References: <5EC17E17.7070002@anastigmatix.net> <5ECED046.3000308@anastigmatix.net> <5ED0FCB0.405@anastigmatix.net> <5ED10C6D.2020000@anastigmatix.net> <5ED10F36.7060304@anastigmatix.net> <5ED15825.9060504@anastigmatix.net> <5ED270BA.9010001@anastigmatix.net> <5ED3D488.1010401@anastigmatix.net> <5ED474CA.3000106@anastigmatix.net> <5ED4EA10.4030801@anastigmatix.net> <5ED7E74B.9020800@anastigmatix.net> <5EDA576E.2000204@anastigmatix.net> In-Reply-To: <5EDA576E.2000204@anastigmatix.net> From: Kartik Ohri Date: Sat, 6 Jun 2020 18:10:26 +0530 Message-ID: Subject: Re: Starting build-system work (Windows/Mac users please speak up) To: Chapman Flack Cc: pljava-dev@lists.postgresql.org Content-Type: multipart/alternative; boundary="00000000000041ee7805a769afd1" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --00000000000041ee7805a769afd1 Content-Type: text/plain; charset="UTF-8" > > or even to experiment with pg_ls_dir(), pg_stat_file(), > pg_read_binary_file() [1] with the name of the JVM DLL or the directory > it lives in, to see if PostgreSQL always gets "Access is denied". > I have played around a bit using your suggestions. It seems this is indeed a permissions issue. The good thing is I was able to find a solution to it. If this turns out to be a necessary step it will be good to get the > details into the PL/Java documentation for Windows, because I'm > pretty sure there's nothing about it in there now. > The solution is to use *pg_ctl* to start the postgres server from a shell with appropriate permissions. Earlier, I was trying to start the postgres server using *net start *in CMD and *Start-Service* in PowerShell. Even with privileged shells, postgres created using these commands do not have the necessary rights to some directories (including the Java directory, hence, the libjvm location error). I was unable to figure out why this happens. I am now using pg_ctl to start the database. This is causing some issues in the normal mode. The build stalls right after postgres starts. This does not happen when the server is started using the other 2 options. I am working on fixing this. However, in the interactive debug mode, I have been able to use pg_ctl with success. I have run all the usual tests as on other platforms except the -Xcheck:jni and all of these work. Once this issue is fixed we will have a fully functional MSVC Windows build. I'll let you know once this is done. Thanks. --00000000000041ee7805a769afd1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
or even to experiment with pg_ls_dir(), pg_stat_file(),<= br> pg_read_binary_file() [1] with the name of the JVM DLL or the directory
it lives in, to see if PostgreSQL always gets "Access is denied".=
=C2=A0
I have played around a bit using you= r suggestions. It seems this is indeed a permissions issue. The good thing = is I was able to find a solution to it.

If this turns out to be a necessary step it will be good to get the
details into the PL/Java documentation for Windows, because I'm
pretty sure there's nothing about it in there now.

The solution is to use pg_ctl to start the postgres = server from a shell with appropriate permissions. Earlier, I was trying to = start the postgres server using net start in CMD and Start-Servic= e=C2=A0in PowerShell. Even with privileged shells, postgres created usi= ng these commands do not have the necessary rights to some directories (inc= luding the Java=C2=A0directory, hence, the libjvm location error). I was un= able to figure out why this happens.=C2=A0

I am no= w using pg_ctl to start the database. This is causing some issues in the no= rmal mode. The build stalls right after postgres starts. This does not happ= en when the server is started using the other 2 options. I am working on fi= xing this. However, in the interactive debug mode, I have been able to use = pg_ctl with success. I have run all the usual tests as on other platforms e= xcept the -Xcheck:jni and all of these work.=C2=A0

Once this issue is fixed we will have a fully functional MSVC Windows buil= d. I'll let you know once this is done. Thanks.
--00000000000041ee7805a769afd1--