From: | Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com> |
---|---|
To: | Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
Cc: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions |
Date: | 2020-04-16 20:10:09 |
Message-ID: | CAGz5QCKUDwAJCv39KNMFxCyfkbz7fdTDeQ=gpGynP71ksNMKug@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Apr 14, 2020 at 3:41 PM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
>
Few review comments from 0006-Add-support-for-streaming*.patch
+ subxacts[nsubxacts].offset = lseek(stream_fd, 0, SEEK_END);
lseek can return (-)ve value in case of error, right?
+ /*
+ * We might need to create the tablespace's tempfile directory, if no
+ * one has yet done so.
+ *
+ * Don't check for error from mkdir; it could fail if the directory
+ * already exists (maybe someone else just did the same thing). If
+ * it doesn't work then we'll bomb out when opening the file
+ */
+ mkdir(tempdirpath, S_IRWXU);
If that's the only reason, perhaps we can use something like following:
if (mkdir(tempdirpath, S_IRWXU) < 0 && errno != EEXIST)
throw error;
+
+ CloseTransientFile(stream_fd);
Might failed to close the file. We should handle the case.
Also, I think we need some implementations in dumpSubscription() to
dump the (streaming = 'on') option.
--
Thanks & Regards,
Kuntal Ghosh
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2020-04-16 20:28:00 | Re: xid wraparound danger due to INDEX_CLEANUP false |
Previous Message | Tom Lane | 2020-04-16 19:11:51 | Re: Do we need to handle orphaned prepared transactions in the server? |