pgsql: Fix initial sync of slot parent directory when restoring status

2018-09-02 Thread Michael Paquier
Fix initial sync of slot parent directory when restoring status At the beginning of recovery, information from replication slots is recovered from disk to memory. In order to ensure the durability of the information, the status file as well as its parent directory are synced. It happens that the

pgsql: Fix initial sync of slot parent directory when restoring status

2018-09-02 Thread Michael Paquier
Fix initial sync of slot parent directory when restoring status At the beginning of recovery, information from replication slots is recovered from disk to memory. In order to ensure the durability of the information, the status file as well as its parent directory are synced. It happens that the

pgsql: Fix initial sync of slot parent directory when restoring status

2018-09-02 Thread Michael Paquier
Fix initial sync of slot parent directory when restoring status At the beginning of recovery, information from replication slots is recovered from disk to memory. In order to ensure the durability of the information, the status file as well as its parent directory are synced. It happens that the

pgsql: Fix initial sync of slot parent directory when restoring status

2018-09-02 Thread Michael Paquier
Fix initial sync of slot parent directory when restoring status At the beginning of recovery, information from replication slots is recovered from disk to memory. In order to ensure the durability of the information, the status file as well as its parent directory are synced. It happens that the

pgsql: Fix initial sync of slot parent directory when restoring status

2018-09-02 Thread Michael Paquier
Fix initial sync of slot parent directory when restoring status At the beginning of recovery, information from replication slots is recovered from disk to memory. In order to ensure the durability of the information, the status file as well as its parent directory are synced. It happens that the

pgsql: Fix initial sync of slot parent directory when restoring status

2018-09-02 Thread Michael Paquier
Fix initial sync of slot parent directory when restoring status At the beginning of recovery, information from replication slots is recovered from disk to memory. In order to ensure the durability of the information, the status file as well as its parent directory are synced. It happens that the

pgsql: Fix memory leak in TRUNCATE decoding

2018-09-02 Thread Tomas Vondra
Fix memory leak in TRUNCATE decoding When decoding a TRUNCATE record, the relids array was being allocated in the main ReorderBuffer memory context, but not released with the change resulting in a memory leak. The array was also ignored when serializing/deserializing the change, assuming all the

pgsql: Fix memory leak in TRUNCATE decoding

2018-09-02 Thread Tomas Vondra
Fix memory leak in TRUNCATE decoding When decoding a TRUNCATE record, the relids array was being allocated in the main ReorderBuffer memory context, but not released with the change resulting in a memory leak. The array was also ignored when serializing/deserializing the change, assuming all the