pgsql: Fix control file update done in restartpoints still running afte

2022-05-15 Thread Michael Paquier
Fix control file update done in restartpoints still running after promotion If a cluster is promoted (aka the control file shows a state different than DB_IN_ARCHIVE_RECOVERY) while CreateRestartPoint() is still processing, this function could miss an update of the control file for "checkPoint" an

pgsql: Fix control file update done in restartpoints still running afte

2022-05-15 Thread Michael Paquier
Fix control file update done in restartpoints still running after promotion If a cluster is promoted (aka the control file shows a state different than DB_IN_ARCHIVE_RECOVERY) while CreateRestartPoint() is still processing, this function could miss an update of the control file for "checkPoint" an

pgsql: Fix control file update done in restartpoints still running afte

2022-05-15 Thread Michael Paquier
Fix control file update done in restartpoints still running after promotion If a cluster is promoted (aka the control file shows a state different than DB_IN_ARCHIVE_RECOVERY) while CreateRestartPoint() is still processing, this function could miss an update of the control file for "checkPoint" an

pgsql: Fix control file update done in restartpoints still running afte

2022-05-15 Thread Michael Paquier
Fix control file update done in restartpoints still running after promotion If a cluster is promoted (aka the control file shows a state different than DB_IN_ARCHIVE_RECOVERY) while CreateRestartPoint() is still processing, this function could miss an update of the control file for "checkPoint" an

pgsql: Fix control file update done in restartpoints still running afte

2022-05-15 Thread Michael Paquier
Fix control file update done in restartpoints still running after promotion If a cluster is promoted (aka the control file shows a state different than DB_IN_ARCHIVE_RECOVERY) while CreateRestartPoint() is still processing, this function could miss an update of the control file for "checkPoint" an

pgsql: Fix incorrect row estimates used for Memoize costing

2022-05-15 Thread David Rowley
Fix incorrect row estimates used for Memoize costing In order to estimate the cache hit ratio of a Memoize node, one of the inputs we require is the estimated number of times the Memoize node will be rescanned. The higher this number, the large the cache hit ratio is likely to become. Unfortunat

pgsql: Fix incorrect row estimates used for Memoize costing

2022-05-15 Thread David Rowley
Fix incorrect row estimates used for Memoize costing In order to estimate the cache hit ratio of a Memoize node, one of the inputs we require is the estimated number of times the Memoize node will be rescanned. The higher this number, the large the cache hit ratio is likely to become. Unfortunat