Re: increasing the default WAL segment size

Beena Emerson <memissemerson@gmail.com>

From: Beena Emerson <memissemerson@gmail.com>
To: Prabhat Sahu <prabhat.sahu@enterprisedb.com>
Cc: tushar <tushar.ahuja@enterprisedb.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2017-03-13T08:47:35Z
Lists: pgsql-hackers
Hello,

On Mon, Mar 13, 2017 at 1:49 PM, Prabhat Sahu <prabhat.sahu@enterprisedb.com
> wrote:

> Hi,
>
> 2)Getting "Aborted (core dumped)"  error at the time of running
> pg_basebackup  , *(this issue is only coming on Linux32 ,not on Linux64)*
>  we have  double check to confirm it .
>
> Steps to reproduce on Linux32
>
>> ===================
>>> fetch the sources
>>> apply both the patches
>>>  ./configure --with-zlib   --enable-debug  --enable-cassert
>>> --enable-depend --prefix=$PWD/edbpsql --with-openssl CFLAGS="-g -O0"; make
>>> all install
>>> Performed initdb with switch "--wal-segsize 4"
>>>
>>
>> Does the crash occur with only size 4?
>>
>
>
> Crash occurs for the value of *"--wal-segsize " 1, 2, 4, 8*  with stack
> details as below :
>
> For value the value of *"--wal-segsize " 16, 32, 64*... (all multiple of
> 16)  we are getting "Segmentation fault" message as below:
> [bin]$ ./pg_basebackup -v -D /tmp/slave16
> Segmentation fault (core dumped)
>
> and for all other values of* "--wal-segsize " 3, 5, 7, 9, 10, 11, ... 15,
> 17, 18,* ...  we are getting invalid message during "initdb":
> [bin]$ ./initdb -D data1 --wal-segsize=17
> initdb: Invalid WAL segment size 17
>

 The permissible values for  the wal-segment size is power of 2 from 1 to
1024. Hence the Invalid message is expected behaviour.

Just to summarize, In Linux32, values 1 to 8 crashed and 16 to 1024 gave
segmentation fault.


>
>>
>>> start the server
>>> run pg_basebackup
>>>
>>> [centos@tushar-centos bin]$ ./pg_basebackup -v -D /tmp/myslave
>>> *** glibc detected *** ./pg_basebackup: free(): invalid pointer:
>>> 0x08da7f00 ***
>>>
>>> [centos@tushar-centos bin]$
>>>
>>> same scenario is working fine against HEAD (v10 ) on Linux32 [i.e no
>>> patch applied]
>>>
>>> [centos@tushar-centos bin]$ ./pg_basebackup --verbose -D /tmp/slave11
>>> pg_basebackup: initiating base backup, waiting for checkpoint to complete
>>> pg_basebackup: checkpoint completed
>>> pg_basebackup: transaction log start point: 0/2800024 on timeline 1
>>> pg_basebackup: starting background WAL receiver
>>> pg_basebackup: transaction log end point: 0/28000E4
>>> pg_basebackup: waiting for background process to finish streaming ...
>>> pg_basebackup: base backup completed
>>> [centos@tushar-centos bin]$
>>>
>>
>> Just to confirm, was this done with configure flag --with-wal-segsize=4 ?
>>
>
> we also have configure with the option "*--with-wal-segsize=4*" and
> getting warning.
> ./configure --with-zlib   --enable-debug  --enable-cassert
> --enable-depend --prefix=$PWD/inst --with-openssl CFLAGS="-g -O0"
> *--with-wal-segsize=4*
>
> configure: WARNING: unrecognized options: --with-wal-segsize
>

 configure option was for the HEAD, without the patch applied.

I guess, I am missing something regarding the 32 bit machines, I am looking
into it.


Thank you,

--

Beena Emerson

EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Make WAL segment size configurable at initdb time.

  2. Perform only one ReadControlFile() during startup.

  3. Introduce BYTES unit for GUCs.

  4. Remove useless duplicate inclusions of system header files.

  5. Refactor other replication commands to use DestRemoteSimple.

  6. Add a SHOW command to the replication command language.

  7. Add a new DestReceiver for printing tuples without catalog access.

  8. Support fls().

  9. Extend yesterday's patch making BLCKSZ and RELSEG_SIZE configurable to also

  10. Commit the reasonably uncontroversial parts of J.R. Nield's PITR patch, to

  11. XLOG (also known as WAL -:)) Bootstrap/Startup/Shutdown.

  12. Transaction log manager core code.