Lists: | pgsql-hackers |
---|
From: | "Ryohei Takahashi (Fujitsu)" <r(dot)takahashi_2(at)fujitsu(dot)com> |
---|---|
To: | "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | doc: pgevent.dll location |
Date: | 2024-11-05 03:02:23 |
Message-ID: | TY3PR01MB118912125614599641CA881B782522@TY3PR01MB11891.jpnprd01.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hi,
PostgreSQL 17.0 Documentation teach us to run the following command.
regsvr32 pgsql_library_directory/pgevent.dll
On the other hand, pgevent.dll is moved from lib/ directory to bin/directory on PG 17.0
(It seems that it is moved because of meson)
So, I think the documentation need to be updated like attached.
How do you think about this?
Regards,
Ryohei Takahashi
Attachment | Content-Type | Size |
---|---|---|
001-doc-pgevent.patch | application/octet-stream | 1.7 KB |
From: | Gurjeet Singh <gurjeet(at)singh(dot)im> |
---|---|
To: | "Ryohei Takahashi (Fujitsu)" <r(dot)takahashi_2(at)fujitsu(dot)com> |
Cc: | "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: doc: pgevent.dll location |
Date: | 2024-11-05 06:00:10 |
Message-ID: | CABwTF4WczBfnRcqPpF+bfGbBXnv69TtauScokDSRYUvEHSSKDw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Mon, Nov 4, 2024 at 7:02 PM Ryohei Takahashi (Fujitsu)
<r(dot)takahashi_2(at)fujitsu(dot)com> wrote:
>
> On the other hand, pgevent.dll is moved from lib/ directory to bin/directory on PG 17.0
>
> (It seems that it is moved because of meson)
>
> So, I think the documentation need to be updated like attached.
I'm unable to confirm the veracity of the claim that the pgevent.dll
file on Windows is now placed in a different directory, and that this
is a result of meson builds. But the patch looks good to me; it
applies cleanly to REL_17_STABLE and main branches.
Best regards,
Gurjeet
http://Gurje.et
From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Gurjeet Singh <gurjeet(at)singh(dot)im> |
Cc: | "Ryohei Takahashi (Fujitsu)" <r(dot)takahashi_2(at)fujitsu(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: doc: pgevent.dll location |
Date: | 2024-11-05 15:09:54 |
Message-ID: | CA+Tgmoa_kC1T5PR0C7K0cGo1OEPx2c4zQ13ziwqm=pz7K_367g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Tue, Nov 5, 2024 at 1:00 AM Gurjeet Singh <gurjeet(at)singh(dot)im> wrote:
> I'm unable to confirm the veracity of the claim that the pgevent.dll
> file on Windows is now placed in a different directory, and that this
> is a result of meson builds. But the patch looks good to me; it
> applies cleanly to REL_17_STABLE and main branches.
I think we will need to find someone who can confirm whether or not
the claim is correct.
--
Robert Haas
EDB: http://www.enterprisedb.com
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Gurjeet Singh <gurjeet(at)singh(dot)im>, "Ryohei Takahashi (Fujitsu)" <r(dot)takahashi_2(at)fujitsu(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: doc: pgevent.dll location |
Date: | 2024-11-05 15:15:48 |
Message-ID: | 3051355.1730819748@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Tue, Nov 5, 2024 at 1:00 AM Gurjeet Singh <gurjeet(at)singh(dot)im> wrote:
>> I'm unable to confirm the veracity of the claim that the pgevent.dll
>> file on Windows is now placed in a different directory, and that this
>> is a result of meson builds. But the patch looks good to me; it
>> applies cleanly to REL_17_STABLE and main branches.
> I think we will need to find someone who can confirm whether or not
> the claim is correct.
More to the point: if that does happen, isn't it a bug to be fixed
rather than documented?
regards, tom lane
From: | Dave Page <dpage(at)pgadmin(dot)org> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Gurjeet Singh <gurjeet(at)singh(dot)im>, "Ryohei Takahashi (Fujitsu)" <r(dot)takahashi_2(at)fujitsu(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: doc: pgevent.dll location |
Date: | 2024-11-05 15:27:03 |
Message-ID: | CA+OCxoywke+6M7yO7-eUD4RwJiuGk-ydCJqh3bkbG3PjoLAhWg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Tue, 5 Nov 2024 at 15:10, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Tue, Nov 5, 2024 at 1:00 AM Gurjeet Singh <gurjeet(at)singh(dot)im> wrote:
> > I'm unable to confirm the veracity of the claim that the pgevent.dll
> > file on Windows is now placed in a different directory, and that this
> > is a result of meson builds. But the patch looks good to me; it
> > applies cleanly to REL_17_STABLE and main branches.
>
> I think we will need to find someone who can confirm whether or not
> the claim is correct.
>
It is correct. In v16, it was in lib/, in v17, bin/.
However, on Windows I think it probably makes (marginally) more sense to
include it in bin/ - we already have other libraries in there that are
linked at compile time. pgevent is something of a special case, but it's
probably more similar to those libraries than the extensions etc. that are
in lib/.
Related sidenote: I got a complaint today that pg_regress.exe is no longer
part of the Windows installation footprint - and indeed, it's not installed
at all with Meson builds, which is problematic for those doing CI/CD
testing of extensions.
--
Dave Page
pgAdmin: https://www.pgadmin.org
PostgreSQL:
From: | "Ryohei Takahashi (Fujitsu)" <r(dot)takahashi_2(at)fujitsu(dot)com> |
---|---|
To: | 'Dave Page' <dpage(at)pgadmin(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Gurjeet Singh <gurjeet(at)singh(dot)im>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | RE: doc: pgevent.dll location |
Date: | 2024-11-06 12:57:42 |
Message-ID: | TY3PR01MB118914759E215A415D418B42B82532@TY3PR01MB11891.jpnprd01.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hi,
Thank you for your reply.
The dll install paths are changed as follows on Windows.
(1) pgevent.dll
PG16: lib/
PG17: bin/
(2) dll for user (like libpq.dll, libecpg.dll)
PG16: Both in lib/ and bin/
PG17: bin/
(3) contrib dll (like amcheck.dll)
PG16: lib/
PG17: lib/
I understand that Dave says (1) and (2) should exist on bin/ directory
and the paths in PG17 are correct.
So, I think it is correct to update documentation.
Regards,
Ryohei Takahashi
From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | "Ryohei Takahashi (Fujitsu)" <r(dot)takahashi_2(at)fujitsu(dot)com>, 'Dave Page' <dpage(at)pgadmin(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Gurjeet Singh <gurjeet(at)singh(dot)im>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: doc: pgevent.dll location |
Date: | 2024-11-06 16:11:43 |
Message-ID: | c03e069d-7220-453d-9c5d-9fcc74518be0@eisentraut.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 06.11.24 13:57, Ryohei Takahashi (Fujitsu) wrote:
> The dll install paths are changed as follows on Windows.
>
> (1) pgevent.dll
> PG16: lib/
> PG17: bin/
>
> (2) dll for user (like libpq.dll, libecpg.dll)
> PG16: Both in lib/ and bin/
> PG17: bin/
>
> (3) contrib dll (like amcheck.dll)
> PG16: lib/
> PG17: lib/
>
>
> I understand that Dave says (1) and (2) should exist on bin/ directory
> and the paths in PG17 are correct.
>
> So, I think it is correct to update documentation.
I don't have Windows handy to test it out, but looking at the respective
build system source files, in master, pgevent is built and installed
like a normal shared library in both meson.build and Makefile, so it
should end up somewhere in lib.
In src/tools/msvc in REL_16_STABLE, I see some code that appears to
suggest that it installs in bin.
Again, this is just reading the code, but it seems to be backwards from
what is claimed earlier.
The statements like "in PGxxx it did this" are not precise enough
because there are three possible build systems. We need to know what
each build system is doing. Also, the consideration of consistency
should go in two dimensions: Consistency between versions and
consistency between build systems.
From: | Dave Page <dpage(at)pgadmin(dot)org> |
---|---|
To: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
Cc: | "Ryohei Takahashi (Fujitsu)" <r(dot)takahashi_2(at)fujitsu(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Gurjeet Singh <gurjeet(at)singh(dot)im>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: doc: pgevent.dll location |
Date: | 2024-11-07 08:16:14 |
Message-ID: | CA+OCxoygUCBN833mWDVubLieW0f0U_3q8yRfd1b91Bd78YGdWg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hi
On Wed, 6 Nov 2024 at 16:11, Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
> On 06.11.24 13:57, Ryohei Takahashi (Fujitsu) wrote:
> > The dll install paths are changed as follows on Windows.
> >
> > (1) pgevent.dll
> > PG16: lib/
> > PG17: bin/
> >
> > (2) dll for user (like libpq.dll, libecpg.dll)
> > PG16: Both in lib/ and bin/
> > PG17: bin/
> >
> > (3) contrib dll (like amcheck.dll)
> > PG16: lib/
> > PG17: lib/
> >
> >
> > I understand that Dave says (1) and (2) should exist on bin/ directory
> > and the paths in PG17 are correct.
> >
> > So, I think it is correct to update documentation.
>
> I don't have Windows handy to test it out, but looking at the respective
> build system source files, in master, pgevent is built and installed
> like a normal shared library in both meson.build and Makefile, so it
> should end up somewhere in lib.
>
> In src/tools/msvc in REL_16_STABLE, I see some code that appears to
> suggest that it installs in bin.
>
> Again, this is just reading the code, but it seems to be backwards from
> what is claimed earlier.
I downloaded the builds of v16 and v17 from
https://github.com/dpage/winpgbuild/actions/runs/11639786998, a project
worked on by Andres, Dave Cramer, and myself.
I've just double-checked I didn't get mixed up, and can confirm that in
v17, pgevent.dll is installed into bin/ and in v16.4, it's in lib/
>
> The statements like "in PGxxx it did this" are not precise enough
> because there are three possible build systems. We need to know what
> each build system is doing. Also, the consideration of consistency
> should go in two dimensions: Consistency between versions and
> consistency between build systems.
>
Yeah, sorry - I tend not to even think about Cygwin or Msys builds as they
haven't been used for "official" builds on Windows in many, many years.
The builds I'm testing are MSVC++ using the old perl based build system for
v16, and MSVC++ using Meson for v17. You can see exactly how they're done
in the Github Action script for the action run above.
From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Dave Page <dpage(at)pgadmin(dot)org> |
Cc: | Peter Eisentraut <peter(at)eisentraut(dot)org>, "Ryohei Takahashi (Fujitsu)" <r(dot)takahashi_2(at)fujitsu(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Gurjeet Singh <gurjeet(at)singh(dot)im>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: doc: pgevent.dll location |
Date: | 2024-11-11 11:11:51 |
Message-ID: | CAA4eK1JcN8ea6mL76+mOsMJa2UPbVfLF+f3BpP=+FQVDbpk1OQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Thu, Nov 7, 2024 at 1:46 PM Dave Page <dpage(at)pgadmin(dot)org> wrote:
>
> Hi
>
> On Wed, 6 Nov 2024 at 16:11, Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>>
>> On 06.11.24 13:57, Ryohei Takahashi (Fujitsu) wrote:
>> > The dll install paths are changed as follows on Windows.
>> >
>> > (1) pgevent.dll
>> > PG16: lib/
>> > PG17: bin/
>> >
>> > (2) dll for user (like libpq.dll, libecpg.dll)
>> > PG16: Both in lib/ and bin/
>> > PG17: bin/
>> >
>> > (3) contrib dll (like amcheck.dll)
>> > PG16: lib/
>> > PG17: lib/
>> >
>> >
>> > I understand that Dave says (1) and (2) should exist on bin/ directory
>> > and the paths in PG17 are correct.
>> >
>> > So, I think it is correct to update documentation.
>>
>> I don't have Windows handy to test it out, but looking at the respective
>> build system source files, in master, pgevent is built and installed
>> like a normal shared library in both meson.build and Makefile, so it
>> should end up somewhere in lib.
>>
>> In src/tools/msvc in REL_16_STABLE, I see some code that appears to
>> suggest that it installs in bin.
>>
>> Again, this is just reading the code, but it seems to be backwards from
>> what is claimed earlier.
>
>
> I downloaded the builds of v16 and v17 from
> https://github.com/dpage/winpgbuild/actions/runs/11639786998, a project worked on by Andres, Dave Cramer, and myself.
>
> I've just double-checked I didn't get mixed up, and can confirm that in v17, pgevent.dll is installed into bin/ and in v16.4, it's in lib/
>
I can re-confirm that on my Windows setup, pgevent.dll is present in
bin/ for PG17 and HEAD and in lib/ for PG16.
--
With Regards,
Amit Kapila.
From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
Cc: | "Ryohei Takahashi (Fujitsu)" <r(dot)takahashi_2(at)fujitsu(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>, Gurjeet Singh <gurjeet(at)singh(dot)im>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: doc: pgevent.dll location |
Date: | 2024-11-12 16:02:53 |
Message-ID: | CA+TgmoZ+yTDsL7-u62O1F=YXag8WXqBNDdxy22kfJq_avyKEtg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Wed, Nov 6, 2024 at 11:11 AM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
> I don't have Windows handy to test it out, but looking at the respective
> build system source files, in master, pgevent is built and installed
> like a normal shared library in both meson.build and Makefile, so it
> should end up somewhere in lib.
>
> In src/tools/msvc in REL_16_STABLE, I see some code that appears to
> suggest that it installs in bin.
>
> Again, this is just reading the code, but it seems to be backwards from
> what is claimed earlier.
>
> The statements like "in PGxxx it did this" are not precise enough
> because there are three possible build systems. We need to know what
> each build system is doing. Also, the consideration of consistency
> should go in two dimensions: Consistency between versions and
> consistency between build systems.
To what three systems are you referring? I thought we now only
supported building with meson on Windows, and this is a
Windows-specific file. Everyone seems to be saying the file has moved
in v17, so it seems like we should either move it back or update the
documentation as proposed. The question of why it has moved is perhaps
worth some investigation, but seems like a secondary issue.
--
Robert Haas
EDB: http://www.enterprisedb.com
From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | "Ryohei Takahashi (Fujitsu)" <r(dot)takahashi_2(at)fujitsu(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>, Gurjeet Singh <gurjeet(at)singh(dot)im>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: doc: pgevent.dll location |
Date: | 2024-11-12 16:52:27 |
Message-ID: | 130a8a66-c5eb-49d4-bba9-8ff473c4a0c2@eisentraut.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 12.11.24 17:02, Robert Haas wrote:
> On Wed, Nov 6, 2024 at 11:11 AM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>> I don't have Windows handy to test it out, but looking at the respective
>> build system source files, in master, pgevent is built and installed
>> like a normal shared library in both meson.build and Makefile, so it
>> should end up somewhere in lib.
>>
>> In src/tools/msvc in REL_16_STABLE, I see some code that appears to
>> suggest that it installs in bin.
>>
>> Again, this is just reading the code, but it seems to be backwards from
>> what is claimed earlier.
>>
>> The statements like "in PGxxx it did this" are not precise enough
>> because there are three possible build systems. We need to know what
>> each build system is doing. Also, the consideration of consistency
>> should go in two dimensions: Consistency between versions and
>> consistency between build systems.
>
> To what three systems are you referring? I thought we now only
> supported building with meson on Windows, and this is a
> Windows-specific file. Everyone seems to be saying the file has moved
> in v17, so it seems like we should either move it back or update the
> documentation as proposed. The question of why it has moved is perhaps
> worth some investigation, but seems like a secondary issue.
The three possible build systems are:
1. src/tools/msvc/
2. meson
3. make
The first one was removed, but the second and the third one still exist.
I can tell from the build farm logs (fairywren) that on master with
meson the installation layout is
Installing src\\bin\\pgevent\\pgevent.dll to
C:/tools/xmsys64/home/pgrunner/bf/root/HEAD/inst\\bin
Installing src\\bin\\pgevent\\pgevent.dll.a to
C:/tools/xmsys64/home/pgrunner/bf/root/HEAD/inst\\lib
This appears to be the meson default for shared libraries, because we
also have
Installing src/interfaces/libpq\\libpq.dll to
C:/tools/xmsys64/home/pgrunner/bf/root/HEAD/inst\\bin
Installing src/interfaces/libpq\\libpq.dll.a to
C:/tools/xmsys64/home/pgrunner/bf/root/HEAD/inst\\lib
We don't have any coverage on master for make on Windows, but I can see
on REL_15_STABLE (fairywren)
/usr/bin/install -c -m 755 pgevent.dll
'/home/pgrunner/bf/root/REL_15_STABLE/inst/lib/postgresql/pgevent.dll'
and I strongly suspect that this is unchanged in master.
Note here that meson installs this file as a shared library (like libpq)
but make installs this file as a shared module (like plpgsql).
Also, looking at the source code of the old msvc build system
(Install.pm, sub CopySolutionOutput), it will install this file into lib
in the logic that is is a "dll" file that is *not* a shared library (has
no SO_MAJOR_VERSION set). So the msvc system appears to be consistent
with the make system in that respect.
So the most straightforward way to "make it work like it used to" would
be to change src/bin/pgevent/meson.build to use shared_module() instead
of shared_library().
Based on the explanation in the documentation, this file is really more
of a plugin and less a shared library, so I think that approach would be
more correct than not.
From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
Cc: | "Ryohei Takahashi (Fujitsu)" <r(dot)takahashi_2(at)fujitsu(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>, Gurjeet Singh <gurjeet(at)singh(dot)im>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: doc: pgevent.dll location |
Date: | 2024-11-12 17:27:37 |
Message-ID: | CA+TgmoY9f+rapcAGHMeFvXhG6S9j9rmRvxsTiMCk5g=dFXuTdw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Tue, Nov 12, 2024 at 11:52 AM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
> So the most straightforward way to "make it work like it used to" would
> be to change src/bin/pgevent/meson.build to use shared_module() instead
> of shared_library().
>
> Based on the explanation in the documentation, this file is really more
> of a plugin and less a shared library, so I think that approach would be
> more correct than not.
I don't understand what the difference is between a shared module and
a shared library, so I find it odd that meson treats them differently.
However, if the consensus is that moving it back to lib is better than
updating the documentation, that's fine with me.
--
Robert Haas
EDB: http://www.enterprisedb.com
From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | "Ryohei Takahashi (Fujitsu)" <r(dot)takahashi_2(at)fujitsu(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>, Gurjeet Singh <gurjeet(at)singh(dot)im>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: doc: pgevent.dll location |
Date: | 2024-11-12 20:06:10 |
Message-ID: | 0df0d076-3967-4857-b989-d2c7b401c76d@eisentraut.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 12.11.24 18:27, Robert Haas wrote:
> On Tue, Nov 12, 2024 at 11:52 AM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>> So the most straightforward way to "make it work like it used to" would
>> be to change src/bin/pgevent/meson.build to use shared_module() instead
>> of shared_library().
>>
>> Based on the explanation in the documentation, this file is really more
>> of a plugin and less a shared library, so I think that approach would be
>> more correct than not.
>
> I don't understand what the difference is between a shared module and
> a shared library, so I find it odd that meson treats them differently.
In this context, a shared module is something like plpgsql or hstore
that you dlopen, and a shared library is something like libpq or libecpg
that you -l at build time.
From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
Cc: | "Ryohei Takahashi (Fujitsu)" <r(dot)takahashi_2(at)fujitsu(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>, Gurjeet Singh <gurjeet(at)singh(dot)im>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: doc: pgevent.dll location |
Date: | 2024-11-12 21:11:44 |
Message-ID: | CA+TgmoaCFjcUmRu-GMV3E1G3wZLDm8O+-4XYdW8Zx_P2Z4+qqQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Tue, Nov 12, 2024 at 3:06 PM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
> On 12.11.24 18:27, Robert Haas wrote:
> > On Tue, Nov 12, 2024 at 11:52 AM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
> >> So the most straightforward way to "make it work like it used to" would
> >> be to change src/bin/pgevent/meson.build to use shared_module() instead
> >> of shared_library().
> >>
> >> Based on the explanation in the documentation, this file is really more
> >> of a plugin and less a shared library, so I think that approach would be
> >> more correct than not.
> >
> > I don't understand what the difference is between a shared module and
> > a shared library, so I find it odd that meson treats them differently.
>
> In this context, a shared module is something like plpgsql or hstore
> that you dlopen, and a shared library is something like libpq or libecpg
> that you -l at build time.
That's interesting, but I would have thought both of those would go in
libdir (or a subdirectory) not bindir.
--
Robert Haas
EDB: http://www.enterprisedb.com
From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Peter Eisentraut <peter(at)eisentraut(dot)org>, "Ryohei Takahashi (Fujitsu)" <r(dot)takahashi_2(at)fujitsu(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>, Gurjeet Singh <gurjeet(at)singh(dot)im>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: doc: pgevent.dll location |
Date: | 2024-11-12 21:25:41 |
Message-ID: | nq2yqzbtjwgpojrdw6z7m5nwxw3zmjj2m4riwzlsiafjzvdf4y@zb3a37qn4z33 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hi,
On 2024-11-12 16:11:44 -0500, Robert Haas wrote:
> On Tue, Nov 12, 2024 at 3:06 PM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
> > In this context, a shared module is something like plpgsql or hstore
> > that you dlopen, and a shared library is something like libpq or libecpg
> > that you -l at build time.
>
> That's interesting, but I would have thought both of those would go in
> libdir (or a subdirectory) not bindir.
That's true on unixoid systems, but due to the way library searchpaths work on
windows, you pretty much need to store them alongside the binary. Otherwise
the dynamic linker won't find the library. And because that happens before
application code is executed, you don't have a chance to specify a different
path ([1]). So on windows shared libraries are typically located alongside
the executable. Which we did for src/tools/msvc and do for make/meson based
builds on windows.
In contrast to that, if you do dlopen() with an explicit path, you can
obviously locate the file anywhere. So for postgres extension libs etc we
could keep them in lib/.
But it's not entirely clear how to describe pgevent.dll - which lead to the
change between src/tools/msvc and meson based builds.
FWIW, the main reason for the shared_library() vs shared_module() distinction
are macos and windows (and also AIX), where the build process for them is
different than on most unices. Libraries aren't allowed to have undefined
symbols there. That's fine for typical dynamic libraries, but for plugin style
things, it means they explicitly need to told where the symbols come from. On
windows by listing the symbols, on macos by explicitly linking extensions
against the postgres binary.
Greetings,
Andres Freund
[1] well, there are some hacky ways to execute code earlier and change the
library path, but it's quite complicated
From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, "Ryohei Takahashi (Fujitsu)" <r(dot)takahashi_2(at)fujitsu(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>, Gurjeet Singh <gurjeet(at)singh(dot)im> |
Subject: | Re: doc: pgevent.dll location |
Date: | 2024-11-13 08:53:36 |
Message-ID: | 6feeda05-6d12-45b5-b15a-2e4d6cb96734@eisentraut.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 12.11.24 17:52, Peter Eisentraut wrote:
> So the most straightforward way to "make it work like it used to" would
> be to change src/bin/pgevent/meson.build to use shared_module() instead
> of shared_library().
I developed the attached patch for this.
I haven't tested it locally, but I checked in the CI logs that the build
commands for pgevent don't change with this. CI doesn't test meson
install, it seems, so can't actually tell whether this changes the
installation directory successfully, but I think it should work.
Someone with Windows handy please give this a test.
Attachment | Content-Type | Size |
---|---|---|
0001-meson-Build-pgevent-as-shared_module-rather-than-sha.patch | text/plain | 1.4 KB |
From: | "Ryohei Takahashi (Fujitsu)" <r(dot)takahashi_2(at)fujitsu(dot)com> |
---|---|
To: | 'Peter Eisentraut' <peter(at)eisentraut(dot)org>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>, Gurjeet Singh <gurjeet(at)singh(dot)im> |
Subject: | RE: doc: pgevent.dll location |
Date: | 2024-11-15 13:53:52 |
Message-ID: | TY3PR01MB11891FF9FF2BAAF08FD1DBF8F82242@TY3PR01MB11891.jpnprd01.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hi,
Thank you for your patch.
The patch worked in my Windows build environment and pgevent.dll is installed to lib/ directory.
Regards,
Ryohei Takahashi
From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | "Ryohei Takahashi (Fujitsu)" <r(dot)takahashi_2(at)fujitsu(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>, Gurjeet Singh <gurjeet(at)singh(dot)im> |
Subject: | Re: doc: pgevent.dll location |
Date: | 2024-11-26 17:15:45 |
Message-ID: | c7ced732-ff72-45ce-b32d-2654fd35bec5@eisentraut.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 15.11.24 14:53, Ryohei Takahashi (Fujitsu) wrote:
> Thank you for your patch.
> The patch worked in my Windows build environment and pgevent.dll is installed to lib/ directory.
Thanks for checking. I have committed this patch and backpatched it to
PG16 and PG17. So the next minor releases will presumably have the file
back in the correct place.
From: | "Ryohei Takahashi (Fujitsu)" <r(dot)takahashi_2(at)fujitsu(dot)com> |
---|---|
To: | 'Peter Eisentraut' <peter(at)eisentraut(dot)org>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>, Gurjeet Singh <gurjeet(at)singh(dot)im> |
Subject: | RE: doc: pgevent.dll location |
Date: | 2024-11-29 11:41:39 |
Message-ID: | OS7PR01MB118824023F09AE2EC64F3C2BC822A2@OS7PR01MB11882.jpnprd01.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hi,
Thank you for your commit.
Regards,
Ryohei Takahashi