pgsql: Use access() to check file existence in GetNewRelFileNode()

2018-07-08 Thread Michael Paquier
Use access() to check file existence in GetNewRelFileNode() Previous code used BasicOpenFile() and close() just to check for a file collision, while there is no need to hold open a file descriptor but that's an overkill here. Author: Paul Guo Reviewed-by: Peter Eisentraut, Michael Paquier Discuss

Re: pgsql: Use access() to check file existence in GetNewRelFileNode()

2018-07-08 Thread Andrew Dunstan
On 07/08/2018 06:00 AM, Michael Paquier wrote: Reviewed-by: Peter Eisentraut, Michael Paquier I think if you're the committer you're assumed to have reviewed the patch :-) cheers andrew -- Andrew Dunstanhttps://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, R

Re: pgsql: Use access() to check file existence in GetNewRelFileNode()

2018-07-08 Thread Andres Freund
Hi, On 2018-07-08 10:05:53 -0400, Andrew Dunstan wrote: > On 07/08/2018 06:00 AM, Michael Paquier wrote: > > Reviewed-by: Peter Eisentraut, Michael Paquier > > > > I think if you're the committer you're assumed to have reviewed the patch > :-) I personally think it makes sense to put oneself th

pgsql: Correct obsolete unique index insertion comment.

2018-07-08 Thread Peter Geoghegan
Correct obsolete unique index insertion comment. Commit bc292937ae6 failed to update a comment about unique index checking. _bt_insertonpg() is no longer responsible for finding an insertion location while preventing conflicting insertions. Branch -- master Details --- https://git.postg

Re: pgsql: Add wait event for fsync of WAL segments

2018-07-08 Thread Julien Rouhaud
Hi Michael, On Mon, Jul 2, 2018 at 3:23 PM, Michael Paquier wrote: > Add wait event for fsync of WAL segments > > Modified Files > -- > doc/src/sgml/monitoring.sgml | 4 I just noticed that the number of rows for the IO wait event type documentation hasn't been updated, see

pgsql: Fix WITH CHECK OPTION on views referencing postgres_fdw tables.

2018-07-08 Thread Jeff Davis
Fix WITH CHECK OPTION on views referencing postgres_fdw tables. If a view references a foreign table, and the foreign table has a BEFORE INSERT trigger, then it's possible for a tuple inserted or updated through the view to be changed such that it violates the view's WITH CHECK OPTION constraint.

pgsql: Rework order of end-of-recovery actions to delay timeline histor

2018-07-08 Thread Michael Paquier
Rework order of end-of-recovery actions to delay timeline history write A critical failure in some of the end-of-recovery actions before the end-of-recovery record is written can cause PostgreSQL to react inconsistently with the rest of the cluster in the event of a crash before the final record i

pgsql: Rework order of end-of-recovery actions to delay timeline histor

2018-07-08 Thread Michael Paquier
Rework order of end-of-recovery actions to delay timeline history write A critical failure in some of the end-of-recovery actions before the end-of-recovery record is written can cause PostgreSQL to react inconsistently with the rest of the cluster in the event of a crash before the final record i

pgsql: Rework order of end-of-recovery actions to delay timeline histor

2018-07-08 Thread Michael Paquier
Rework order of end-of-recovery actions to delay timeline history write A critical failure in some of the end-of-recovery actions before the end-of-recovery record is written can cause PostgreSQL to react inconsistently with the rest of the cluster in the event of a crash before the final record i

pgsql: Rework order of end-of-recovery actions to delay timeline histor

2018-07-08 Thread Michael Paquier
Rework order of end-of-recovery actions to delay timeline history write A critical failure in some of the end-of-recovery actions before the end-of-recovery record is written can cause PostgreSQL to react inconsistently with the rest of the cluster in the event of a crash before the final record i

pgsql: Rework order of end-of-recovery actions to delay timeline histor

2018-07-08 Thread Michael Paquier
Rework order of end-of-recovery actions to delay timeline history write A critical failure in some of the end-of-recovery actions before the end-of-recovery record is written can cause PostgreSQL to react inconsistently with the rest of the cluster in the event of a crash before the final record i

Re: pgsql: Use access() to check file existence in GetNewRelFileNode()

2018-07-08 Thread Michael Paquier
On Sun, Jul 08, 2018 at 10:27:33AM -0700, Andres Freund wrote: > On 2018-07-08 10:05:53 -0400, Andrew Dunstan wrote: >> I think if you're the committer you're assumed to have reviewed the patch >> :-) > > I personally think it makes sense to put oneself there. At least I order > the Reviewed-By et

pgsql: Fix table format in documentation for I/O wait events

2018-07-08 Thread Michael Paquier
Fix table format in documentation for I/O wait events This is an oversight from c55de5e. Author: Julien Rouhaud Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/cccf81d259747f5198b55f51820b382ff5229a48 Modified Files -- doc/src/sgml/monitoring.sgml | 2

Re: pgsql: Add wait event for fsync of WAL segments

2018-07-08 Thread Michael Paquier
On Sun, Jul 08, 2018 at 10:23:37PM +0200, Julien Rouhaud wrote: > I just noticed that the number of rows for the IO wait event type > documentation hasn't been updated, see > https://www.postgresql.org/docs/devel/static/monitoring-stats.html#WAIT-EVENT-TABLE. > > Trivial patch attached. Thanks, J