Build Postgres On AIX

2022-05-31 Thread Mark Hill
Hi All,

First time poster so I hope this is the appropriate group in which to ask this 
question.   Please redirect me as needed.

I'm building Postgres 14.2 on AIX.   Apparently the arc4random function is not 
available in the AIX system libraries.  The build
fails when it tries to build postgresql-14.2/contrib/uuid-ossp/uuid-ossp.c 
because of the use of arc4random in that source
file.

I can build the uuid source from www.ossp.org and then 
link against those libraries and the build succeeds but is there any other
way to get uuid-ossp.c to compile and link without using a 3rd party lib?

Thanks, Mark


RE: Build Postgres On AIX

2022-06-13 Thread Mark Hill
Postgres will not build on AIX with either of the following options to the 
configure script:
--with-uuid=e2fs
--with-uuid=ossp

so I was using --with-uuid=bsd which does work except for the arc4random 
undefined symbol error I was getting.

I removed the --with-uuid=bsd option to the configure script and everything 
builds including the contrib subdir except
the uuid-ossp subdir like we want.

Heres the configure command:
   ./configure \
  --prefix="$BUILD_DIR/pgsql-$POSTGRES_VERSION" \
  --without-readline \
  --without-zlib \
  --with-openssl \
  --with-includes="$BUILD_DIR"/openssl/include/openssl/ \
  --with-libraries="$BUILD_DIR"/openssl/lib/ \
  "$ADDITIONAL_FLAGS"

However, when I try to create a database I'm getting an out of memory error 
(see below.)   Any suggestions?

Thanks, Mark

---

Command:   ${postgresDir}/bin/initdb -D ./data -U dbmsowner -W



TopMemoryContext: 75328 total in 5 blocks; 33264 free (32 chunks); 42064 used
  TopTransactionContext: 524288 total in 7 blocks; 106872 free (26 chunks); 
417416 used
  TableSpace cache: 8192 total in 1 blocks; 5064 free (0 chunks); 3128 used
<.>
  Relcache by OID: 8192 total in 1 blocks; 1760 free (0 chunks); 6432 used
  CacheMemoryContext: 2097152 total in 9 blocks; 808960 free (10 chunks); 
1288192 used
index info: 2048 total in 2 blocks; 808 free (0 chunks); 1240 used: 
pg_description_o_c_o_index
relation rules: 16384 total in 5 blocks; 4840 free (0 chunks); 11544 used: 
pg_replication_slots
relation rules: 16384 total in 5 blocks; 4544 free (1 chunks); 11840 used: 
pg_statio_all_sequences
relation rules: 49152 total in 9 blocks; 7160 free (3 chunks); 41992 used: 
pg_statio_all_indexes
<...etc...>
Grand total: 3779872 bytes in 241 blocks; 1220984 free (137 chunks); 255 
used
2022-06-13 23:20:12.911 EDT [15270042] FATAL:  out of memory
2022-06-13 23:20:12.911 EDT [15270042] DETAIL:  Failed on request of size 8192 
in memory context "ExprContext".
2022-06-13 23:20:12.911 EDT [15270042] STATEMENT:  SELECT 
pg_import_system_collations('pg_catalog');


-Original Message-
From: Tom Lane  
Sent: Tuesday, May 31, 2022 11:20 AM
To: Mark Hill 
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Build Postgres On AIX

[You don't often get email from t...@sss.pgh.pa.us. Learn why this is important 
at https://aka.ms/LearnAboutSenderIdentification ]

EXTERNAL

Mark Hill  writes:
> I'm building Postgres 14.2 on AIX.   Apparently the arc4random function is 
> not available in the AIX system libraries.  The build
> fails when it tries to build 
> postgresql-14.2/contrib/uuid-ossp/uuid-ossp.c because of the use of 
> arc4random in that source file.

AFAICS arc4random is only referenced in the "BSD" code paths, so you must have 
tried to specify --with-uuid=bsd.  It's not too surprising that that didn't 
work.  As per the docs, your other alternatives are to use the OSSP library or 
the e2fsprogs library.  Or you could just not build uuid-ossp; it's fairly 
vestigial these days, now that we offer gen_random_uuid() in core.

regards, tom lane




How to Build NLS Files

2022-09-13 Thread Mark Hill
I'm building Postgres 14.5 on Windows and want to build the nls files that go 
in share/locale.

According to this 
page I need 
the gettext software:

Gettext is required to build with NLS support, and can be downloaded from 
http://gnuwin32.sourceforge.net. Note that 
binaries, dependencies and developer files are all needed.

I've downloaded the Binaries, Dependencies, Developer files, and Sources zip 
files from this page:   http://gnuwin32.sourceforge.net/packages/gettext.htm
and unzipped in C:\gettext.   Is that sufficient or do I need to build the 
source and/or anything else?

I'm building Postgres via the msvc tools in postgresql-14.5/src/tools/msvc with 
the build.bat script.  The build succeeds until I try to build
the nls files by adding the following to the config.pl script:
$main::config->{'nls'}="C:/gettext";
my $nls =   $main::config->{'nls'};

Anybody have experience with this?

Thanks, Mark





uuid-ossp source or binaries for Windows

2023-03-15 Thread Mark Hill
I've downloaded the PostgreSQL 14.7 source and building it on Windows 64bit and 
32bit.

I'm using the Visual Studio tools in the src/tools/msvc folder.

I'm trying to build with the uuid extension but it looks like I need uuid-ossp 
installed in order
to get it to work.

The source download referenced in the Postgresql doc here, 
https://www.postgresql.org/docs/current/uuid-ossp.html#id-1.11.7.58.6
this source download,  ftp://ftp.ossp.org/pkg/lib/uuid/uuid-1.6.2.tar.gz, is 
Unix-specific as far as I can tell.

Where can I find uuid-ossp for Windows, 32 and 64 bit, either the source so I 
can build it or
prebuilt libraries?

Thanks, Mark





RE: uuid-ossp source or binaries for Windows

2023-03-15 Thread Mark Hill
Hey Daniel,

Thanks for getting back to me.

I think the issue I'm having is that my build of Postgres is missing uuid 
pieces needed by our users.

They're executing the command:   CREATE EXTENSION "uuid-ossp"

and getting the error

ERROR:  could not open extension control file 
"/share/extension/uuid-ossp.control"

The only file matching "*uuid*" in my build of Postgres is:   
/include/server/utils/uuid.h

I should have in addition: 
/include/uuid.h
/lib/uuid-ossp.dll
/share/extension/uuid-ossp--1.1.sql
/share/extension/uuid-ossp.control
/share/extension/uuid-ossp--unpackaged--1.0.sql
/share/extension/uuid-ossp--1.0--1.1.sql

I need a Windows-specific install of uuid-ossp for the Postgres build to use, 
for both 32bit and 64bit Windows.

Thanks, Mark

-Original Message-
From: Daniel Gustafsson  
Sent: Wednesday, March 15, 2023 3:16 PM
To: Mark Hill 
Cc: pgsql-general@lists.postgresql.org; Ken Peressini ; 
Michael King 
Subject: Re: uuid-ossp source or binaries for Windows

EXTERNAL

> On 15 Mar 2023, at 19:31, Mark Hill  wrote:
>
> I've downloaded the PostgreSQL 14.7 source and building it on Windows 64bit 
> and 32bit.
>
> I'm using the Visual Studio tools in the src/tools/msvc folder.
>
> I'm trying to build with the uuid extension but it looks like I need 
> uuid-ossp installed in order to get it to work.

Do you need the extension specifically or does the built-in generator function 
do what you need?

> The source download referenced in the Postgresql doc here, 
> https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.
> postgresql.org%2Fdocs%2Fcurrent%2Fuuid-ossp.html%23id-1.11.7.58.6&data
> =05%7C01%7CMark.Hill%40sas.com%7C5acf51786dd5440ea0ed08db2589a9fd%7Cb1
> c14d5c362545b3a4309552373a0c2f%7C0%7C0%7C638145045990073139%7CUnknown%
> 7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJX
> VCI6Mn0%3D%7C3000%7C%7C%7C&sdata=TSRqdrvImMLf6Pr8XWqRSUkCWUDaAjFtziykz
> Czt5Sc%3D&reserved=0 this source download,  
> https://nam02.safelinks.protection.outlook.com/?url=ftp%3A%2F%2Fftp.ossp.org%2Fpkg%2Flib%2Fuuid%2Fuuid-1.6.2.tar.gz&data=05%7C01%7CMark.Hill%40sas.com%7C5acf51786dd5440ea0ed08db2589a9fd%7Cb1c14d5c362545b3a4309552373a0c2f%7C0%7C0%7C638145045990073139%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ry3iJshaFPSegaIrmaJzA0%2BIKgEfXbJwmasBA8ZdWQ8%3D&reserved=0,
>  is Unix-specific as far as I can tell.
>
> Where can I find uuid-ossp for Windows, 32 and 64 bit, either the 
> source so I can build it or prebuilt libraries?

I don't know windows at all, but uuid-ossp.dll is provided in the EDB packages 
(looking at the binary zip bundle) so it's clearly available to be built.
Maybe someone from EDB can chime in with pointers for building on Windows so we 
can update the docs accordingly?

--
Daniel Gustafsson





pg*.dll in psqlODBC have no version numbers

2023-09-27 Thread Mark Hill
We download the ODBC source from http://ftp.postgresql.org and build it 
on-site, 13.02. in this case.

A colleague noticed that the following files in the psqlODBC MSI for Windows 
have no version numbers:
pgenlist.dll
pgenlista.dll
pgxalib.dll

Does anyone know if that is be design or just an oversight?

Btw, the same holds for ODBC 12.02..

Thanks, Mark



Postgres 12.21?

2024-11-05 Thread Mark Hill
Will there be a minor version update to Postgres 12 this Thursday, 11/7/24, 
going to version 12.21?

Thanks, Mark