pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
XA registry entries are missing from 64-bit install
7+ messages / 3 participants
[nested] [flat]

* XA registry entries are missing from 64-bit install
@ 2014-06-12 03:52 Craig Ringer <craig@2ndquadrant.com>
  2014-06-12 03:54 ` Re: XA registry entries are missing from 64-bit install Craig Ringer <craig@2ndquadrant.com>
  2014-06-12 06:02 ` Re: XA registry entries are missing from 64-bit install Inoue, Hiroshi <inoue@tpf.co.jp>
  0 siblings, 2 replies; 7+ messages in thread

From: Craig Ringer @ 2014-06-12 03:52 UTC (permalink / raw)
  To: pgsql-odbc

Hi folks

A customer has pointed out as part of debugging an ODBC and MSDTC
related test case that the registry entries registering pgxalib.dll as a
valid XA transaction provider are not installed by the 64-bit MSI.

They're correctly created by the 32-bit installer MSI, at least on
64-bit Windows, where they appear in syswow64.

The missing entry is:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\XADLL]
"pgxalib.dll"="C:\Program Files\psqlODBC\0901\bin\pgxalib.dll"

but

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSDTC\XADLL]
"pgxalib.dll"="C:\Program Files (x86)\psqlODBC\0901\bin\pgxalib.dll"

is correctly created.

When I uninstalled 901 and reinstalled 903-300, neither entry was
removed or updated, so XA configuration was broken on both 32- and 64-bit.

This results in errors like:

    MSDTC XARMCreate Error

when using MSDTC apps.

I'm working on rebuilding the driver in its debug configuration to chase
some XA issues at the moment. When I've got that sorted out I'll see if
I can build an installer patch.


-- 
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: XA registry entries are missing from 64-bit install
  2014-06-12 03:52 XA registry entries are missing from 64-bit install Craig Ringer <craig@2ndquadrant.com>
@ 2014-06-12 03:54 ` Craig Ringer <craig@2ndquadrant.com>
  1 sibling, 0 replies; 7+ messages in thread

From: Craig Ringer @ 2014-06-12 03:54 UTC (permalink / raw)
  To: pgsql-odbc

On 06/12/2014 11:52 AM, Craig Ringer wrote:
> Hi folks
> 
> A customer has pointed out as part of debugging an ODBC and MSDTC
> related test case that the registry entries registering pgxalib.dll as a
> valid XA transaction provider are not installed by the 64-bit MSI.
> 
> They're correctly created by the 32-bit installer MSI, at least on
> 64-bit Windows, where they appear in syswow64.
> 
> The missing entry is:
> 
> [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\XADLL]
> "pgxalib.dll"="C:\Program Files\psqlODBC\0901\bin\pgxalib.dll"
> 
> but
> 
> [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSDTC\XADLL]
> "pgxalib.dll"="C:\Program Files (x86)\psqlODBC\0901\bin\pgxalib.dll"

Oh, I forgot to mention the relevant MSDN article:

http://support.microsoft.com/kb/817066

which documents these entries and when they're required.


-- 
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: XA registry entries are missing from 64-bit install
  2014-06-12 03:52 XA registry entries are missing from 64-bit install Craig Ringer <craig@2ndquadrant.com>
@ 2014-06-12 06:02 ` Inoue, Hiroshi <inoue@tpf.co.jp>
  2014-06-12 08:28   ` Re: XA registry entries are missing from 64-bit install Craig Ringer <craig@2ndquadrant.com>
  1 sibling, 1 reply; 7+ messages in thread

From: Inoue, Hiroshi @ 2014-06-12 06:02 UTC (permalink / raw)
  To: Craig Ringer <craig@2ndquadrant.com>; +Cc: pgsql-odbc

(2014/06/12 12:52), Craig Ringer wrote:
> Hi folks
>
> A customer has pointed out as part of debugging an ODBC and MSDTC
> related test case that the registry entries registering pgxalib.dll as a
> valid XA transaction provider are not installed by the 64-bit MSI.
>
> They're correctly created by the 32-bit installer MSI, at least on
> 64-bit Windows, where they appear in syswow64.

The installer MSIs don't create the registry entries currently.
pgenlist(a).dll associated with the drivers try to create the
entries when (maybe first) IDtcToXaHelperSinglePipe::XARMCreate()
call fails. Invoking 64bit MSDTC related applications would resolve
the problem if possible.

Because msdtc process seems a 64bit application, 64bit pgxalib.dll
should be registered even when 32bit applications use MSDTC support.
The current way of registration isn't appropriate and 64bit installer 
would have to register the entry beforehand.

regards,
Hiroshi Inoue


-- 
I am using the free version of SPAMfighter.
SPAMfighter has removed 10777 of my spam emails to date.
Get the free SPAMfighter here: http://www.spamfighter.com/len

Do you have a slow PC? Try a Free scan 
http://www.spamfighter.com/SLOW-PCfighter?cid=sigen



-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: XA registry entries are missing from 64-bit install
  2014-06-12 03:52 XA registry entries are missing from 64-bit install Craig Ringer <craig@2ndquadrant.com>
  2014-06-12 06:02 ` Re: XA registry entries are missing from 64-bit install Inoue, Hiroshi <inoue@tpf.co.jp>
@ 2014-06-12 08:28   ` Craig Ringer <craig@2ndquadrant.com>
  2014-06-12 09:12     ` Re: XA registry entries are missing from 64-bit install Craig Ringer <craig@2ndquadrant.com>
  2014-06-12 21:12     ` Re: XA registry entries are missing from 64-bit install Inoue, Hiroshi <inoue@tpf.co.jp>
  0 siblings, 2 replies; 7+ messages in thread

From: Craig Ringer @ 2014-06-12 08:28 UTC (permalink / raw)
  To: Inoue, Hiroshi <inoue@tpf.co.jp>; +Cc: pgsql-odbc

On 06/12/2014 02:02 PM, Inoue, Hiroshi wrote:
> 
> 
> Because msdtc process seems a 64bit application, 64bit pgxalib.dll
> should be registered even when 32bit applications use MSDTC support.
> The current way of registration isn't appropriate and 64bit installer
> would have to register the entry beforehand.

OK, so if I understand this right, it might be helpful to have
pgenlist.dll expose a function that's callable with rundll32 to create
the registry entries. Call it, say, registerxa().

Then the registry entry creation code currently in
EnlistInDtc_1pipe(...) could be factored out so it's callable as part of
EnlistInDtc_1pipe(...) or via the new entry point.

The installer can then invoke

    rundll32 pgenlist.dll,registerxa

to create the appropriate entries.

Reasonable?

Or is it better to just create/update the registry entries directly
using the MSI?

Looking at the current code, it appears that it tries to overwrite any
existing value in that subkey if XA enlistment fails. So it should also
"upgrade" existing entries. Right?

-- 
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: XA registry entries are missing from 64-bit install
  2014-06-12 03:52 XA registry entries are missing from 64-bit install Craig Ringer <craig@2ndquadrant.com>
  2014-06-12 06:02 ` Re: XA registry entries are missing from 64-bit install Inoue, Hiroshi <inoue@tpf.co.jp>
  2014-06-12 08:28   ` Re: XA registry entries are missing from 64-bit install Craig Ringer <craig@2ndquadrant.com>
@ 2014-06-12 09:12     ` Craig Ringer <craig@2ndquadrant.com>
  1 sibling, 0 replies; 7+ messages in thread

From: Craig Ringer @ 2014-06-12 09:12 UTC (permalink / raw)
  To: Inoue, Hiroshi <inoue@tpf.co.jp>; +Cc: pgsql-odbc

On 06/12/2014 04:28 PM, Craig Ringer wrote:
> On 06/12/2014 02:02 PM, Inoue, Hiroshi wrote:
>>
>>
>> Because msdtc process seems a 64bit application, 64bit pgxalib.dll
>> should be registered even when 32bit applications use MSDTC support.
>> The current way of registration isn't appropriate and 64bit installer
>> would have to register the entry beforehand.
> 
> OK, so if I understand this right, it might be helpful to have
> pgenlist.dll expose a function that's callable with rundll32 to create
> the registry entries. Call it, say, registerxa().
> 
> Then the registry entry creation code currently in
> EnlistInDtc_1pipe(...) could be factored out so it's callable as part of
> EnlistInDtc_1pipe(...) or via the new entry point.
> 
> The installer can then invoke
> 
>     rundll32 pgenlist.dll,registerxa
> 
> to create the appropriate entries.
> 
> Reasonable?
> 
> Or is it better to just create/update the registry entries directly
> using the MSI?

Looks like it might be.

http://wixtoolset.org/documentation/manual/v3/howtos/files_and_registry/write_a_registry_entry.html

and the entry should be able to be generated within the WiX file using
the properties like the version and install path.


-- 
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: XA registry entries are missing from 64-bit install
  2014-06-12 03:52 XA registry entries are missing from 64-bit install Craig Ringer <craig@2ndquadrant.com>
  2014-06-12 06:02 ` Re: XA registry entries are missing from 64-bit install Inoue, Hiroshi <inoue@tpf.co.jp>
  2014-06-12 08:28   ` Re: XA registry entries are missing from 64-bit install Craig Ringer <craig@2ndquadrant.com>
@ 2014-06-12 21:12     ` Inoue, Hiroshi <inoue@tpf.co.jp>
  2014-06-13 03:59       ` Re: XA registry entries are missing from 64-bit install Hiroshi Inoue <inoue@tpf.co.jp>
  1 sibling, 1 reply; 7+ messages in thread

From: Inoue, Hiroshi @ 2014-06-12 21:12 UTC (permalink / raw)
  To: Craig Ringer <craig@2ndquadrant.com>; +Cc: pgsql-odbc



(2014/06/12 17:28), Craig Ringer wrote:
> On 06/12/2014 02:02 PM, Inoue, Hiroshi wrote:
>>
>>
>> Because msdtc process seems a 64bit application, 64bit pgxalib.dll
>> should be registered even when 32bit applications use MSDTC support.
>> The current way of registration isn't appropriate and 64bit installer
>> would have to register the entry beforehand.
>
> OK, so if I understand this right, it might be helpful to have
> pgenlist.dll expose a function that's callable with rundll32 to create
> the registry entries. Call it, say, registerxa().

It should be done for pgxalib.dll not pgenlist(a).dll if we do
such kind of registration.

> Then the registry entry creation code currently in
> EnlistInDtc_1pipe(...) could be factored out so it's callable as part of
> EnlistInDtc_1pipe(...) or via the new entry point.
>
> The installer can then invoke
>
>      rundll32 pgenlist.dll,registerxa
>
> to create the appropriate entries.
>
> Reasonable?
>
> Or is it better to just create/update the registry entries directly
> using the MSI?

Yes it seems better.

> Looking at the current code, it appears that it tries to overwrite any
> existing value in that subkey if XA enlistment fails. So it should also
> "upgrade" existing entries. Right?

Yes but the implementation of pgxalib.dll has not been changed
for a long time. There's little dependency between pgxalib.dll
and drivers

regards,
Hiroshi INoue


-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: XA registry entries are missing from 64-bit install
  2014-06-12 03:52 XA registry entries are missing from 64-bit install Craig Ringer <craig@2ndquadrant.com>
  2014-06-12 06:02 ` Re: XA registry entries are missing from 64-bit install Inoue, Hiroshi <inoue@tpf.co.jp>
  2014-06-12 08:28   ` Re: XA registry entries are missing from 64-bit install Craig Ringer <craig@2ndquadrant.com>
  2014-06-12 21:12     ` Re: XA registry entries are missing from 64-bit install Inoue, Hiroshi <inoue@tpf.co.jp>
@ 2014-06-13 03:59       ` Hiroshi Inoue <inoue@tpf.co.jp>
  0 siblings, 0 replies; 7+ messages in thread

From: Hiroshi Inoue @ 2014-06-13 03:59 UTC (permalink / raw)
  To: Craig Ringer <craig@2ndquadrant.com>; +Cc: pgsql-odbc

(2014/06/13 2:57), Inoue, Hiroshi wrote:
>
> (2014/06/12 17:28), Craig Ringer wrote:
>> On 06/12/2014 02:02 PM, Inoue, Hiroshi wrote:
>>>
>>>
>>> Because msdtc process seems a 64bit application, 64bit pgxalib.dll
>>> should be registered even when 32bit applications use MSDTC support.
>>> The current way of registration isn't appropriate and 64bit installer
>>> would have to register the entry beforehand.
>>
>> OK, so if I understand this right, it might be helpful to have
>> pgenlist.dll expose a function that's callable with rundll32 to create
>> the registry entries. Call it, say, registerxa().
>
> It should be done for pgxalib.dll not pgenlist(a).dll if we do
> such kind of registration.
>
>> Then the registry entry creation code currently in
>> EnlistInDtc_1pipe(...) could be factored out so it's callable as part of
>> EnlistInDtc_1pipe(...) or via the new entry point.
>>
>> The installer can then invoke
>>
>>      rundll32 pgenlist.dll,registerxa
>>
>> to create the appropriate entries.
>>
>> Reasonable?
>>
>> Or is it better to just create/update the registry entries directly
>> using the MSI?
>
> Yes it seems better.

OK I pushd the change together with your patch [ODBC] PATCH: WiX
has moved.

regards,
Hiroshi Inoue


-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2014-06-13 03:59 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-06-12 03:52 XA registry entries are missing from 64-bit install Craig Ringer <craig@2ndquadrant.com>
2014-06-12 03:54 ` Craig Ringer <craig@2ndquadrant.com>
2014-06-12 06:02 ` Inoue, Hiroshi <inoue@tpf.co.jp>
2014-06-12 08:28   ` Craig Ringer <craig@2ndquadrant.com>
2014-06-12 09:12     ` Craig Ringer <craig@2ndquadrant.com>
2014-06-12 21:12     ` Inoue, Hiroshi <inoue@tpf.co.jp>
2014-06-13 03:59       ` Hiroshi Inoue <inoue@tpf.co.jp>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox