pgsql: postgres_fdw: Refuse to send FETCH FIRST WITH TIES to remote ser

2024-06-07 Thread Etsuro Fujita
postgres_fdw: Refuse to send FETCH FIRST WITH TIES to remote servers. Previously, when considering LIMIT pushdown, postgres_fdw failed to check whether the query has this clause, which led to pushing false LIMIT clauses, causing incorrect results. This clause has been supported since v13, so we

pgsql: postgres_fdw: Refuse to send FETCH FIRST WITH TIES to remote ser

2024-06-07 Thread Etsuro Fujita
postgres_fdw: Refuse to send FETCH FIRST WITH TIES to remote servers. Previously, when considering LIMIT pushdown, postgres_fdw failed to check whether the query has this clause, which led to pushing false LIMIT clauses, causing incorrect results. This clause has been supported since v13, so we

pgsql: postgres_fdw: Refuse to send FETCH FIRST WITH TIES to remote ser

2024-06-07 Thread Etsuro Fujita
postgres_fdw: Refuse to send FETCH FIRST WITH TIES to remote servers. Previously, when considering LIMIT pushdown, postgres_fdw failed to check whether the query has this clause, which led to pushing false LIMIT clauses, causing incorrect results. This clause has been supported since v13, so we

pgsql: postgres_fdw: Refuse to send FETCH FIRST WITH TIES to remote ser

2024-06-07 Thread Etsuro Fujita
postgres_fdw: Refuse to send FETCH FIRST WITH TIES to remote servers. Previously, when considering LIMIT pushdown, postgres_fdw failed to check whether the query has this clause, which led to pushing false LIMIT clauses, causing incorrect results. This clause has been supported since v13, so we

pgsql: postgres_fdw: Refuse to send FETCH FIRST WITH TIES to remote ser

2024-06-07 Thread Etsuro Fujita
postgres_fdw: Refuse to send FETCH FIRST WITH TIES to remote servers. Previously, when considering LIMIT pushdown, postgres_fdw failed to check whether the query has this clause, which led to pushing false LIMIT clauses, causing incorrect results. This clause has been supported since v13, so we

pgsql: Fix typo in src/backend/utils/resowner/README.

2024-05-08 Thread Etsuro Fujita
Fix typo in src/backend/utils/resowner/README. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/4364e0126ec7663363cf2dff86a0f6da949fc002 Modified Files -- src/backend/utils/resowner/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: postgres_fdw: Improve comment about handling of asynchronous req

2024-04-11 Thread Etsuro Fujita
postgres_fdw: Improve comment about handling of asynchronous requests. We updated this comment in back branches (see commit f6f61a4bd et al); let's do so in HEAD as well for consistency. Discussion: https://postgr.es/m/CAPmGK142V1kqDfjo2H%2Bb54JTn2woVBrisFq%2B%3D9jwXwxr0VvbgA%40mail.gmail.com

pgsql: Fix WaitEventSet resource leak in WaitLatchOrSocket().

2024-04-11 Thread Etsuro Fujita
Fix WaitEventSet resource leak in WaitLatchOrSocket(). This function would have the same issue we solved in commit 501cfd07d: If an error is thrown after calling CreateWaitEventSet(), the file descriptor (on epoll- or kqueue-based systems) or handles (on Windows) that the WaitEventSet contains

pgsql: Fix WaitEventSet resource leak in WaitLatchOrSocket().

2024-04-11 Thread Etsuro Fujita
Fix WaitEventSet resource leak in WaitLatchOrSocket(). This function would have the same issue we solved in commit 501cfd07d: If an error is thrown after calling CreateWaitEventSet(), the file descriptor (on epoll- or kqueue-based systems) or handles (on Windows) that the WaitEventSet contains

pgsql: Fix WaitEventSet resource leak in WaitLatchOrSocket().

2024-04-11 Thread Etsuro Fujita
Fix WaitEventSet resource leak in WaitLatchOrSocket(). This function would have the same issue we solved in commit 501cfd07d: If an error is thrown after calling CreateWaitEventSet(), the file descriptor (on epoll- or kqueue-based systems) or handles (on Windows) that the WaitEventSet contains

pgsql: Fix WaitEventSet resource leak in WaitLatchOrSocket().

2024-04-11 Thread Etsuro Fujita
Fix WaitEventSet resource leak in WaitLatchOrSocket(). This function would have the same issue we solved in commit 501cfd07d: If an error is thrown after calling CreateWaitEventSet(), the file descriptor (on epoll- or kqueue-based systems) or handles (on Windows) that the WaitEventSet contains

pgsql: Fix WaitEventSet resource leak in WaitLatchOrSocket().

2024-04-11 Thread Etsuro Fujita
Fix WaitEventSet resource leak in WaitLatchOrSocket(). This function would have the same issue we solved in commit 501cfd07d: If an error is thrown after calling CreateWaitEventSet(), the file descriptor (on epoll- or kqueue-based systems) or handles (on Windows) that the WaitEventSet contains

pgsql: postgres_fdw: Remove useless ternary expression.

2024-04-04 Thread Etsuro Fujita
postgres_fdw: Remove useless ternary expression. There is no case where we would call pgfdw_exec_cleanup_query or pgfdw_exec_cleanup_query_{begin,end} with a NULL query string, so this expression is pointless; remove it and instead add to the latter functions an assertion ensuring the given query

pgsql: Fix bogus coding in ExecAppendAsyncEventWait().

2024-04-04 Thread Etsuro Fujita
Fix bogus coding in ExecAppendAsyncEventWait(). No configured-by-FDW events would result in "return" directly out of a PG_TRY block, making the exception stack dangling. Repair. Oversight in commit 501cfd07d; back-patch to v14, like that commit, but as we do not have this issue in HEAD (cf.

pgsql: Fix bogus coding in ExecAppendAsyncEventWait().

2024-04-04 Thread Etsuro Fujita
Fix bogus coding in ExecAppendAsyncEventWait(). No configured-by-FDW events would result in "return" directly out of a PG_TRY block, making the exception stack dangling. Repair. Oversight in commit 501cfd07d; back-patch to v14, like that commit, but as we do not have this issue in HEAD (cf.

pgsql: Fix bogus coding in ExecAppendAsyncEventWait().

2024-04-04 Thread Etsuro Fujita
Fix bogus coding in ExecAppendAsyncEventWait(). No configured-by-FDW events would result in "return" directly out of a PG_TRY block, making the exception stack dangling. Repair. Oversight in commit 501cfd07d; back-patch to v14, like that commit, but as we do not have this issue in HEAD (cf.

pgsql: Remove incorrect file reference in comment.

2023-11-13 Thread Etsuro Fujita
Remove incorrect file reference in comment. Commit b7eda3e0e moved XidInMVCCSnapshot() from tqual.c into snapmgr.c, but follow-up commit c91560def incorrectly updated this reference. We could fix it, but as pointed out by Daniel Gustafsson, 1) the reader can easily find the file that contains

pgsql: Remove incorrect file reference in comment.

2023-11-13 Thread Etsuro Fujita
Remove incorrect file reference in comment. Commit b7eda3e0e moved XidInMVCCSnapshot() from tqual.c into snapmgr.c, but follow-up commit c91560def incorrectly updated this reference. We could fix it, but as pointed out by Daniel Gustafsson, 1) the reader can easily find the file that contains

pgsql: Remove incorrect file reference in comment.

2023-11-13 Thread Etsuro Fujita
Remove incorrect file reference in comment. Commit b7eda3e0e moved XidInMVCCSnapshot() from tqual.c into snapmgr.c, but follow-up commit c91560def incorrectly updated this reference. We could fix it, but as pointed out by Daniel Gustafsson, 1) the reader can easily find the file that contains

pgsql: Remove incorrect file reference in comment.

2023-11-13 Thread Etsuro Fujita
Remove incorrect file reference in comment. Commit b7eda3e0e moved XidInMVCCSnapshot() from tqual.c into snapmgr.c, but follow-up commit c91560def incorrectly updated this reference. We could fix it, but as pointed out by Daniel Gustafsson, 1) the reader can easily find the file that contains

pgsql: Remove incorrect file reference in comment.

2023-11-13 Thread Etsuro Fujita
Remove incorrect file reference in comment. Commit b7eda3e0e moved XidInMVCCSnapshot() from tqual.c into snapmgr.c, but follow-up commit c91560def incorrectly updated this reference. We could fix it, but as pointed out by Daniel Gustafsson, 1) the reader can easily find the file that contains

pgsql: Remove incorrect file reference in comment.

2023-11-13 Thread Etsuro Fujita
Remove incorrect file reference in comment. Commit b7eda3e0e moved XidInMVCCSnapshot() from tqual.c into snapmgr.c, but follow-up commit c91560def incorrectly updated this reference. We could fix it, but as pointed out by Daniel Gustafsson, 1) the reader can easily find the file that contains

pgsql: Remove extra parenthesis from comment.

2023-10-06 Thread Etsuro Fujita
Remove extra parenthesis from comment. Branch -- REL_16_STABLE Details --- https://git.postgresql.org/pg/commitdiff/3ed98ed88a06f368c700d2ce03ff46d6d415dde3 Modified Files -- src/backend/storage/ipc/procarray.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Remove extra parenthesis from comment.

2023-10-06 Thread Etsuro Fujita
Remove extra parenthesis from comment. Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commitdiff/bb912563059c789932efc423ad2092b7638249be Modified Files -- src/backend/storage/ipc/procarray.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Remove extra parenthesis from comment.

2023-10-06 Thread Etsuro Fujita
Remove extra parenthesis from comment. Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/6e331c4a4faaf445f5a060b7aacd5da42b69740a Modified Files -- src/backend/storage/ipc/procarray.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Remove extra parenthesis from comment.

2023-10-06 Thread Etsuro Fujita
Remove extra parenthesis from comment. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/aec684ff0fb979d0245985fc0f84c07345a29e18 Modified Files -- src/backend/storage/ipc/procarray.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Fix typo in src/backend/access/transam/README.

2023-09-28 Thread Etsuro Fujita
Fix typo in src/backend/access/transam/README. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c68f78538f93803b5c4f879da12918762eb43482 Modified Files -- src/backend/access/transam/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Fix typo in src/backend/access/transam/README.

2023-09-28 Thread Etsuro Fujita
Fix typo in src/backend/access/transam/README. Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commitdiff/0db39e633812e8bda24067904ee8bc262e9eae25 Modified Files -- src/backend/access/transam/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Fix typo in src/backend/access/transam/README.

2023-09-28 Thread Etsuro Fujita
Fix typo in src/backend/access/transam/README. Branch -- REL_16_STABLE Details --- https://git.postgresql.org/pg/commitdiff/8bdfc53be48ae99109a05df1dfd203d35207733f Modified Files -- src/backend/access/transam/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Fix typo in src/backend/access/transam/README.

2023-09-28 Thread Etsuro Fujita
Fix typo in src/backend/access/transam/README. Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/c33d42d2e95d7994582ea3b811826088b76ce4e2 Modified Files -- src/backend/access/transam/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Update comment about set_join_pathlist_hook().

2023-09-21 Thread Etsuro Fujita
Update comment about set_join_pathlist_hook(). The comment introduced by commit e7cb7ee14 was a bit too terse, which could lead to extensions doing different things within the hook function than we intend to allow. Extend the comment to explain what they can do within the hook function.

pgsql: Update comment about set_join_pathlist_hook().

2023-09-21 Thread Etsuro Fujita
Update comment about set_join_pathlist_hook(). The comment introduced by commit e7cb7ee14 was a bit too terse, which could lead to extensions doing different things within the hook function than we intend to allow. Extend the comment to explain what they can do within the hook function.

pgsql: Update comment about set_join_pathlist_hook().

2023-09-21 Thread Etsuro Fujita
Update comment about set_join_pathlist_hook(). The comment introduced by commit e7cb7ee14 was a bit too terse, which could lead to extensions doing different things within the hook function than we intend to allow. Extend the comment to explain what they can do within the hook function.

pgsql: Update comment about set_join_pathlist_hook().

2023-09-21 Thread Etsuro Fujita
Update comment about set_join_pathlist_hook(). The comment introduced by commit e7cb7ee14 was a bit too terse, which could lead to extensions doing different things within the hook function than we intend to allow. Extend the comment to explain what they can do within the hook function.

pgsql: Update comment about set_join_pathlist_hook().

2023-09-21 Thread Etsuro Fujita
Update comment about set_join_pathlist_hook(). The comment introduced by commit e7cb7ee14 was a bit too terse, which could lead to extensions doing different things within the hook function than we intend to allow. Extend the comment to explain what they can do within the hook function.

pgsql: Update comment about set_join_pathlist_hook().

2023-09-21 Thread Etsuro Fujita
Update comment about set_join_pathlist_hook(). The comment introduced by commit e7cb7ee14 was a bit too terse, which could lead to extensions doing different things within the hook function than we intend to allow. Extend the comment to explain what they can do within the hook function.

pgsql: Update comment about set_join_pathlist_hook().

2023-09-21 Thread Etsuro Fujita
Update comment about set_join_pathlist_hook(). The comment introduced by commit e7cb7ee14 was a bit too terse, which could lead to extensions doing different things within the hook function than we intend to allow. Extend the comment to explain what they can do within the hook function.

pgsql: Doc: Improve documentation for creating custom scan paths.

2023-08-30 Thread Etsuro Fujita
Doc: Improve documentation for creating custom scan paths. This improves the documentation related to parallel query a little bit. Reviewed by Richard Guo. Discussion: https://postgr.es/m/CAPmGK159eJShAR4ek4Db8oHD4%2BZ18zwJkisEWkqRN-80BdDGFQ%40mail.gmail.com Branch -- master Details

pgsql: postgres_fdw: Fix test for parameterized foreign scan.

2023-08-30 Thread Etsuro Fujita
postgres_fdw: Fix test for parameterized foreign scan. Commit e4106b252 should have updated this test, but did not; back-patch to all supported branches. Reviewed by Richard Guo. Discussion: http://postgr.es/m/CAPmGK15nR0NXLSCKQAcqbZbTzrzd5MozowWnTnGfPkayndF43Q%40mail.gmail.com Branch --

pgsql: postgres_fdw: Fix test for parameterized foreign scan.

2023-08-30 Thread Etsuro Fujita
postgres_fdw: Fix test for parameterized foreign scan. Commit e4106b252 should have updated this test, but did not; back-patch to all supported branches. Reviewed by Richard Guo. Discussion: http://postgr.es/m/CAPmGK15nR0NXLSCKQAcqbZbTzrzd5MozowWnTnGfPkayndF43Q%40mail.gmail.com Branch --

pgsql: postgres_fdw: Fix test for parameterized foreign scan.

2023-08-30 Thread Etsuro Fujita
postgres_fdw: Fix test for parameterized foreign scan. Commit e4106b252 should have updated this test, but did not; back-patch to all supported branches. Reviewed by Richard Guo. Discussion: http://postgr.es/m/CAPmGK15nR0NXLSCKQAcqbZbTzrzd5MozowWnTnGfPkayndF43Q%40mail.gmail.com Branch --

pgsql: postgres_fdw: Fix test for parameterized foreign scan.

2023-08-30 Thread Etsuro Fujita
postgres_fdw: Fix test for parameterized foreign scan. Commit e4106b252 should have updated this test, but did not; back-patch to all supported branches. Reviewed by Richard Guo. Discussion: http://postgr.es/m/CAPmGK15nR0NXLSCKQAcqbZbTzrzd5MozowWnTnGfPkayndF43Q%40mail.gmail.com Branch --

pgsql: postgres_fdw: Fix test for parameterized foreign scan.

2023-08-30 Thread Etsuro Fujita
postgres_fdw: Fix test for parameterized foreign scan. Commit e4106b252 should have updated this test, but did not; back-patch to all supported branches. Reviewed by Richard Guo. Discussion: http://postgr.es/m/CAPmGK15nR0NXLSCKQAcqbZbTzrzd5MozowWnTnGfPkayndF43Q%40mail.gmail.com Branch --

pgsql: postgres_fdw: Fix test for parameterized foreign scan.

2023-08-30 Thread Etsuro Fujita
postgres_fdw: Fix test for parameterized foreign scan. Commit e4106b252 should have updated this test, but did not; back-patch to all supported branches. Reviewed by Richard Guo. Discussion: http://postgr.es/m/CAPmGK15nR0NXLSCKQAcqbZbTzrzd5MozowWnTnGfPkayndF43Q%40mail.gmail.com Branch --

pgsql: postgres_fdw: Fix test for parameterized foreign scan.

2023-08-30 Thread Etsuro Fujita
postgres_fdw: Fix test for parameterized foreign scan. Commit e4106b252 should have updated this test, but did not; back-patch to all supported branches. Reviewed by Richard Guo. Discussion: http://postgr.es/m/CAPmGK15nR0NXLSCKQAcqbZbTzrzd5MozowWnTnGfPkayndF43Q%40mail.gmail.com Branch --

Re: pgsql: Re-allow FDWs and custom scan providers to replace joins with ps

2023-08-15 Thread Etsuro Fujita
I CCed Andrew. On Tue, Aug 15, 2023 at 4:50 PM Etsuro Fujita wrote: > Re-allow FDWs and custom scan providers to replace joins with pseudoconstant > quals. This broke blackhole_fdw, which is tested in buildfarm member crake, because it changed the argument list for create_foreignsca

pgsql: Fix code indentation vioaltion introduced in commit 9e9931d2b.

2023-08-15 Thread Etsuro Fujita
Fix code indentation vioaltion introduced in commit 9e9931d2b. Per buildfarm member koel Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/89be0b89ae60c63856fd26d82a104781540e2312 Modified Files -- contrib/postgres_fdw/postgres_fdw.c | 11 +++ 1

pgsql: Re-allow FDWs and custom scan providers to replace joins with ps

2023-08-15 Thread Etsuro Fujita
Re-allow FDWs and custom scan providers to replace joins with pseudoconstant quals. This was disabled in commit 6f80a8d9c due to the lack of support for handling of pseudoconstant quals assigned to replaced joins in createplan.c. To re-allow it, this patch adds the support by 1) modifying the

pgsql: Doc: update documentation for creating custom scan paths.

2023-08-03 Thread Etsuro Fujita
Doc: update documentation for creating custom scan paths. Commit f49842d1e added a new callback for custom scan paths, but missed updating the documentation. Back-patch to all supported branches. Discussion:

pgsql: Doc: update documentation for creating custom scan paths.

2023-08-03 Thread Etsuro Fujita
Doc: update documentation for creating custom scan paths. Commit f49842d1e added a new callback for custom scan paths, but missed updating the documentation. Back-patch to all supported branches. Discussion:

pgsql: Doc: update documentation for creating custom scan paths.

2023-08-03 Thread Etsuro Fujita
Doc: update documentation for creating custom scan paths. Commit f49842d1e added a new callback for custom scan paths, but missed updating the documentation. Back-patch to all supported branches. Discussion:

pgsql: Doc: update documentation for creating custom scan paths.

2023-08-03 Thread Etsuro Fujita
Doc: update documentation for creating custom scan paths. Commit f49842d1e added a new callback for custom scan paths, but missed updating the documentation. Back-patch to all supported branches. Discussion:

pgsql: Doc: update documentation for creating custom scan paths.

2023-08-03 Thread Etsuro Fujita
Doc: update documentation for creating custom scan paths. Commit f49842d1e added a new callback for custom scan paths, but missed updating the documentation. Back-patch to all supported branches. Discussion:

pgsql: Doc: update documentation for creating custom scan paths.

2023-08-03 Thread Etsuro Fujita
Doc: update documentation for creating custom scan paths. Commit f49842d1e added a new callback for custom scan paths, but missed updating the documentation. Back-patch to all supported branches. Discussion:

pgsql: Doc: update documentation for creating custom scan paths.

2023-08-03 Thread Etsuro Fujita
Doc: update documentation for creating custom scan paths. Commit f49842d1e added a new callback for custom scan paths, but missed updating the documentation. Back-patch to all supported branches. Discussion:

pgsql: Update comments on CustomPath struct.

2023-08-03 Thread Etsuro Fujita
Update comments on CustomPath struct. Commit e7cb7ee14 allowed custom scan providers to create CustomPath paths for join relations as well, but missed updating the comments. Back-patch to all supported branches. Discussion:

pgsql: Update comments on CustomPath struct.

2023-08-03 Thread Etsuro Fujita
Update comments on CustomPath struct. Commit e7cb7ee14 allowed custom scan providers to create CustomPath paths for join relations as well, but missed updating the comments. Back-patch to all supported branches. Discussion:

pgsql: Update comments on CustomPath struct.

2023-08-03 Thread Etsuro Fujita
Update comments on CustomPath struct. Commit e7cb7ee14 allowed custom scan providers to create CustomPath paths for join relations as well, but missed updating the comments. Back-patch to all supported branches. Discussion:

pgsql: Update comments on CustomPath struct.

2023-08-03 Thread Etsuro Fujita
Update comments on CustomPath struct. Commit e7cb7ee14 allowed custom scan providers to create CustomPath paths for join relations as well, but missed updating the comments. Back-patch to all supported branches. Discussion:

pgsql: Update comments on CustomPath struct.

2023-08-03 Thread Etsuro Fujita
Update comments on CustomPath struct. Commit e7cb7ee14 allowed custom scan providers to create CustomPath paths for join relations as well, but missed updating the comments. Back-patch to all supported branches. Discussion:

pgsql: Update comments on CustomPath struct.

2023-08-03 Thread Etsuro Fujita
Update comments on CustomPath struct. Commit e7cb7ee14 allowed custom scan providers to create CustomPath paths for join relations as well, but missed updating the comments. Back-patch to all supported branches. Discussion:

pgsql: Update comments on CustomPath struct.

2023-08-03 Thread Etsuro Fujita
Update comments on CustomPath struct. Commit e7cb7ee14 allowed custom scan providers to create CustomPath paths for join relations as well, but missed updating the comments. Back-patch to all supported branches. Discussion:

pgsql: Disallow replacing joins with scans in problematic cases.

2023-07-28 Thread Etsuro Fujita
Disallow replacing joins with scans in problematic cases. Commit e7cb7ee14, which introduced the infrastructure for FDWs and custom scan providers to replace joins with scans, failed to add support handling of pseudoconstant quals assigned to replaced joins in createplan.c, leading to an

pgsql: Disallow replacing joins with scans in problematic cases.

2023-07-28 Thread Etsuro Fujita
Disallow replacing joins with scans in problematic cases. Commit e7cb7ee14, which introduced the infrastructure for FDWs and custom scan providers to replace joins with scans, failed to add support handling of pseudoconstant quals assigned to replaced joins in createplan.c, leading to an

pgsql: Disallow replacing joins with scans in problematic cases.

2023-07-28 Thread Etsuro Fujita
Disallow replacing joins with scans in problematic cases. Commit e7cb7ee14, which introduced the infrastructure for FDWs and custom scan providers to replace joins with scans, failed to add support handling of pseudoconstant quals assigned to replaced joins in createplan.c, leading to an

pgsql: Disallow replacing joins with scans in problematic cases.

2023-07-28 Thread Etsuro Fujita
Disallow replacing joins with scans in problematic cases. Commit e7cb7ee14, which introduced the infrastructure for FDWs and custom scan providers to replace joins with scans, failed to add support handling of pseudoconstant quals assigned to replaced joins in createplan.c, leading to an

pgsql: Disallow replacing joins with scans in problematic cases.

2023-07-28 Thread Etsuro Fujita
Disallow replacing joins with scans in problematic cases. Commit e7cb7ee14, which introduced the infrastructure for FDWs and custom scan providers to replace joins with scans, failed to add support handling of pseudoconstant quals assigned to replaced joins in createplan.c, leading to an

pgsql: Disallow replacing joins with scans in problematic cases.

2023-07-28 Thread Etsuro Fujita
Disallow replacing joins with scans in problematic cases. Commit e7cb7ee14, which introduced the infrastructure for FDWs and custom scan providers to replace joins with scans, failed to add support handling of pseudoconstant quals assigned to replaced joins in createplan.c, leading to an

pgsql: Disallow replacing joins with scans in problematic cases.

2023-07-28 Thread Etsuro Fujita
Disallow replacing joins with scans in problematic cases. Commit e7cb7ee14, which introduced the infrastructure for FDWs and custom scan providers to replace joins with scans, failed to add support handling of pseudoconstant quals assigned to replaced joins in createplan.c, leading to an

pgsql: doc: Fix grammar.

2023-04-26 Thread Etsuro Fujita
doc: Fix grammar. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/4def50eba99e0a7e9b4c09fa3e33209d6d6fb834 Modified Files -- doc/src/sgml/postgres-fdw.sgml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

pgsql: postgres_fdw: Add support for parallel abort.

2023-04-06 Thread Etsuro Fujita
. This is enabled by the server option "parallel_abort". The default is false. Etsuro Fujita, reviewed by David Zhang. Discussion: http://postgr.es/m/CAPmGK15FuPVGx3TGHKShsbPKKtF1y58-ZLcKoxfN-nqLj1dZ%3Dg%40mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/

pgsql: Doc: Improve description of the "batch_size" option for postgres

2023-03-23 Thread Etsuro Fujita
Doc: Improve description of the "batch_size" option for postgres_fdw. Document that the actual number of rows postgres_fdw inserts at once in the COPY case is determined in a similar way to the INSERT case, but it has a restriction that does not apply to the INSERT case. Follow-up for commit

pgsql: postgres_fdw: Remove useless if-test in GetConnection().

2023-03-17 Thread Etsuro Fujita
postgres_fdw: Remove useless if-test in GetConnection(). Checking whether entry->conn is NULL after doing disconnect_pg_server() for that entry is pointless, as that function ensures that it is NULL. Thinko in commit 7fc1a81e4; this would be harmless, so patch HEAD only. Reviewed-by: Richard

pgsql: Allow batching of inserts during cross-partition updates.

2022-12-20 Thread Etsuro Fujita
Allow batching of inserts during cross-partition updates. Commit 927f453a9 disallowed batching added by commit b663a4136 to be used for the inserts performed as part of cross-partition updates of partitioned tables, mainly because the previous code in nodeModifyTable.c couldn't handle pending

pgsql: postgres_fdw: Fix assertion in estimate_path_cost_size().

2022-12-15 Thread Etsuro Fujita
postgres_fdw: Fix assertion in estimate_path_cost_size(). Commit 08d2d58a2 added this assertion assuming that the retrieved_rows estimate for a foreign relation is set to at least one row in estimate_path_cost_size(), but the assumption isn't correct because if the relation is a foreign table

Re: pgsql: postgres_fdw: Fix assertion in estimate_path_cost_size().

2022-12-14 Thread Etsuro Fujita
it was added in v13. :-( Will back-patch to v12 as well. Thanks for the report! Best regards, Etsuro Fujita

pgsql: Remove new structure member from ResultRelInfo.

2022-12-07 Thread Etsuro Fujita
Remove new structure member from ResultRelInfo. In commit ffbb7e65a, I added a ModifyTableState member to ResultRelInfo to save the owning ModifyTableState for use by nodeModifyTable.c when performing batch inserts, but as pointed out by Tom Lane, that changed the array stride of

pgsql: Remove new structure member from ResultRelInfo.

2022-12-07 Thread Etsuro Fujita
Remove new structure member from ResultRelInfo. In commit ffbb7e65a, I added a ModifyTableState member to ResultRelInfo to save the owning ModifyTableState for use by nodeModifyTable.c when performing batch inserts, but as pointed out by Tom Lane, that changed the array stride of

pgsql: Remove new structure member from ResultRelInfo.

2022-12-07 Thread Etsuro Fujita
Remove new structure member from ResultRelInfo. In commit ffbb7e65a, I added a ModifyTableState member to ResultRelInfo to save the owning ModifyTableState for use by nodeModifyTable.c when performing batch inserts, but as pointed out by Tom Lane, that changed the array stride of

pgsql: Fix handling of pending inserts in nodeModifyTable.c.

2022-11-25 Thread Etsuro Fujita
Fix handling of pending inserts in nodeModifyTable.c. Commit b663a4136, which allowed FDWs to INSERT rows in bulk, added to nodeModifyTable.c code to flush pending inserts to the foreign-table result relation(s) before completing processing of the ModifyTable node, but the code failed to take

pgsql: Fix handling of pending inserts in nodeModifyTable.c.

2022-11-25 Thread Etsuro Fujita
Fix handling of pending inserts in nodeModifyTable.c. Commit b663a4136, which allowed FDWs to INSERT rows in bulk, added to nodeModifyTable.c code to flush pending inserts to the foreign-table result relation(s) before completing processing of the ModifyTable node, but the code failed to take

pgsql: Fix handling of pending inserts in nodeModifyTable.c.

2022-11-25 Thread Etsuro Fujita
Fix handling of pending inserts in nodeModifyTable.c. Commit b663a4136, which allowed FDWs to INSERT rows in bulk, added to nodeModifyTable.c code to flush pending inserts to the foreign-table result relation(s) before completing processing of the ModifyTable node, but the code failed to take

pgsql: Correct error message for row-level triggers with transition tab

2022-11-04 Thread Etsuro Fujita
Correct error message for row-level triggers with transition tables on partitioned tables. "Triggers on partitioned tables cannot have transition tables." is incorrect as we allow statement-level triggers on partitioned tables to have transition tables. This has been wrong since commit

pgsql: Correct error message for row-level triggers with transition tab

2022-11-04 Thread Etsuro Fujita
Correct error message for row-level triggers with transition tables on partitioned tables. "Triggers on partitioned tables cannot have transition tables." is incorrect as we allow statement-level triggers on partitioned tables to have transition tables. This has been wrong since commit

pgsql: Correct error message for row-level triggers with transition tab

2022-11-04 Thread Etsuro Fujita
Correct error message for row-level triggers with transition tables on partitioned tables. "Triggers on partitioned tables cannot have transition tables." is incorrect as we allow statement-level triggers on partitioned tables to have transition tables. This has been wrong since commit

pgsql: Correct error message for row-level triggers with transition tab

2022-11-04 Thread Etsuro Fujita
Correct error message for row-level triggers with transition tables on partitioned tables. "Triggers on partitioned tables cannot have transition tables." is incorrect as we allow statement-level triggers on partitioned tables to have transition tables. This has been wrong since commit

pgsql: Correct error message for row-level triggers with transition tab

2022-11-04 Thread Etsuro Fujita
Correct error message for row-level triggers with transition tables on partitioned tables. "Triggers on partitioned tables cannot have transition tables." is incorrect as we allow statement-level triggers on partitioned tables to have transition tables. This has been wrong since commit

pgsql: Correct error message for row-level triggers with transition tab

2022-11-04 Thread Etsuro Fujita
Correct error message for row-level triggers with transition tables on partitioned tables. "Triggers on partitioned tables cannot have transition tables." is incorrect as we allow statement-level triggers on partitioned tables to have transition tables. This has been wrong since commit

pgsql: Fix copy-and-pasteo in comment.

2022-11-02 Thread Etsuro Fujita
Fix copy-and-pasteo in comment. Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commitdiff/d5e1748f02fb54cff276e7714be474f4e9a9de72 Modified Files -- src/backend/executor/nodeModifyTable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Fix copy-and-pasteo in comment.

2022-11-02 Thread Etsuro Fujita
Fix copy-and-pasteo in comment. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/d54e79ba282c6a86d0c63e990e716b2c07a8656d Modified Files -- src/backend/executor/nodeModifyTable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Fix copy-and-pasteo in comment.

2022-11-02 Thread Etsuro Fujita
Fix copy-and-pasteo in comment. Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/2896aa98ef569d99ea5b27cd6e7a2a789c14fd0a Modified Files -- src/backend/executor/nodeModifyTable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Fix copy-and-pasteo in comment.

2022-11-02 Thread Etsuro Fujita
Fix copy-and-pasteo in comment. Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff/197cbca6bc7766aba215f34cb835306f101997b2 Modified Files -- src/backend/executor/nodeModifyTable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Fix copy-and-pasteo in comment.

2022-11-02 Thread Etsuro Fujita
Fix copy-and-pasteo in comment. Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/0008ad8517aefa0787c925718a88da8af1a683c1 Modified Files -- src/backend/executor/nodeModifyTable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Fix copy-and-pasteo in comment.

2022-11-02 Thread Etsuro Fujita
Fix copy-and-pasteo in comment. Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/36abd1fb51df7c94ddfc26b0d08be7feb5f40241 Modified Files -- src/backend/executor/nodeModifyTable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Allow batch insertion during COPY into a foreign table.

2022-10-13 Thread Etsuro Fujita
Allow batch insertion during COPY into a foreign table. Commit 3d956d956 allowed the COPY, but it's done by inserting individual rows to the foreign table, so it can be inefficient due to the overhead caused by each round-trip to the foreign server. To improve performance of the COPY in such a

pgsql: Update comment in ExecInsert() regarding batch insertion.

2022-09-29 Thread Etsuro Fujita
Update comment in ExecInsert() regarding batch insertion. Remove the stale text that is a leftover from an earlier version of the patch to add support for batch insertion, and adjust the wording in the remaining text. Back-patch to v14 where batch insertion came in. Review and wording

pgsql: Update comment in ExecInsert() regarding batch insertion.

2022-09-29 Thread Etsuro Fujita
Update comment in ExecInsert() regarding batch insertion. Remove the stale text that is a leftover from an earlier version of the patch to add support for batch insertion, and adjust the wording in the remaining text. Back-patch to v14 where batch insertion came in. Review and wording

pgsql: Update comment in ExecInsert() regarding batch insertion.

2022-09-29 Thread Etsuro Fujita
Update comment in ExecInsert() regarding batch insertion. Remove the stale text that is a leftover from an earlier version of the patch to add support for batch insertion, and adjust the wording in the remaining text. Back-patch to v14 where batch insertion came in. Review and wording

pgsql: Fix thinko in comment.

2022-09-22 Thread Etsuro Fujita
Fix thinko in comment. This comment has been wrong since its introduction in commit 0d5f05cde; backpatch to v12 where that came in. Discussion: https://postgr.es/m/CAPmGK14VGf-xQjGQN4o1QyAbXAaxugU5%3DqfcmTDh1iufUDnV_w%40mail.gmail.com Branch -- REL_15_STABLE Details ---

pgsql: Fix thinko in comment.

2022-09-22 Thread Etsuro Fujita
Fix thinko in comment. This comment has been wrong since its introduction in commit 0d5f05cde; backpatch to v12 where that came in. Discussion: https://postgr.es/m/CAPmGK14VGf-xQjGQN4o1QyAbXAaxugU5%3DqfcmTDh1iufUDnV_w%40mail.gmail.com Branch -- REL_12_STABLE Details ---

  1   2   3   4   >