stolon icon indicating copy to clipboard operation
stolon copied to clipboard

warnings related to WAL file size in Stolon Keeper logs

Open CanfengChen92 opened this issue 4 years ago • 6 comments

What happened: a lot of warnings related to WAL file size in Stolon keeper logs. (Both master and standby) These warnings are spawning every few seconds.

2020-03-20T09:32:59.414Z WARN cmd/keeper.go:704 error getting older wal file {"error": "wal file has unsupported size: 2097152"} 2020-03-20T09:33:01.948Z WARN cmd/keeper.go:704 error getting older wal file {"error": "wal file has unsupported size: 2097152"} 2020-03-20T09:33:02.293Z INFO cmd/keeper.go:1395 our db requested role is master 2020-03-20T09:33:02.297Z INFO cmd/keeper.go:1423 already master 2020-03-20T09:33:02.311Z INFO cmd/keeper.go:1585 postgres parameters not changed 2020-03-20T09:33:02.311Z INFO cmd/keeper.go:1596 postgres hba entries not changed LOG: incomplete startup packet 2020-03-20T09:33:04.483Z WARN cmd/keeper.go:704 error getting older wal file {"error": "wal file has unsupported size: 2097152"} 2020-03-20T09:33:07.019Z WARN cmd/keeper.go:704 error getting older wal file {"error": "wal file has unsupported size: 2097152"} 2020-03-20T09:33:07.343Z INFO cmd/keeper.go:1395 our db requested role is master 2020-03-20T09:33:07.346Z INFO cmd/keeper.go:1423 already master 2020-03-20T09:33:07.360Z INFO cmd/keeper.go:1585 postgres parameters not changed 2020-03-20T09:33:07.360Z INFO cmd/keeper.go:1596 postgres hba entries not changed LOG: incomplete startup packet 2020-03-20T09:33:09.553Z WARN cmd/keeper.go:704 error getting older wal file {"error": "wal file has unsupported size: 2097152"} 2020-03-20T09:33:12.086Z WARN cmd/keeper.go:704 error getting older wal file {"error": "wal file has unsupported size: 2097152"}

What you expected to happen: No those warning logs appear

How to reproduce it (as minimally and precisely as possible): When deploying a new Stolon cluster with the default configuration.

Anything else we need to know?: Checked from the Stolon Keeper's data directory and found that some files(maybe WAL files) auto-generated when a new Stolon cluster deployed. Those files size match that the warnings log mentioned.

sh-4.2$ pwd /stolon-data/postgres/pg_xlog sh-4.2$ sh-4.2$ ls -l total 4096 -rw-------. 1 stolon stolon 2097152 Mar 20 09:32 000000010000000000000006 -rw-------. 1 stolon stolon 2097152 Mar 20 09:42 000000010000000000000007 drwx------. 2 stolon stolon 43 Mar 20 09:32 archive_status sh-4.2$

Environment: OKD 3.9

  • Stolon version: sorintlab-stolon:0.12.0
  • Stolon running environment (if useful to understand the bug): OKD 3.9

CanfengChen92 avatar Mar 20 '20 09:03 CanfengChen92

@CanfengChen92 Have you changed the default wal size (16MiB) when compiling postgres or when creating a db (is the db restored with pitr?)? If so we currently only support the default wal size:

https://github.com/sorintlab/stolon/blob/f512d7efe7e99e5b0d6a44e3c4d8b9ded9c04ea2/internal/postgresql/utils.go#L34-L35

Feel free to submit a PR to improve this.

sgotti avatar Mar 20 '20 10:03 sgotti

@CanfengChen92 Have you changed the default wal size (16MiB) when compiling postgres or when creating a db (is the db restored with pitr?)? If so we currently only support the default wal size:

https://github.com/sorintlab/stolon/blob/f512d7efe7e99e5b0d6a44e3c4d8b9ded9c04ea2/internal/postgresql/utils.go#L34-L35

Feel free to submit a PR to improve this.

We didn't change the default the WAL size setting during the compiling or creating. The DB was created with an empty data directory. By the way, can we specify the WAL size during the creating? And what's the configuration item? I have tried to specify the "max_wal_size" and "min_wal_size" in "pgParameters", but it doesn't work.

CanfengChen92 avatar Mar 20 '20 10:03 CanfengChen92

@CanfengChen92 are you using the provided example stolon images?

sgotti avatar Mar 20 '20 11:03 sgotti

@CanfengChen92 are you using the provided example stolon images?

No, we get the stolon v0.12.0 source code and build it by ourselves. Didn't change any configuration.

CanfengChen92 avatar Mar 20 '20 11:03 CanfengChen92

No, we get the stolon v0.12.0 source code and build it by ourselves. Didn't change any configuration.

Then you probably installed a postgres compiled with a non default wal size. You should check how you installed postgres.

sgotti avatar Mar 20 '20 11:03 sgotti

No, we get the stolon v0.12.0 source code and build it by ourselves. Didn't change any configuration.

Then you probably installed a postgres compiled with a non default wal size. You should check how you installed postgres.

Ok. I will check the build process. Thanks.

CanfengChen92 avatar Mar 20 '20 11:03 CanfengChen92