Re: Asynchronous execution support for Custom Scan

2022-12-01 Thread Kazutaka Onishi
gt; Le mardi 6 septembre 2022, 11:29:55 CET Etsuro Fujita a écrit : > > On Mon, Sep 5, 2022 at 10:32 PM Kazutaka Onishi wrote: > > > I'm sorry for my error on your name... > > > > No problem. > > > > > > IIUC, it uses the proposed > > > &

Re: Asynchronous execution support for Custom Scan

2022-09-05 Thread Kazutaka Onishi
rocessing in CustomScanAsyncRequest, configure to detect completion via file descriptor in CustomScanAsyncConfigureWait, and receive the result in CustomScanAsyncNotify. > So I'll review the proposed patches with it. Thank you! 2022年9月5日(月) 15:27 Etsuro Fujita : > > On Fri, Sep 2, 2022 at 10:43 PM Kazu

Re: Asynchronous execution support for Custom Scan

2022-09-02 Thread Kazutaka Onishi
Hi, Fujii-san, The asynchronous version "ctidscan" plugin is ready. Please check this. https://github.com/0-kaz/ctidscan/tree/async_sample I've confirmed this works correctly by running SQL shown below. The query plan shows 2 custom scan works asynchronously. postgres=# LOAD 'ctidscan'; LOAD

Re: Asynchronous execution support for Custom Scan

2022-08-13 Thread Kazutaka Onishi
v1 patch occurs gcc warnings, I fixed it. 2022年8月13日(土) 22:42 Kazutaka Onishi : > > Hello, > > I suggest supporting asynchronous execution for Custom Scan. > Since v14, PostgreSQL supports asynchronous execution for Foreign Scan. > This patch enables asynchronous execution by ap

Asynchronous execution support for Custom Scan

2022-08-13 Thread Kazutaka Onishi
Hello, I suggest supporting asynchronous execution for Custom Scan. Since v14, PostgreSQL supports asynchronous execution for Foreign Scan. This patch enables asynchronous execution by applying the process for Foreign Scan to Custom Scan . The patch is divided into 2 parts, source and

Re: TRUNCATE on foreign table

2021-04-08 Thread Kazutaka Onishi
Fujii-san, > >> Anyway, attached is the updated version of the patch. This is still based > >> on the latest Kazutaka-san's patch. That is, extra list for ONLY is still > >> passed to FDW. What about committing this version at first? Then we can > >> continue the discussion and change the

Re: TRUNCATE on foreign table

2021-04-06 Thread Kazutaka Onishi
oints left so that others can take a look at it? Yes, please. 2021年4月7日(水) 10:15 Bharath Rupireddy : > > On Tue, Apr 6, 2021 at 10:15 PM Kazutaka Onishi wrote: > > I've checked v15 patch with "make check-world" and confirmed this passed. > > Thanks for the patch. On

Re: TRUNCATE on foreign table

2021-04-06 Thread Kazutaka Onishi
; Looks like it is not related to this patch, please re-confirm it. I've checked v15 patch with "make check-world" and confirmed this passed. 2021年4月6日(火) 23:25 Bharath Rupireddy : > > On Tue, Apr 6, 2021 at 5:36 PM Kazutaka Onishi wrote: > > > > Thank you for checking v1

Re: TRUNCATE on foreign table

2021-04-06 Thread Kazutaka Onishi
e errors, please ensure to run git diff > --check on every patch. Umm.. I'm sure I've checked it on v13. I've confirmed it on v14. 2021年4月6日(火) 13:33 Bharath Rupireddy : > > On Mon, Apr 5, 2021 at 8:47 PM Kazutaka Onishi wrote: > > > > > Did you check that hash_destroy i

Re: TRUNCATE on foreign table

2021-04-05 Thread Kazutaka Onishi
true'); + TRUNCATE tru_ftable; -- accepted + NOTICE: destroyed <- hash_destroy works. Of course, the elog() is not included in v13 patch. 2021年4月5日(月) 23:35 Bharath Rupireddy : > > On Mon, Apr 5, 2021 at 7:38 PM Kazutaka Onishi wrote: > > > 3) I think we need truncatable beh

Re: TRUNCATE on foreign table

2021-04-05 Thread Kazutaka Onishi
are about the > column type, you could just have another int column and use > generate_series while inserting. We can remove md5 function calls. > Your tests will look clean. I've removed the text field but the number of records are kept. As I say at the top, the value of id is checked so I

Re: TRUNCATE on foreign table

2021-04-04 Thread Kazutaka Onishi
SELECT COUNT(*) FROM ..." However, for example, the "id" column is used to check after running TRUNCATE with ONLY clause to the inherited table. Thus, I use "sum(id)" instead of "count(*)" to check the result when the table has records. 2021年4月5日(月) 0:20 Bharath

Re: TRUNCATE on foreign table

2021-04-04 Thread Kazutaka Onishi
Oops... sorry. I haven't merged my working git branch with remote master branch. Please check this v11. 2021年4月4日(日) 23:56 Bharath Rupireddy : > > On Sun, Apr 4, 2021 at 12:48 PM Kazutaka Onishi wrote: > > > > v9 has also typo because I haven't checked about doc... sorry. >

Re: TRUNCATE on foreign table

2021-04-03 Thread Kazutaka Onishi
Sorry but I found the v7 patch has typo and it can't be built... I attached fixed one(v8). 2021年4月3日(土) 9:53 Kazutaka Onishi : > > All, > > Thank you for discussion. > I've updated the patch (v6->v7) according to the conclusion. > > I'll show the modified points: > 1.

Re: TRUNCATE on foreign table

2021-04-02 Thread Kazutaka Onishi
All, Thank you for discussion. I've updated the patch (v6->v7) according to the conclusion. I'll show the modified points: 1. Comments for ExecuteTuncate() 2. Replacing extra value in frels_extra with integer to label. 3. Skipping XLOG_HEAP_TRUNCATE on foreign table Regards, 2021年4月2日(金) 11:44

Re: TRUNCATE on foreign table

2021-03-13 Thread Kazutaka Onishi
I have fixed the patch to pass check-world test. :D 2021年3月13日(土) 12:35 Kazutaka Onishi : > To Ibrar, > Thank you for updating the patch! > > To Amit, > Thank you for checking the patch, and I have confirmed the failure. > Now I'm trying to fix it. > > > > 2

Re: TRUNCATE on foreign table

2021-03-12 Thread Kazutaka Onishi
To Ibrar, Thank you for updating the patch! To Amit, Thank you for checking the patch, and I have confirmed the failure. Now I'm trying to fix it. 2021年3月9日(火) 11:54 Amit Langote : > On Tue, Mar 9, 2021 at 2:24 AM Ibrar Ahmed wrote: > > The patch (pgsql14-truncate-on-foreign-table.v2.patch)

Re: TRUNCATE on foreign table

2021-02-10 Thread Kazutaka Onishi
That's because using the foreign server is difficult for the user. For example, the user doesn't always have the permission to login to the forein server. In some cases, the foreign table has been created by the administrator that has permission to access the two servers and the user only uses

Re: TRUNCATE on foreign table

2021-02-09 Thread Kazutaka Onishi
> IIUC, "truncatable" would be set to "false" for relations which do not > have physical storage e.g. views but will be true for regular tables. "truncatable" option is just for the foreign table and it's not related with whether it's on a physical storage or not. "postgres_fdw" already has

Re: TRUNCATE on foreign table

2021-02-07 Thread Kazutaka Onishi
, "truncatable") == 0) > + truncatable = defGetBoolean(defel); > > We can break out of the loop when the condition is met. > > Cheers > > On Sat, Feb 6, 2021 at 5:11 AM Kazutaka Onishi > wrote: > >> Hello, >> >> The attached patch is for supp

TRUNCATE on foreign table

2021-02-06 Thread Kazutaka Onishi
Commit Fest 2021-03. regards, -- -- Kazutaka Onishi (oni...@heterodb.com) diff --git a/contrib/postgres_fdw/deparse.c b/contrib/postgres_fdw/deparse.c index 6faf499f9a..a9ce323a67 100644 --- a/contrib/postgres_fdw/deparse.c +++ b/contrib/postgres_fdw/deparse.c @@ -2171,6 +2171,44 @@ deparseAnaly