pgsql: Fix -Wcast-function-type warnings

2020-07-14 Thread Peter Eisentraut
Fix -Wcast-function-type warnings Three groups of issues needed to be addressed: load_external_function() and related functions returned PGFunction, even though not necessarily all callers are looking for a function of type PGFunction. Since these functions are really just wrappers around dlsym(

pgsql: Fix bitmap AND/OR scans on the inside of a nestloop partition-wi

2020-07-14 Thread Tom Lane
Fix bitmap AND/OR scans on the inside of a nestloop partition-wise join. reparameterize_path_by_child() failed to reparameterize BitmapAnd and BitmapOr paths. This matters only if such a path is chosen as the inside of a nestloop partition-wise join, where we have to pass in parameters from the o

pgsql: Fix bitmap AND/OR scans on the inside of a nestloop partition-wi

2020-07-14 Thread Tom Lane
Fix bitmap AND/OR scans on the inside of a nestloop partition-wise join. reparameterize_path_by_child() failed to reparameterize BitmapAnd and BitmapOr paths. This matters only if such a path is chosen as the inside of a nestloop partition-wise join, where we have to pass in parameters from the o

pgsql: Fix bitmap AND/OR scans on the inside of a nestloop partition-wi

2020-07-14 Thread Tom Lane
Fix bitmap AND/OR scans on the inside of a nestloop partition-wise join. reparameterize_path_by_child() failed to reparameterize BitmapAnd and BitmapOr paths. This matters only if such a path is chosen as the inside of a nestloop partition-wise join, where we have to pass in parameters from the o

pgsql: Fix bitmap AND/OR scans on the inside of a nestloop partition-wi

2020-07-14 Thread Tom Lane
Fix bitmap AND/OR scans on the inside of a nestloop partition-wise join. reparameterize_path_by_child() failed to reparameterize BitmapAnd and BitmapOr paths. This matters only if such a path is chosen as the inside of a nestloop partition-wise join, where we have to pass in parameters from the o

pgsql: Eliminate cache lookup errors in SQL functions for object addres

2020-07-14 Thread Michael Paquier
Eliminate cache lookup errors in SQL functions for object addresses When using the following functions, users could see various types of errors of the type "cache lookup failed for OID XXX" with elog(), that can only be used for internal errors: * pg_describe_object() * pg_identify_object() * pg_i

pgsql: Fix compilation failure with sepgsql

2020-07-14 Thread Michael Paquier
Fix compilation failure with sepgsql One change for getObjectIdentity() has been missed in 2a10fdc, causing the module to not compile properly. This was actually the only problem, and it happens that it is easy enough to check the compilation of the module on Debian after installing libselinux1-d

pgsql: Fix handling of missing files when using pg_rewind with online s

2020-07-14 Thread Michael Paquier
Fix handling of missing files when using pg_rewind with online source When working with an online source cluster, pg_rewind gets a list of all the files in the source data directory using a WITH RECURSIVE query, returning a NULL result for a file's metadata if it gets removed between the moment it

pgsql: Fix handling of missing files when using pg_rewind with online s

2020-07-14 Thread Michael Paquier
Fix handling of missing files when using pg_rewind with online source When working with an online source cluster, pg_rewind gets a list of all the files in the source data directory using a WITH RECURSIVE query, returning a NULL result for a file's metadata if it gets removed between the moment it

pgsql: Fix handling of missing files when using pg_rewind with online s

2020-07-14 Thread Michael Paquier
Fix handling of missing files when using pg_rewind with online source When working with an online source cluster, pg_rewind gets a list of all the files in the source data directory using a WITH RECURSIVE query, returning a NULL result for a file's metadata if it gets removed between the moment it

pgsql: Fix handling of missing files when using pg_rewind with online s

2020-07-14 Thread Michael Paquier
Fix handling of missing files when using pg_rewind with online source When working with an online source cluster, pg_rewind gets a list of all the files in the source data directory using a WITH RECURSIVE query, returning a NULL result for a file's metadata if it gets removed between the moment it

pgsql: Fix handling of missing files when using pg_rewind with online s

2020-07-14 Thread Michael Paquier
Fix handling of missing files when using pg_rewind with online source When working with an online source cluster, pg_rewind gets a list of all the files in the source data directory using a WITH RECURSIVE query, returning a NULL result for a file's metadata if it gets removed between the moment it

pgsql: Fix handling of missing files when using pg_rewind with online s

2020-07-14 Thread Michael Paquier
Fix handling of missing files when using pg_rewind with online source When working with an online source cluster, pg_rewind gets a list of all the files in the source data directory using a WITH RECURSIVE query, returning a NULL result for a file's metadata if it gets removed between the moment it

pgsql: Fix handling of missing files when using pg_rewind with online s

2020-07-14 Thread Michael Paquier
Fix handling of missing files when using pg_rewind with online source When working with an online source cluster, pg_rewind gets a list of all the files in the source data directory using a WITH RECURSIVE query, returning a NULL result for a file's metadata if it gets removed between the moment it