pgsql: Skip unnecessary stat() calls in walkdir().

2020-09-06 Thread Thomas Munro
Skip unnecessary stat() calls in walkdir(). Some kernels can tell us the type of a "dirent", so we can avoid a call to stat() or lstat() in many cases. Define a new function get_dirent_type() to contain that logic, for use by the backend and frontend versions of walkdir(), and perhaps other calle

pgsql: doc: Tweak sentence for pg_checksums when enabling checksums

2020-09-06 Thread Michael Paquier
doc: Tweak sentence for pg_checksums when enabling checksums The previous version of the docs mentioned that files are rewritten, implying that a second copy of each file gets created, but each file is updated in-place. Author: Michael Banck Reviewed-by: Daniel Gustafsson, Michael Paquier Discuss

pgsql: doc: Tweak sentence for pg_checksums when enabling checksums

2020-09-06 Thread Michael Paquier
doc: Tweak sentence for pg_checksums when enabling checksums The previous version of the docs mentioned that files are rewritten, implying that a second copy of each file gets created, but each file is updated in-place. Author: Michael Banck Reviewed-by: Daniel Gustafsson, Michael Paquier Discuss

pgsql: doc: Tweak sentence for pg_checksums when enabling checksums

2020-09-06 Thread Michael Paquier
doc: Tweak sentence for pg_checksums when enabling checksums The previous version of the docs mentioned that files are rewritten, implying that a second copy of each file gets created, but each file is updated in-place. Author: Michael Banck Reviewed-by: Daniel Gustafsson, Michael Paquier Discuss

Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based

2020-09-06 Thread Pavel Stehule
Hi ne 6. 9. 2020 v 20:13 odesílatel Tom Lane napsal: > Refactor pg_get_line() to expose an alternative StringInfo-based API. > > Letting the caller provide a StringInfo to read into is helpful when > the caller needs to merge lines or otherwise modify the data after > it's been read. Notably, n

pgsql: Add additional tests to test streaming of in-progress transactio

2020-09-06 Thread Amit Kapila
Add additional tests to test streaming of in-progress transactions. This covers the functionality tests for streaming in-progress subtransactions, streaming transactions containing rollback to savepoints, and streaming transactions having DDLs. Author: Tomas Vondra, Amit Kapila and Dilip Kumar Re

pgsql: Split Makefile symbol CFLAGS_VECTOR into two symbols.

2020-09-06 Thread Tom Lane
Split Makefile symbol CFLAGS_VECTOR into two symbols. Replace CFLAGS_VECTOR with CFLAGS_UNROLL_LOOPS and CFLAGS_VECTORIZE, allowing us to distinguish whether we want to apply -funroll-loops, -ftree-vectorize, or both to a particular source file. Up to now the only consumer of the symbol has been

pgsql: Apply auto-vectorization to the inner loop of numeric multiplica

2020-09-06 Thread Tom Lane
Apply auto-vectorization to the inner loop of numeric multiplication. Compile numeric.c with -ftree-vectorize where available, and adjust the innermost loop of mul_var() so that it is amenable to being auto-vectorized. (Mainly, that involves making it process the arrays left-to-right not right-to

pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based

2020-09-06 Thread Tom Lane
Refactor pg_get_line() to expose an alternative StringInfo-based API. Letting the caller provide a StringInfo to read into is helpful when the caller needs to merge lines or otherwise modify the data after it's been read. Notably, now the code added by commit 8f8154a50 can use pg_get_line_append(

pgsql: Remove arbitrary line length limits in pg_regress (plain and ECP

2020-09-06 Thread Tom Lane
Remove arbitrary line length limits in pg_regress (plain and ECPG). Refactor replace_string() to use a StringInfo for the modifiable string argument. This allows the string to be of indefinite size initially and/or grow substantially during replacement. The previous logic in convert_sourcefiles_

pgsql: Change path in example of file_fdw for logs

2020-09-06 Thread Magnus Hagander
Change path in example of file_fdw for logs It's better to use a relative path into the data directory, than to a hardcoded home directory of user 'josh'. Discussion: https://postgr.es/m/CABUevEyuf67Yu_r9gpDMs5MKifK7+-+pe=zjkzya4jen9ku...@mail.gmail.com Branch -- REL_13_STABLE Details

pgsql: Change path in example of file_fdw for logs

2020-09-06 Thread Magnus Hagander
Change path in example of file_fdw for logs It's better to use a relative path into the data directory, than to a hardcoded home directory of user 'josh'. Discussion: https://postgr.es/m/CABUevEyuf67Yu_r9gpDMs5MKifK7+-+pe=zjkzya4jen9ku...@mail.gmail.com Branch -- master Details --- htt

pgsql: Fix typo in comment

2020-09-06 Thread Magnus Hagander
Fix typo in comment Author: Hou, Zhijie Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/2a093355aa629468eab82242ced83a1c7fff76a8 Modified Files -- src/backend/storage/ipc/procsignal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Fix misleading error message about inconsistent moving-aggregate

2020-09-06 Thread Tom Lane
Fix misleading error message about inconsistent moving-aggregate types. We reported the wrong types when complaining that an aggregate's moving-aggregate implementation is inconsistent with its regular implementation. This was wrong since the feature was introduced, so back-patch to all supported

pgsql: Fix misleading error message about inconsistent moving-aggregate

2020-09-06 Thread Tom Lane
Fix misleading error message about inconsistent moving-aggregate types. We reported the wrong types when complaining that an aggregate's moving-aggregate implementation is inconsistent with its regular implementation. This was wrong since the feature was introduced, so back-patch to all supported

pgsql: Fix misleading error message about inconsistent moving-aggregate

2020-09-06 Thread Tom Lane
Fix misleading error message about inconsistent moving-aggregate types. We reported the wrong types when complaining that an aggregate's moving-aggregate implementation is inconsistent with its regular implementation. This was wrong since the feature was introduced, so back-patch to all supported

pgsql: Fix misleading error message about inconsistent moving-aggregate

2020-09-06 Thread Tom Lane
Fix misleading error message about inconsistent moving-aggregate types. We reported the wrong types when complaining that an aggregate's moving-aggregate implementation is inconsistent with its regular implementation. This was wrong since the feature was introduced, so back-patch to all supported

pgsql: Fix misleading error message about inconsistent moving-aggregate

2020-09-06 Thread Tom Lane
Fix misleading error message about inconsistent moving-aggregate types. We reported the wrong types when complaining that an aggregate's moving-aggregate implementation is inconsistent with its regular implementation. This was wrong since the feature was introduced, so back-patch to all supported

pgsql: Fix misleading error message about inconsistent moving-aggregate

2020-09-06 Thread Tom Lane
Fix misleading error message about inconsistent moving-aggregate types. We reported the wrong types when complaining that an aggregate's moving-aggregate implementation is inconsistent with its regular implementation. This was wrong since the feature was introduced, so back-patch to all supported

pgsql: Fix misleading error message about inconsistent moving-aggregate

2020-09-06 Thread Tom Lane
Fix misleading error message about inconsistent moving-aggregate types. We reported the wrong types when complaining that an aggregate's moving-aggregate implementation is inconsistent with its regular implementation. This was wrong since the feature was introduced, so back-patch to all supported

pgsql: Remove useless lstat() call in pg_rewind.

2020-09-06 Thread Tom Lane
Remove useless lstat() call in pg_rewind. This is duplicative of an lstat that was just done by the calling function (traverse_datadir), besides which we weren't really doing anything with the results. There's not much point in checking to see if someone removed the file since the previous lstat,

pgsql: Remove useless lstat() call in pg_rewind.

2020-09-06 Thread Tom Lane
Remove useless lstat() call in pg_rewind. This is duplicative of an lstat that was just done by the calling function (traverse_datadir), besides which we weren't really doing anything with the results. There's not much point in checking to see if someone removed the file since the previous lstat,

pgsql: Remove useless lstat() call in pg_rewind.

2020-09-06 Thread Tom Lane
Remove useless lstat() call in pg_rewind. This is duplicative of an lstat that was just done by the calling function (traverse_datadir), besides which we weren't really doing anything with the results. There's not much point in checking to see if someone removed the file since the previous lstat,

pgsql: Remove useless lstat() call in pg_rewind.

2020-09-06 Thread Tom Lane
Remove useless lstat() call in pg_rewind. This is duplicative of an lstat that was just done by the calling function (traverse_datadir), besides which we weren't really doing anything with the results. There's not much point in checking to see if someone removed the file since the previous lstat,

pgsql: Remove useless lstat() call in pg_rewind.

2020-09-06 Thread Tom Lane
Remove useless lstat() call in pg_rewind. This is duplicative of an lstat that was just done by the calling function (traverse_datadir), besides which we weren't really doing anything with the results. There's not much point in checking to see if someone removed the file since the previous lstat,

pgsql: Remove useless lstat() call in pg_rewind.

2020-09-06 Thread Tom Lane
Remove useless lstat() call in pg_rewind. This is duplicative of an lstat that was just done by the calling function (traverse_datadir), besides which we weren't really doing anything with the results. There's not much point in checking to see if someone removed the file since the previous lstat,

pgsql: Remove useless lstat() call in pg_rewind.

2020-09-06 Thread Tom Lane
Remove useless lstat() call in pg_rewind. This is duplicative of an lstat that was just done by the calling function (traverse_datadir), besides which we weren't really doing anything with the results. There's not much point in checking to see if someone removed the file since the previous lstat,

pgsql: doc: Don't hide the "Up" link when it is the same as "Home"

2020-09-06 Thread Peter Eisentraut
doc: Don't hide the "Up" link when it is the same as "Home" The original stylesheets seemed to think this was a good idea, but our users find it confusing and unhelpful, so undo that logic. Reported-by: Fabien COELHO Discussion: https://www.postgresql.org/message-id/flat/alpine.DEB.2.22.394.200

pgsql: Remove unused parameter

2020-09-06 Thread Peter Eisentraut
Remove unused parameter unused since 84d723b6cefcf25b8c800f8aa6cf3c9538a546b4 Discussion: https://www.postgresql.org/message-id/flat/511bb100-f829-ba21-2f10-9f952ec06ead%402ndquadrant.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/76af9744db168cfe96f45769b8ec