Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"wal_log_hints" parameter is not configurable #1942

Closed
ckh0618 opened this issue May 28, 2021 · 4 comments · Fixed by #3063
Closed

"wal_log_hints" parameter is not configurable #1942

ckh0618 opened this issue May 28, 2021 · 4 comments · Fixed by #3063

Comments

@ckh0618
Copy link

ckh0618 commented May 28, 2021

Hello.

I just found "wal_log_hints" parameter is not configurable.

    CMDLINE_OPTIONS = CaseInsensitiveDict({
        'listen_addresses': (None, lambda _: False, 90100),
        'port': (None, lambda _: False, 90100),
        'cluster_name': (None, lambda _: False, 90500),
        'wal_level': ('hot_standby', lambda v: v.lower() in ('hot_standby', 'replica', 'logical'), 90100),
        'hot_standby': ('on', lambda _: False, 90100),
        'max_connections': (100, lambda v: int(v) >= 25, 90100),
        'max_wal_senders': (10, lambda v: int(v) >= 3, 90100),
        'wal_keep_segments': (8, lambda v: int(v) >= 1, 90100),
        'wal_keep_size': ('128MB', lambda v: parse_int(v, 'MB') >= 16, 130000),
        'max_prepared_transactions': (0, lambda v: int(v) >= 0, 90100),
        'max_locks_per_transaction': (64, lambda v: int(v) >= 32, 90100),
        'track_commit_timestamp': ('off', lambda v: parse_bool(v) is not None, 90500),
        'max_replication_slots': (10, lambda v: int(v) >= 4, 90400),
        'max_worker_processes': (8, lambda v: int(v) >= 2, 90400),
        'wal_log_hints': ('on', lambda _: False, 90400)
    })

Is there any reason or intention for this ?
I want to set "wal_log_hints" to off because I don't want to produce too much WALs.

@CyberDem0n
Copy link
Collaborator

It is required for pg_rewind to work.

@ckh0618
Copy link
Author

ckh0618 commented May 28, 2021

thanks for the reply.

How about "wal_log_hints" parameter to be configurable if a user set "use_pg_rewind" to "off" ?

@CyberDem0n
Copy link
Collaborator

How about "wal_log_hints" parameter to be configurable if a user set "use_pg_rewind" to "off" ?

Are you volunteering to implement it?
Please also keep in mind that enabled data_checksums effectively producing the same impact as wal_log_hints...

@mbanck
Copy link
Contributor

mbanck commented May 28, 2021

Right, but I think not having wal_log_hints is a valid usecase, if you don't want/need checksums and rewind - it might drastically cut down on the size of WAL.

I do think having checksums is probably better, but others might disagree - and I'm not volunteering to implement it either

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants