pgsql: Update version 11 release notes.

2018-08-04 Thread Tom Lane
Update version 11 release notes. Remove description of commit 1944cdc98, which has now been back-patched so it's not relevant to v11 any longer. Add descriptions of other recent commits that seemed worth mentioning. I marked the update as stopping at 2018-07-30, because it's unclear whether d06e

pgsql: Update version 11 release notes.

2018-08-04 Thread Tom Lane
Update version 11 release notes. Remove description of commit 1944cdc98, which has now been back-patched so it's not relevant to v11 any longer. Add descriptions of other recent commits that seemed worth mentioning. I marked the update as stopping at 2018-07-30, because it's unclear whether d06e

pgsql: Fix INSERT ON CONFLICT UPDATE through a view that isn't just SEL

2018-08-04 Thread Tom Lane
Fix INSERT ON CONFLICT UPDATE through a view that isn't just SELECT *. When expanding an updatable view that is an INSERT's target, the rewriter failed to rewrite Vars in the ON CONFLICT UPDATE clause. This accidentally worked if the view was just "SELECT * FROM ...", as the transformation would

pgsql: Fix INSERT ON CONFLICT UPDATE through a view that isn't just SEL

2018-08-04 Thread Tom Lane
Fix INSERT ON CONFLICT UPDATE through a view that isn't just SELECT *. When expanding an updatable view that is an INSERT's target, the rewriter failed to rewrite Vars in the ON CONFLICT UPDATE clause. This accidentally worked if the view was just "SELECT * FROM ...", as the transformation would

pgsql: Fix INSERT ON CONFLICT UPDATE through a view that isn't just SEL

2018-08-04 Thread Tom Lane
Fix INSERT ON CONFLICT UPDATE through a view that isn't just SELECT *. When expanding an updatable view that is an INSERT's target, the rewriter failed to rewrite Vars in the ON CONFLICT UPDATE clause. This accidentally worked if the view was just "SELECT * FROM ...", as the transformation would

pgsql: Fix INSERT ON CONFLICT UPDATE through a view that isn't just SEL

2018-08-04 Thread Tom Lane
Fix INSERT ON CONFLICT UPDATE through a view that isn't just SELECT *. When expanding an updatable view that is an INSERT's target, the rewriter failed to rewrite Vars in the ON CONFLICT UPDATE clause. This accidentally worked if the view was just "SELECT * FROM ...", as the transformation would

pgsql: Fix INSERT ON CONFLICT UPDATE through a view that isn't just SEL

2018-08-04 Thread Tom Lane
Fix INSERT ON CONFLICT UPDATE through a view that isn't just SELECT *. When expanding an updatable view that is an INSERT's target, the rewriter failed to rewrite Vars in the ON CONFLICT UPDATE clause. This accidentally worked if the view was just "SELECT * FROM ...", as the transformation would

Re: pgsql: Address set of issues with errno handling

2018-08-04 Thread Tom Lane
Michael Paquier writes: > On Sat, Aug 04, 2018 at 11:21:28AM -0400, Tom Lane wrote: >> IMO, it's OK to push this this weekend if you have time. > OK, done now down to 9.3. Thanks! regards, tom lane

Re: pgsql: Address set of issues with errno handling

2018-08-04 Thread Michael Paquier
On Sat, Aug 04, 2018 at 11:21:28AM -0400, Tom Lane wrote: > That looks good as far as it goes. I didn't cross-check that you > hit everyplace that needs this, but if you grepped for references to > ENOSPC then you presumably found them all. That's exactly how the history goes. > IMO, it's OK to

pgsql: Reset properly errno before calling write()

2018-08-04 Thread Michael Paquier
Reset properly errno before calling write() 6cb3372 enforces errno to ENOSPC when less bytes than what is expected have been written when it is unset, though it forgot to properly reset errno before doing a system call to write(), causing errno to potentially come from a previous system call. Rep

pgsql: Reset properly errno before calling write()

2018-08-04 Thread Michael Paquier
Reset properly errno before calling write() 6cb3372 enforces errno to ENOSPC when less bytes than what is expected have been written when it is unset, though it forgot to properly reset errno before doing a system call to write(), causing errno to potentially come from a previous system call. Rep

pgsql: Reset properly errno before calling write()

2018-08-04 Thread Michael Paquier
Reset properly errno before calling write() 6cb3372 enforces errno to ENOSPC when less bytes than what is expected have been written when it is unset, though it forgot to properly reset errno before doing a system call to write(), causing errno to potentially come from a previous system call. Rep

pgsql: Reset properly errno before calling write()

2018-08-04 Thread Michael Paquier
Reset properly errno before calling write() 6cb3372 enforces errno to ENOSPC when less bytes than what is expected have been written when it is unset, though it forgot to properly reset errno before doing a system call to write(), causing errno to potentially come from a previous system call. Rep

pgsql: Reset properly errno before calling write()

2018-08-04 Thread Michael Paquier
Reset properly errno before calling write() 6cb3372 enforces errno to ENOSPC when less bytes than what is expected have been written when it is unset, though it forgot to properly reset errno before doing a system call to write(), causing errno to potentially come from a previous system call. Rep

pgsql: Reset properly errno before calling write()

2018-08-04 Thread Michael Paquier
Reset properly errno before calling write() 6cb3372 enforces errno to ENOSPC when less bytes than what is expected have been written when it is unset, though it forgot to properly reset errno before doing a system call to write(), causing errno to potentially come from a previous system call. Rep

pgsql: Reset properly errno before calling write()

2018-08-04 Thread Michael Paquier
Reset properly errno before calling write() 6cb3372 enforces errno to ENOSPC when less bytes than what is expected have been written when it is unset, though it forgot to properly reset errno before doing a system call to write(), causing errno to potentially come from a previous system call. Rep

Re: pgsql: Address set of issues with errno handling

2018-08-04 Thread Tom Lane
Michael Paquier writes: > On Fri, Aug 03, 2018 at 04:04:36PM -0400, Tom Lane wrote: >> You need to go back and add the pre-clearing of errno in each of these >> places, otherwise the added code is basically useless. > I looked at all code paths enforcing ENOSPC on write() calls, and > attached is

Re: pgsql: Address set of issues with errno handling

2018-08-04 Thread Michael Paquier
On Fri, Aug 03, 2018 at 04:04:36PM -0400, Tom Lane wrote: > That's not good enough, because there is no reason to suppose that errno > is initially zero; in reality it'll be whatever was left over from the > last failed syscall, perhaps far distant from here. The places that do > this correctly do