question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error calculating the new values for wal_segment_size and wal_block_size

See original GitHub issue

Hi,

when I apply the changes with the command:

$ patronictl -c /etc/patroni/patroni.yml edit-config

I get the following error:

2019-11-19 12:22:38,687 ERROR: Failed to reload config_file=/etc/patroni/patroni.yml
Traceback (most recent call last):
   File "/usr/local/lib/python3.7/dist-packages/patroni/__init__.py", line 79, in reload_config
     self.postgresql.reload_config(self.config['postgresql'], sighup)
   File "/usr/local/lib/python3.7/dist-packages/patroni/postgresql/__init__.py", line 194, in reload_config
     self.config.reload_config(config, sighup)
   File "/usr/local/lib/python3.7/dist-packages/patroni/postgresql/config.py", line 864, in reload_config
     self._handle_wal_buffers(old_values, changes)
   File "/usr/local/lib/python3.7/dist-packages/patroni/postgresql/config.py", line 834, in _handle_wal_buffers
     wal_segment_size = parse_int(wal_segment_size[1]) * parse_int(wal_segment_size[2], 'B') / wal_block_size
 TypeError: unsupported operand type(s) for *: 'int' and 'NoneType'

In my old configuration, I already have wal_buffers = 32MB

Maybe the line:

https://github.com/zalando/patroni/blob/2f9a48fae4ac57658e8cd653db8dad57744a57cb/patroni/postgresql/config.py#L834

Should be:

        wal_segment_size = parse_int(wal_segment_size[1], wal_segment_size[2]) / wal_block_size

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
CyberDem0ncommented, Nov 19, 2019

Yeah, on older versions it looks differently:

 wal_segment_size │ 2048    │ 8kB  │ integer │ internal

Will prepare a fix.

0reactions
gandalfmagiccommented, Nov 21, 2019
# patronictl version
patronictl version 1.6.1
Read more comments on GitHub >

github_iconTop Results From Across the Web

postgres/pg_resetwal.c at master - GitHub
If pg_control is corrupt, attempt to intuit reasonable values, ... If no new WAL segment size was specified, use the control file value....
Read more >
pg_resetwal.c - PostgreSQL Source Code
Flush the existing xlog files and write a new segment with ... 383 * If no new WAL segment size was specified, use...
Read more >
configure · openGauss/openGauss-server - Gitee.com
... 64) XLOG_BLCKSZ=65536;; *) { { $as_echo "$as_me:$LINENO: error: Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64.
Read more >
Ignite Persistence | Ignite Documentation
You can change the size of the WAL segment files in the data storage configuration. The value must be between 512KB and 2GB....
Read more >
Re: [HACKERS] increasing the default WAL segment size
Unresolved: - this needs some new performance tests, the number of ... value is in xlog blocks */ #define GUC_UNIT_MB 0x4000 /* value...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found