pgtt icon indicating copy to clipboard operation
pgtt copied to clipboard

Install pgtt on windows server?

Open rgonzalezVeolia opened this issue 2 years ago • 16 comments

Hello, I have tried to install pgtt extension in postgres 13 on windows server, but I only receive errors when trying to run make... will anyone have any documents to install on windows?

rgonzalezVeolia avatar Mar 04 '24 20:03 rgonzalezVeolia

I don't have enough knowledge and especially the desire to spend time on a port for Windows. If anyone can support this porting to Windows OS, a patch would be welcome. Thanks.

darold avatar Mar 05 '24 04:03 darold

I compiled the latest version of pgtt for pg13 windows on windows. Can you try the attached archive? I also have an installer but unfortunately github doesn't allow linking it here.

pgtt-3.2.0-pg13-x64.zip

rjuju avatar Apr 16 '24 02:04 rjuju

I compiled the latest version of pgtt for pg13 windows on windows. Can you try the attached archive? I also have an installer but unfortunately github doesn't allow linking it here.

pgtt-3.2.0-pg13-x64.zip

Thanks a lot!!! maybe can you send to me? [email protected]

rgonzalezVeolia avatar Apr 16 '24 12:04 rgonzalezVeolia

I tried but my email provider also blocks .exe attachments. I uploaded it at https://transfert.free.fr/9dePGmw, the link should stay valid for the next 7 days.

rjuju avatar Apr 16 '24 13:04 rjuju

I tried but my email provider also blocks .exe attachments. I uploaded it at https://transfert.free.fr/9dePGmw, the link should stay valid for the next 7 days.

Thanks!!! Work fine on release 13... one question more, i tried to use in release 12, but this show me an incompatible version error. If possible use in release 12, what i must change?

rgonzalezVeolia avatar Apr 16 '24 13:04 rgonzalezVeolia

Thank for the confirmation, that's a very good news!

one question more, i tried to use in release 12, but this show me an incompatible version error. If possible use in release 12, what i must change?

That's expected. While pgtt source code with compatible with pg12 up to the current development version of postgres (pg17), the compiled version is only compatible with a single major version. That's why the installer hints you to install the extension in the postgres 13 directory (at least if it finds the correct registry keys).

I had to patch some stuff to be able to compile it and generate the installer, so I wanted to make sure that it was actually working before spending too much effort with this approach. Now that I know it works I will work with @darold to make a few adjustments, and also fix the windows compile system. Once done I will be able to generate an installer for all supported version and will give them to @darold so he can upload them on the release page.

rjuju avatar Apr 16 '24 14:04 rjuju

thanks for your help!!! i'll be waiting!!!

rgonzalezVeolia avatar Apr 16 '24 14:04 rgonzalezVeolia

I finally had time to work on this. I just sent a PR to ease the windows installer creation (the script also needed some changes) and using those I could generate installers for all supported postgre smajor versions (12 to 16). I uploaded them at https://transfert.free.fr/D8M2FtD

If you can test the pg12 version that would confirm that it's all good and that we can publish them on the release apge.

rjuju avatar Apr 21 '24 02:04 rjuju

Thanks!!! pgtt installed OK. But, the tables exist while the session exist. This tables must be registered under pgtt_schema?

rgonzalezVeolia avatar Apr 22 '24 14:04 rgonzalezVeolia

example of one temp table: LOAD 'pgtt';

CREATE /GLOBAL/ TEMPORARY TABLE ht_attributetypemodel ( oid varchar(32) NOT NULL ) ON COMMIT DELETE ROWS ; ALTER TABLE ht_attributetypemodel ALTER COLUMN oid SET NOT NULL;

Under Linux work fine, and the table exist in schema pgtt_schema. In windows this is not working.

rgonzalezVeolia avatar Apr 22 '24 14:04 rgonzalezVeolia

I realized that the new version is not the "real" 3.2.0" but the latest commit, which includes some other changes related to the LOAD 'pgtt' thing.

Was the installer for version 13 actually working? If yes I can try to generate the installer for version 12 with the "real" pgtt version 3.2.0 and see if that fixes the problem. In that case we will be able to look at this issue before releasing a new pgtt version.

rjuju avatar Apr 23 '24 02:04 rjuju

I realized that the new version is not the "real" 3.2.0" but the latest commit, which includes some other changes related to the LOAD 'pgtt' thing.

Was the installer for version 13 actually working? If yes I can try to generate the installer for version 12 with the "real" pgtt version 3.2.0 and see if that fixes the problem. In that case we will be able to look at this issue before releasing a new pgtt version.

Not really. The installer work, i can create the extension and load, but the temporary tables is not working, i mean, this exist only in the session, then this tables desapear. This tables, must stay in the pgtt_schema, and is not stayed there.

rgonzalezVeolia avatar Apr 23 '24 13:04 rgonzalezVeolia

image

rgonzalezVeolia avatar Apr 23 '24 13:04 rgonzalezVeolia

so the same behaviour with both the first installer and the new one?

just to be sure, did you check with CREATE GLOBAL TEMPORARY TABLE rather that with GLOBAL between comments?

rjuju avatar Apr 23 '24 14:04 rjuju

so the same behaviour with both the first installer and the new one? Yes, same behavior. just to be sure, did you check with CREATE GLOBAL TEMPORARY TABLE rather that with GLOBAL between comments? Yes, same behavior, and show me a warning of obsolete.

rgonzalezVeolia avatar Apr 23 '24 14:04 rgonzalezVeolia

image

rgonzalezVeolia avatar Apr 23 '24 14:04 rgonzalezVeolia

Hi, I need the latest version of the extension for Windows and compatible with PostgreSQL 16, is there any update here?

dariocorti avatar May 24 '24 15:05 dariocorti

Hi @dariocorti, have you tested latest development code? If so, do you have the same issue above?

darold avatar May 24 '24 15:05 darold

Hi @dariocorti, have you tested latest development code? If so, do you have the same issue above?

Hi @darold, I tried to compile the last version with Microsoft Visual studio to generate del .dll file, but when I execute the LOAD command in Postgres I recevie the errore that it's not compatible with 16 version. Is there a package already compiled as .dll that working in Windows?

dariocorti avatar May 25 '24 06:05 dariocorti

How about if you enable the extension by setting session_preload_libraries='pgtt'?

darold avatar May 25 '24 06:05 darold

You can find an installer and a zip file containing all the required files to install the latest commit of pgtt on pg16: https://transfert.free.fr/AOao3oi

As this is the latest commit, it includes the recent changes to allow session_preload_libraries='pgtt' rather than an explicit LOAD command.

If you can confirm that this is fully functionnal is would be a very good news as we will be able to provide those for all pgtt versions on all pg versions.

rjuju avatar May 25 '24 06:05 rjuju

@rgonzalezVeolia I have been unable to reproduce the issue on linux. Just to be sure, did you refresh the pgad;im object tree after execute the CREATE /* GLOBAL */ TEMPORARY TABLE command?

Or maybe the problem you hit was actually something like what I describe in https://github.com/darold/pgtt/pull/48 ? That would explain why it seems to fail but would actually be just a corner case bug.

rjuju avatar May 26 '24 08:05 rjuju

You can find an installer and a zip file containing all the required files to install the latest commit of pgtt on pg16: https://transfert.free.fr/AOao3oi

As this is the latest commit, it includes the recent changes to allow session_preload_libraries='pgtt' rather than an explicit LOAD command.

If you can confirm that this is fully functionnal is would be a very good news as we will be able to provide those for all pgtt versions on all pg versions.

Hi @rjuju, I confirm that works!! Thanks!

dariocorti avatar May 27 '24 07:05 dariocorti

@rgonzalezVeolia I have been unable to reproduce the issue on linux. Just to be sure, did you refresh the pgad;im object tree after execute the CREATE /* GLOBAL */ TEMPORARY TABLE command?

Or maybe the problem you hit was actually something like what I describe in #48 ? That would explain why it seems to fail but would actually be just a corner case bug.

Yes, refresh after execution ...

rgonzalezVeolia avatar May 27 '24 13:05 rgonzalezVeolia

Thanks for the confirmation. I really don't know what could be the problem in your case.

rjuju avatar May 27 '24 13:05 rjuju

image

rgonzalezVeolia avatar May 27 '24 13:05 rgonzalezVeolia

You can see that i create temporary table. But, is not in the list from pgtt_schema.

rgonzalezVeolia avatar May 27 '24 13:05 rgonzalezVeolia

Can you do the same but in a psql console, just to remove the doubt on use through pgadmin?

darold avatar May 27 '24 13:05 darold

image

rgonzalezVeolia avatar May 27 '24 13:05 rgonzalezVeolia

In your second connection you have to execute LOAD 'pgtt'; before doing the SELECT.

darold avatar May 27 '24 14:05 darold