how to set limits on no of checkpoint files(WAL) Apigee-postgressql

ajha
New Member

Hi All,

Recently we had space issue in pg_xlog folder of apigee-postgresql and it forced the postgres to shut down. We observed that no of files had gone quite large causing the space issue.

For prevention, we found that we can change the value for checkpoint_segments in postgresql.conf to limit the no of WAL files on PostgrSql.

But here in Apigee, m not able to change that and after changing the default value of below and restart it again changes it back to original default value.

checkpoint_segments=128

Please suggest.

Thanks,

Amit.

0 1 239
1 REPLY 1

Not applicable

@Amit Jha

You can create a custom postgresql.properties file to control these settings by creating this file:

/opt/apigee/customer/application/postgresql.properties

$ cat application/postgresql.properties conf_postgresql_checkpoint_segments=200 # custom value, was 128

$ apigee-service apigee-postgresql configure

The file conf/postgresql.conf was changed [ChangeDelta, position: 198, lines: [checkpoint_segments=128 # in logfile segments, min 1, 16MB each] to [checkpoint_segments=200 # custom value, was 128]]

apigee-configutil: apigee-postgresql: # OK

$ egrep checkpoint_segments /opt/apigee/apigee-postgresql/conf/postgresql.conf checkpoint_segments=200 # custom value, was 128

Also, if you're trying to change the number of wal files, that is controlled by 'wal_keep_segments', see https://www.postgresql.org/docs/9.6/static/runtime-config-replication.html#GUC-WAL-KEEP-SEGMENTS

cheers

-Doug