Обсуждение: Compiling PostgreSQL for WIndows with 16kb blocksize

Поиск
Список
Период
Сортировка

Compiling PostgreSQL for WIndows with 16kb blocksize

От
Yannick Collette
Дата:
Hello,

For test purposes I need to compile PostgreSQL 14.1 using a 16kb blocksize.

CFLAGS="-D WINVER=0x0600 -D _WIN32_WINNT=0x0600" LIBS="-ladvapi32"  ./configure --host=x86_64-w64-mingw32 --with-blocksize=16 --with-wal-blocksize=16 --with-openssl --with-libxml --prefix=/c/postgresql/pg14/ 2>&1 | tee configure.log

Below is the beginning of my configure.log, with no errors:  make and make install ok also.

configure: loading site script /etc/config.site
checking build system type... x86_64-pc-msys
checking host system type... x86_64-w64-mingw32
checking which template to use... win32
checking whether NLS is wanted... no
checking for default port number... 5432
checking for block size... 16kB
checking for segment size... 1GB
checking for WAL block size... 16kB
checking for x86_64-w64-mingw32-gcc... x86_64-w64-mingw32-gcc
checking whether the C compiler works... yes
...

DB created successfully using initdb.

Unfortunately my blocksize is still 8kb when checking in DB.

postgres=# show block_size;
 block_size
------------
 8192
(1 row)


postgres=# select version();
                                                           version
-----------------------------------------------------------------------------------------------------------------------------
 PostgreSQL 14.1 on x86_64-w64-mingw32, compiled by x86_64-w64-mingw32-gcc.exe (Rev9, Built by MSYS2 project) 10.2.0, 64-bit
(1 row)

Is there anything additional step I'm missing?

Thanks in advance for your help!
Yannick

Re: Compiling PostgreSQL for WIndows with 16kb blocksize

От
Tom Lane
Дата:
Yannick Collette <yannickcollette@gmail.com> writes:
> For test purposes I need to compile PostgreSQL 14.1 using a 16kb blocksize.

> CFLAGS="-D WINVER=0x0600 -D _WIN32_WINNT=0x0600" LIBS="-ladvapi32"
>  ./configure --host=x86_64-w64-mingw32 --with-blocksize=16
> --with-wal-blocksize=16 --with-openssl --with-libxml
> --prefix=/c/postgresql/pg14/ 2>&1 | tee configure.log

I don't know anything about the Windows-specific details here,
but the --with-blocksize option looks fine, and it works for me:

regression=# show block_size;
 block_size 
------------
 16384
(1 row)

(Worth noting here is that a lot of our regression tests fail
at non-default blocksizes, because plans change, or rows no
longer need toasting, or the like.)

> Unfortunately my blocksize is still 8kb when checking in DB.
> postgres=# show block_size;
>  block_size
> ------------
>  8192
> (1 row)

I think you must be connecting to the wrong server.

            regards, tom lane



Re: Compiling PostgreSQL for WIndows with 16kb blocksize

От
Andres Freund
Дата:
Hi,

On January 19, 2022 9:07:50 AM PST, Yannick Collette <yannickcollette@gmail.com> wrote:
>Hello,
>
>For test purposes I need to compile PostgreSQL 14.1 using a 16kb blocksize.
>
>CFLAGS="-D WINVER=0x0600 -D _WIN32_WINNT=0x0600" LIBS="-ladvapi32"
> ./configure --host=x86_64-w64-mingw32 --with-blocksize=16
>--with-wal-blocksize=16 --with-openssl --with-libxml
>--prefix=/c/postgresql/pg14/ 2>&1 | tee configure.log
>
>Below is the beginning of my configure.log, with no errors:  make and make
>install ok also.
>
>configure: loading site script /etc/config.site
>checking build system type... x86_64-pc-msys
>checking host system type... x86_64-w64-mingw32
>checking which template to use... win32
>checking whether NLS is wanted... no
>checking for default port number... 5432
>checking for block size... 16kB
>checking for segment size... 1GB
>checking for WAL block size... 16kB
>checking for x86_64-w64-mingw32-gcc... x86_64-w64-mingw32-gcc
>checking whether the C compiler works... yes
>...
>
>DB created successfully using initdb.
>
>Unfortunately my blocksize is still 8kb when checking in DB.
>
>postgres=# show block_size;
> block_size
>------------
> 8192
>(1 row)
>
>
>postgres=# select version();
>                                                           version

>-----------------------------------------------------------------------------------------------------------------------------
> PostgreSQL 14.1 on x86_64-w64-mingw32, compiled by
>x86_64-w64-mingw32-gcc.exe (Rev9, Built by MSYS2 project) 10.2.0, 64-bit
>(1 row)
>
>Is there anything additional step I'm missing?

Any chance this is from an older build? You might need to make clean, if you previously ./configured differently.

Andres
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.