pgsql: Fix CLogTruncationLock documentation.

2019-02-17 Thread Noah Misch
Fix CLogTruncationLock documentation. Back-patch to v10, which introduced the lock. Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/468b1af66088923bb045d112c3574a8738e4989e Modified Files -- doc/src/sgml/monitoring.sgml | 3 ++- 1 file changed, 2

pgsql: Fix CLogTruncationLock documentation.

2019-02-17 Thread Noah Misch
Fix CLogTruncationLock documentation. Back-patch to v10, which introduced the lock. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/301de4f7d92ffe5451d34da2edd36284f3887493 Modified Files -- doc/src/sgml/monitoring.sgml | 3 ++- 1 file changed, 2 inserti

pgsql: Fix CLogTruncationLock documentation.

2019-02-17 Thread Noah Misch
Fix CLogTruncationLock documentation. Back-patch to v10, which introduced the lock. Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/3cbbd3515aa61600389830ece74c57aa8a98c4a9 Modified Files -- doc/src/sgml/monitoring.sgml | 3 ++- 1 file changed, 2

pgsql: Doc: remove ancient comment.

2019-02-17 Thread Tatsuo Ishii
Doc: remove ancient comment. There's a very old comment in rules.sgml added back to 2003. It expected to a feature coming back but it never happened. So now we can safely remove the comment. Back-patched to all supported branches. Discussion: https://postgr.es/m/20190211.191004.2196308354574946

pgsql: Doc: remove ancient comment.

2019-02-17 Thread Tatsuo Ishii
Doc: remove ancient comment. There's a very old comment in rules.sgml added back to 2003. It expected to a feature coming back but it never happened. So now we can safely remove the comment. Back-patched to all supported branches. Discussion: https://postgr.es/m/20190211.191004.2196308354574946

pgsql: Doc: remove ancient comment.

2019-02-17 Thread Tatsuo Ishii
Doc: remove ancient comment. There's a very old comment in rules.sgml added back to 2003. It expected to a feature coming back but it never happened. So now we can safely remove the comment. Back-patched to all supported branches. Discussion: https://postgr.es/m/20190211.191004.2196308354574946

pgsql: Doc: remove ancient comment.

2019-02-17 Thread Tatsuo Ishii
Doc: remove ancient comment. There's a very old comment in rules.sgml added back to 2003. It expected to a feature coming back but it never happened. So now we can safely remove the comment. Back-patched to all supported branches. Discussion: https://postgr.es/m/20190211.191004.2196308354574946

pgsql: Doc: remove ancient comment.

2019-02-17 Thread Tatsuo Ishii
Doc: remove ancient comment. There's a very old comment in rules.sgml added back to 2003. It expected to a feature coming back but it never happened. So now we can safely remove the comment. Back-patched to all supported branches. Discussion: https://postgr.es/m/20190211.191004.2196308354574946

pgsql: Mark pg_config() stable rather than immutable

2019-02-17 Thread Joe Conway
Mark pg_config() stable rather than immutable pg_config() has been marked immutable since its inception. As part of a larger discussion around the definition of immutable versus stable and related implications for marking functions parallel safe raised by Andres, the consensus was clearly that pg_

pgsql: Fix CREATE VIEW to allow zero-column views.

2019-02-17 Thread Tom Lane
Fix CREATE VIEW to allow zero-column views. We should logically have allowed this case when we allowed zero-column tables, but it was overlooked. Although this might be thought a feature addition, it's really a bug fix, because it was possible to create a zero-column view via the convert-table-to

pgsql: Fix CREATE VIEW to allow zero-column views.

2019-02-17 Thread Tom Lane
Fix CREATE VIEW to allow zero-column views. We should logically have allowed this case when we allowed zero-column tables, but it was overlooked. Although this might be thought a feature addition, it's really a bug fix, because it was possible to create a zero-column view via the convert-table-to

pgsql: Fix CREATE VIEW to allow zero-column views.

2019-02-17 Thread Tom Lane
Fix CREATE VIEW to allow zero-column views. We should logically have allowed this case when we allowed zero-column tables, but it was overlooked. Although this might be thought a feature addition, it's really a bug fix, because it was possible to create a zero-column view via the convert-table-to

pgsql: Fix CREATE VIEW to allow zero-column views.

2019-02-17 Thread Tom Lane
Fix CREATE VIEW to allow zero-column views. We should logically have allowed this case when we allowed zero-column tables, but it was overlooked. Although this might be thought a feature addition, it's really a bug fix, because it was possible to create a zero-column view via the convert-table-to

pgsql: Fix CREATE VIEW to allow zero-column views.

2019-02-17 Thread Tom Lane
Fix CREATE VIEW to allow zero-column views. We should logically have allowed this case when we allowed zero-column tables, but it was overlooked. Although this might be thought a feature addition, it's really a bug fix, because it was possible to create a zero-column view via the convert-table-to

pgsql: Fix CREATE VIEW to allow zero-column views.

2019-02-17 Thread Tom Lane
Fix CREATE VIEW to allow zero-column views. We should logically have allowed this case when we allowed zero-column tables, but it was overlooked. Although this might be thought a feature addition, it's really a bug fix, because it was possible to create a zero-column view via the convert-table-to

pgsql: Fix documentation for dblink_error_message() return value

2019-02-17 Thread Joe Conway
Fix documentation for dblink_error_message() return value The dblink documentation claims that an empty string is returned if there has been no error, however OK is actually returned in that case. Also, clarify that an async error may not be seen unless dblink_is_busy() or dblink_get_result() have

pgsql: Fix documentation for dblink_error_message() return value

2019-02-17 Thread Joe Conway
Fix documentation for dblink_error_message() return value The dblink documentation claims that an empty string is returned if there has been no error, however OK is actually returned in that case. Also, clarify that an async error may not be seen unless dblink_is_busy() or dblink_get_result() have

pgsql: Fix documentation for dblink_error_message() return value

2019-02-17 Thread Joe Conway
Fix documentation for dblink_error_message() return value The dblink documentation claims that an empty string is returned if there has been no error, however OK is actually returned in that case. Also, clarify that an async error may not be seen unless dblink_is_busy() or dblink_get_result() have

pgsql: Fix documentation for dblink_error_message() return value

2019-02-17 Thread Joe Conway
Fix documentation for dblink_error_message() return value The dblink documentation claims that an empty string is returned if there has been no error, however OK is actually returned in that case. Also, clarify that an async error may not be seen unless dblink_is_busy() or dblink_get_result() have

pgsql: Fix documentation for dblink_error_message() return value

2019-02-17 Thread Joe Conway
Fix documentation for dblink_error_message() return value The dblink documentation claims that an empty string is returned if there has been no error, however OK is actually returned in that case. Also, clarify that an async error may not be seen unless dblink_is_busy() or dblink_get_result() have

pgsql: Fix documentation for dblink_error_message() return value

2019-02-17 Thread Joe Conway
Fix documentation for dblink_error_message() return value The dblink documentation claims that an empty string is returned if there has been no error, however OK is actually returned in that case. Also, clarify that an async error may not be seen unless dblink_is_busy() or dblink_get_result() have

pgsql: Fix race in dsm_unpin_segment() when handles are reused.

2019-02-17 Thread Thomas Munro
Fix race in dsm_unpin_segment() when handles are reused. Teach dsm_unpin_segment() to skip segments that are in the process of being destroyed by another backend, when searching for a handle. Such a segment cannot possibly be the one we are looking for, even if its handle matches. Another slot mi

pgsql: Fix race in dsm_unpin_segment() when handles are reused.

2019-02-17 Thread Thomas Munro
Fix race in dsm_unpin_segment() when handles are reused. Teach dsm_unpin_segment() to skip segments that are in the process of being destroyed by another backend, when searching for a handle. Such a segment cannot possibly be the one we are looking for, even if its handle matches. Another slot mi

pgsql: Fix race in dsm_unpin_segment() when handles are reused.

2019-02-17 Thread Thomas Munro
Fix race in dsm_unpin_segment() when handles are reused. Teach dsm_unpin_segment() to skip segments that are in the process of being destroyed by another backend, when searching for a handle. Such a segment cannot possibly be the one we are looking for, even if its handle matches. Another slot mi

pgsql: Avoid some unnecessary block reads in WAL reader

2019-02-17 Thread Michael Paquier
Avoid some unnecessary block reads in WAL reader When reading a new page internally and depending on the way the WAL reader facility gets used by plugins, the current implementation of the WAL reader may finish by reading a block multiple times while it is not actually necessary as the requested d

pgsql: Fix typo in transam.h for OIDs assigned by genbki.pl

2019-02-17 Thread Michael Paquier
Fix typo in transam.h for OIDs assigned by genbki.pl The actual range of reserved OIDs in this case is [11000,11999] and not [11000,12000]. Author: John Naylor Discussion: https://postgr.es/m/cajvsvgv5stmk-inxbmrf0nlbbgeaaknjnqxxmk+4ufeav8j...@mail.gmail.com Branch -- master Details --

pgsql: Fix some issues with TAP tests of pg_basebackup and pg_verify_ch

2019-02-17 Thread Michael Paquier
Fix some issues with TAP tests of pg_basebackup and pg_verify_checksums ee9e145 has fixed the tests of pg_basebackup for checksums a first time, still one seek() call missed the shot. Also, the data written in files to emulate corruptions was not actually writing zeros as the quoting style was in

pgsql: Fix some issues with TAP tests of pg_basebackup

2019-02-17 Thread Michael Paquier
Fix some issues with TAP tests of pg_basebackup ee9e145 has fixed the tests of pg_basebackup for checksums a first time, still one seek() call missed the shot. Also, the data written in files to emulate corruptions was not actually writing zeros as the quoting style was incorrect. Author: Michae

pgsql: Save PathTargets for distinct/ordered relations in root->upper_t

2019-02-17 Thread Etsuro Fujita
Save PathTargets for distinct/ordered relations in root->upper_targets[]. For the convenience of extensions, we previously only saved PathTargets for grouped, window, and final relations in root->upper_targets[] in grouping_planner(). To improve the convenience, save PathTargets for distinct and