pgsql: Fix scenario where streaming standby gets stuck at a continuatio

2018-05-04 Thread Heikki Linnakangas
Fix scenario where streaming standby gets stuck at a continuation record. If a continuation record is split so that its first half has already been removed from the master, and is only present in pg_wal, and there is a recycled WAL segment in the standby server that looks like it would contain

pgsql: Fix scenario where streaming standby gets stuck at a continuatio

2018-05-04 Thread Heikki Linnakangas
Fix scenario where streaming standby gets stuck at a continuation record. If a continuation record is split so that its first half has already been removed from the master, and is only present in pg_wal, and there is a recycled WAL segment in the standby server that looks like it would contain

pgsql: Fix scenario where streaming standby gets stuck at a continuatio

2018-05-04 Thread Heikki Linnakangas
Fix scenario where streaming standby gets stuck at a continuation record. If a continuation record is split so that its first half has already been removed from the master, and is only present in pg_wal, and there is a recycled WAL segment in the standby server that looks like it would contain

pgsql: Fix scenario where streaming standby gets stuck at a continuatio

2018-05-04 Thread Heikki Linnakangas
Fix scenario where streaming standby gets stuck at a continuation record. If a continuation record is split so that its first half has already been removed from the master, and is only present in pg_wal, and there is a recycled WAL segment in the standby server that looks like it would contain

pgsql: Fix scenario where streaming standby gets stuck at a continuatio

2018-05-04 Thread Heikki Linnakangas
Fix scenario where streaming standby gets stuck at a continuation record. If a continuation record is split so that its first half has already been removed from the master, and is only present in pg_wal, and there is a recycled WAL segment in the standby server that looks like it would contain

pgsql: Remove outdated comment on how to set logtape's read buffer size

2018-04-27 Thread Heikki Linnakangas
Remove outdated comment on how to set logtape's read buffer size. Commit b75f467b6e removed the LogicalTapeAssignReadBufferSize() function, but forgot to update this comment. The read buffer size is an argument to LogicalTapeRewindForRead() now. Doesn't seem worth going into the details in the

pgsql: Remove outdated comment on how to set logtape's read buffer size

2018-04-27 Thread Heikki Linnakangas
Remove outdated comment on how to set logtape's read buffer size. Commit b75f467b6e removed the LogicalTapeAssignReadBufferSize() function, but forgot to update this comment. The read buffer size is an argument to LogicalTapeRewindForRead() now. Doesn't seem worth going into the details in the

pgsql: Add missing files to src/backend/lib/README.

2018-05-22 Thread Heikki Linnakangas
Add missing files to src/backend/lib/README. The README lists all the files available in the directory, along with short descriptions of each, but a few newly added ones were missing. While we're at it, reorder the list into alphabetical order. Author: Takeshi Ideriha Discussion:

pgsql: Accept "B" in all memory-unit GUCs, and improve error messages.

2018-05-23 Thread Heikki Linnakangas
Accept "B" in all memory-unit GUCs, and improve error messages. Commit 6e7baa3227 added support for "B" unit, for specifying config options in bytes. However, it was only accepted in GUC_UNIT_BYTE settings, wal_segment_size and track_activity_query_size, and not e.g. in work_mem. This patch makes

pgsql: Fix typo in comment.

2018-05-22 Thread Heikki Linnakangas
Fix typo in comment. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/a0b37684ba1c7ce6380db6ff6817cf9f3a85b94c Modified Files -- src/backend/optimizer/path/joinpath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Fix obsolete comment.

2018-06-07 Thread Heikki Linnakangas
Fix obsolete comment. The 'orig_slot' argument was removed in commit c0a8ae7be392, but that commit forgot to update the comment. Author: Amit Langote Discussion: https://www.postgresql.org/message-id/194ac4bf-7b4a-c887-bf26-bc1a85ea9...@lab.ntt.co.jp Branch -- REL_10_STABLE Details

pgsql: Fix obsolete comment.

2018-06-07 Thread Heikki Linnakangas
Fix obsolete comment. The 'orig_slot' argument was removed in commit c0a8ae7be392, but that commit forgot to update the comment. Author: Amit Langote Discussion: https://www.postgresql.org/message-id/194ac4bf-7b4a-c887-bf26-bc1a85ea9...@lab.ntt.co.jp Branch -- master Details ---

pgsql: Remove remaining references to version-0 calling convention in d

2018-05-02 Thread Heikki Linnakangas
Remove remaining references to version-0 calling convention in docs. Support for version-0 calling convention was removed in PostgreSQL v10. Change the SPI example to use version 1 convention, so that it actually works. Author: John Naylor Discussion:

pgsql: Remove remaining references to version-0 calling convention in d

2018-05-02 Thread Heikki Linnakangas
Remove remaining references to version-0 calling convention in docs. Support for version-0 calling convention was removed in PostgreSQL v10. Change the SPI example to use version 1 convention, so that it actually works. Author: John Naylor Discussion:

pgsql: Fix some sloppiness in the new BufFileSize() and BufFileAppend()

2018-05-02 Thread Heikki Linnakangas
Fix some sloppiness in the new BufFileSize() and BufFileAppend() functions. There were three related issues: * BufFileAppend() incorrectly reset the seek position on the 'source' file. As a result, if you had called BufFileRead() on the file before calling BufFileAppend(), it got confused,

pgsql: Remove support for tls-unique channel binding.

2018-08-05 Thread Heikki Linnakangas
Remove support for tls-unique channel binding. There are some problems with the tls-unique channel binding type. It's not supported by all SSL libraries, and strictly speaking it's not defined for TLS 1.3 at all, even though at least in OpenSSL, the functions used for it still seem to work with

pgsql: Remove support for tls-unique channel binding.

2018-08-05 Thread Heikki Linnakangas
Remove support for tls-unique channel binding. There are some problems with the tls-unique channel binding type. It's not supported by all SSL libraries, and strictly speaking it's not defined for TLS 1.3 at all, even though at least in OpenSSL, the functions used for it still seem to work with

pgsql: Remove now unused check for HAVE_X509_GET_SIGNATURE_NID in test.

2018-08-05 Thread Heikki Linnakangas
Remove now unused check for HAVE_X509_GET_SIGNATURE_NID in test. I removed the code that used this in the previous commit. Spotted by Michael Paquier. Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/a2441558a9744cfeb03b921e915ce59283ce Modified Files

pgsql: Spell "partitionwise" consistently.

2018-08-09 Thread Heikki Linnakangas
Spell "partitionwise" consistently. I'm not sure which spelling is better, "partitionwise" or "partition-wise", but everywhere else we spell it "partitionwise", so be consistent. Tatsuro Yamada reported the one in README, I found the other one with grep. Discussion:

pgsql: Spell "partitionwise" consistently.

2018-08-09 Thread Heikki Linnakangas
Spell "partitionwise" consistently. I'm not sure which spelling is better, "partitionwise" or "partition-wise", but everywhere else we spell it "partitionwise", so be consistent. Tatsuro Yamada reported the one in README, I found the other one with grep. Discussion:

pgsql: Don't run atexit callbacks in quickdie signal handlers.

2018-08-08 Thread Heikki Linnakangas
Don't run atexit callbacks in quickdie signal handlers. exit() is not async-signal safe. Even if the libc implementation is, 3rd party libraries might have installed unsafe atexit() callbacks. After receiving SIGQUIT, we really just want to exit as quickly as possible, so we don't really want to

pgsql: Don't run atexit callbacks in quickdie signal handlers.

2018-08-08 Thread Heikki Linnakangas
Don't run atexit callbacks in quickdie signal handlers. exit() is not async-signal safe. Even if the libc implementation is, 3rd party libraries might have installed unsafe atexit() callbacks. After receiving SIGQUIT, we really just want to exit as quickly as possible, so we don't really want to

pgsql: Don't run atexit callbacks in quickdie signal handlers.

2018-08-08 Thread Heikki Linnakangas
Don't run atexit callbacks in quickdie signal handlers. exit() is not async-signal safe. Even if the libc implementation is, 3rd party libraries might have installed unsafe atexit() callbacks. After receiving SIGQUIT, we really just want to exit as quickly as possible, so we don't really want to

pgsql: Don't run atexit callbacks in quickdie signal handlers.

2018-08-08 Thread Heikki Linnakangas
Don't run atexit callbacks in quickdie signal handlers. exit() is not async-signal safe. Even if the libc implementation is, 3rd party libraries might have installed unsafe atexit() callbacks. After receiving SIGQUIT, we really just want to exit as quickly as possible, so we don't really want to

pgsql: Don't run atexit callbacks in quickdie signal handlers.

2018-08-08 Thread Heikki Linnakangas
Don't run atexit callbacks in quickdie signal handlers. exit() is not async-signal safe. Even if the libc implementation is, 3rd party libraries might have installed unsafe atexit() callbacks. After receiving SIGQUIT, we really just want to exit as quickly as possible, so we don't really want to

pgsql: Don't run atexit callbacks in quickdie signal handlers.

2018-08-08 Thread Heikki Linnakangas
Don't run atexit callbacks in quickdie signal handlers. exit() is not async-signal safe. Even if the libc implementation is, 3rd party libraries might have installed unsafe atexit() callbacks. After receiving SIGQUIT, we really just want to exit as quickly as possible, so we don't really want to

pgsql: Don't run atexit callbacks in quickdie signal handlers.

2018-08-08 Thread Heikki Linnakangas
Don't run atexit callbacks in quickdie signal handlers. exit() is not async-signal safe. Even if the libc implementation is, 3rd party libraries might have installed unsafe atexit() callbacks. After receiving SIGQUIT, we really just want to exit as quickly as possible, so we don't really want to

Re: pgsql: Fix misc typos, mostly in comments.

2018-07-18 Thread Heikki Linnakangas
On 18/07/18 17:25, Alvaro Herrera wrote: I'm curious how you caught the "it's" -> "its" typos. Surely you didn't grep for "it's" ...? I did :-). I didn't read through all of them, though, just fixed a few that caught my eye at a quick glance. - Heikki

pgsql: Fix misc typos, mostly in comments.

2018-07-18 Thread Heikki Linnakangas
Fix misc typos, mostly in comments. A collection of typos I happened to spot while reading code, as well as grepping for common mistakes. Backpatch to all supported versions, as applicable, to avoid conflicts when backporting other commits in the future. Branch -- REL9_5_STABLE Details

pgsql: Fix misc typos, mostly in comments.

2018-07-18 Thread Heikki Linnakangas
Fix misc typos, mostly in comments. A collection of typos I happened to spot while reading code, as well as grepping for common mistakes. Backpatch to all supported versions, as applicable, to avoid conflicts when backporting other commits in the future. Branch -- master Details ---

pgsql: Fix misc typos, mostly in comments.

2018-07-18 Thread Heikki Linnakangas
Fix misc typos, mostly in comments. A collection of typos I happened to spot while reading code, as well as grepping for common mistakes. Backpatch to all supported versions, as applicable, to avoid conflicts when backporting other commits in the future. Branch -- REL9_3_STABLE Details

pgsql: Fix misc typos, mostly in comments.

2018-07-18 Thread Heikki Linnakangas
Fix misc typos, mostly in comments. A collection of typos I happened to spot while reading code, as well as grepping for common mistakes. Backpatch to all supported versions, as applicable, to avoid conflicts when backporting other commits in the future. Branch -- REL_10_STABLE Details

pgsql: Fix misc typos, mostly in comments.

2018-07-18 Thread Heikki Linnakangas
Fix misc typos, mostly in comments. A collection of typos I happened to spot while reading code, as well as grepping for common mistakes. Backpatch to all supported versions, as applicable, to avoid conflicts when backporting other commits in the future. Branch -- REL9_4_STABLE Details

pgsql: Fix misc typos, mostly in comments.

2018-07-18 Thread Heikki Linnakangas
Fix misc typos, mostly in comments. A collection of typos I happened to spot while reading code, as well as grepping for common mistakes. Backpatch to all supported versions, as applicable, to avoid conflicts when backporting other commits in the future. Branch -- REL_11_STABLE Details

pgsql: Fix misc typos, mostly in comments.

2018-07-18 Thread Heikki Linnakangas
Fix misc typos, mostly in comments. A collection of typos I happened to spot while reading code, as well as grepping for common mistakes. Backpatch to all supported versions, as applicable, to avoid conflicts when backporting other commits in the future. Branch -- REL9_6_STABLE Details

pgsql: Expand run-time partition pruning to work with MergeAppend

2018-07-19 Thread Heikki Linnakangas
Expand run-time partition pruning to work with MergeAppend This expands the support for the run-time partition pruning which was added for Append in 499be013de to also allow unneeded subnodes of a MergeAppend to be removed. Author: David Rowley Discussion:

pgsql: Rephrase a few comments for clarity.

2018-07-19 Thread Heikki Linnakangas
Rephrase a few comments for clarity. I was confused by what "intended to be parallel serially" meant, until Robert Haas and David G. Johnston explained it. Rephrase the comment to make it more clear, using David's suggested wording. Discussion:

pgsql: Rephrase a few comments for clarity.

2018-07-19 Thread Heikki Linnakangas
Rephrase a few comments for clarity. I was confused by what "intended to be parallel serially" meant, until Robert Haas and David G. Johnston explained it. Rephrase the comment to make it more clear, using David's suggested wording. Discussion:

pgsql: Rephrase a few comments for clarity.

2018-07-19 Thread Heikki Linnakangas
Rephrase a few comments for clarity. I was confused by what "intended to be parallel serially" meant, until Robert Haas and David G. Johnston explained it. Rephrase the comment to make it more clear, using David's suggested wording. Discussion:

pgsql: Fix comment.

2018-07-19 Thread Heikki Linnakangas
Fix comment. This comment was copy-pasted from nodeAppend.c to nodeMergeAppend.c, but while committing 5220bb7533, I modified wrong copy of it. Spotted by David Rowley Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/405cb356d6104eccf34acc2e4944d711b0961c7d

pgsql: Fix error message when a hostaddr cannot be parsed.

2018-07-19 Thread Heikki Linnakangas
Fix error message when a hostaddr cannot be parsed. We were incorrectly passing hostname, not hostaddr, in the error message, and because of that, you got: $ psql 'hostaddr=foo' psql: could not parse network address "(null)": Name or service not known Backpatch to v10, where this was broken (by

pgsql: Fix error message when a hostaddr cannot be parsed.

2018-07-19 Thread Heikki Linnakangas
Fix error message when a hostaddr cannot be parsed. We were incorrectly passing hostname, not hostaddr, in the error message, and because of that, you got: $ psql 'hostaddr=foo' psql: could not parse network address "(null)": Name or service not known Backpatch to v10, where this was broken (by

pgsql: Fix error message when a hostaddr cannot be parsed.

2018-07-19 Thread Heikki Linnakangas
Fix error message when a hostaddr cannot be parsed. We were incorrectly passing hostname, not hostaddr, in the error message, and because of that, you got: $ psql 'hostaddr=foo' psql: could not parse network address "(null)": Name or service not known Backpatch to v10, where this was broken (by

pgsql: Fix IndexInfo comments.

2018-08-30 Thread Heikki Linnakangas
Fix IndexInfo comments. Recently, ii_KeyAttrNumbers was renamed to ii_IndexAttrNumbers, and ii_Am field was added, but the comments were not updated. Author: Yugo Nagata Discussion: https://www.postgresql.org/message-id/20180830134831.e35a91b8b978b248c16c8...@sraoss.co.jp Branch -- master

pgsql: Fix IndexInfo comments.

2018-08-30 Thread Heikki Linnakangas
Fix IndexInfo comments. Recently, ii_KeyAttrNumbers was renamed to ii_IndexAttrNumbers, and ii_Am field was added, but the comments were not updated. Author: Yugo Nagata Discussion: https://www.postgresql.org/message-id/20180830134831.e35a91b8b978b248c16c8...@sraoss.co.jp Branch --

pgsql: Add test case for EEOP_INNER_SYSVAR/EEOP_OUTER_SYSVAR executor o

2018-07-10 Thread Heikki Linnakangas
Add test case for EEOP_INNER_SYSVAR/EEOP_OUTER_SYSVAR executor opcodes. The EEOP_INNER_SYSVAR and EEOP_OUTER_SYSVAR executor opcodes are not exercised by normal queries, because setrefs.c will resolve the references to system columns in the scan nodes already. Join nodes refer to them by their

pgsql: Improve performance of tuple conversion map generation

2018-07-13 Thread Heikki Linnakangas
Improve performance of tuple conversion map generation Previously convert_tuples_by_name_map naively performed a search of each outdesc column starting at the first column in indesc and searched each indesc column until a match was found. When partitioned tables had many columns this could

pgsql: Fix comment on B-tree insertion fastpath condition.

2018-04-10 Thread Heikki Linnakangas
Fix comment on B-tree insertion fastpath condition. The comment earlier in the function correctly states "and the insertion key is strictly greater than the first key in this page". That is what we check here, not "greater than or equal". Branch -- master Details ---

pgsql: Fix the new ARMv8 CRC code for short and unaligned input.

2018-04-04 Thread Heikki Linnakangas
Fix the new ARMv8 CRC code for short and unaligned input. The code before the main loop, to handle the possible 1-7 unaligned bytes at the beginning of the input, was broken, and read past the input, if the the input was very short. Branch -- master Details ---

pgsql: Make local copy of client hostnames in backend status array.

2018-04-11 Thread Heikki Linnakangas
Make local copy of client hostnames in backend status array. The other strings, application_name and query string, were snapshotted to local memory in pgstat_read_current_status(), but we forgot to do that for client hostnames. As a result, the client hostname would appear to change in the local

pgsql: Make local copy of client hostnames in backend status array.

2018-04-11 Thread Heikki Linnakangas
Make local copy of client hostnames in backend status array. The other strings, application_name and query string, were snapshotted to local memory in pgstat_read_current_status(), but we forgot to do that for client hostnames. As a result, the client hostname would appear to change in the local

pgsql: Make local copy of client hostnames in backend status array.

2018-04-11 Thread Heikki Linnakangas
Make local copy of client hostnames in backend status array. The other strings, application_name and query string, were snapshotted to local memory in pgstat_read_current_status(), but we forgot to do that for client hostnames. As a result, the client hostname would appear to change in the local

pgsql: Make local copy of client hostnames in backend status array.

2018-04-11 Thread Heikki Linnakangas
Make local copy of client hostnames in backend status array. The other strings, application_name and query string, were snapshotted to local memory in pgstat_read_current_status(), but we forgot to do that for client hostnames. As a result, the client hostname would appear to change in the local

pgsql: Make local copy of client hostnames in backend status array.

2018-04-11 Thread Heikki Linnakangas
Make local copy of client hostnames in backend status array. The other strings, application_name and query string, were snapshotted to local memory in pgstat_read_current_status(), but we forgot to do that for client hostnames. As a result, the client hostname would appear to change in the local

pgsql: Allocate enough shared string memory for stats of auxiliary proc

2018-04-11 Thread Heikki Linnakangas
Allocate enough shared string memory for stats of auxiliary processes. This fixes a bug whereby the st_appname, st_clienthostname, and st_activity_raw fields for auxiliary processes point beyond the end of their respective shared memory segments. As a result, the application_name of a backend

pgsql: Make local copy of client hostnames in backend status array.

2018-04-11 Thread Heikki Linnakangas
Make local copy of client hostnames in backend status array. The other strings, application_name and query string, were snapshotted to local memory in pgstat_read_current_status(), but we forgot to do that for client hostnames. As a result, the client hostname would appear to change in the local

pgsql: Allocate enough shared string memory for stats of auxiliary proc

2018-04-11 Thread Heikki Linnakangas
Allocate enough shared string memory for stats of auxiliary processes. This fixes a bug whereby the st_appname, st_clienthostname, and st_activity_raw fields for auxiliary processes point beyond the end of their respective shared memory segments. As a result, the application_name of a backend

pgsql: Fix typo in comment.

2018-04-09 Thread Heikki Linnakangas
Fix typo in comment. Author: Kyotaro Horiguchi Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/2c19ea863a27303f462485c4046a850864e638b8 Modified Files -- src/backend/rewrite/rewriteManip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Fix a few typos in comments and variable names.

2018-04-17 Thread Heikki Linnakangas
Fix a few typos in comments and variable names. Author: Michael Paquier Discussion: https://www.postgresql.org/message-id/20180411075223.GB19732%40paquier.xyz Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/55101549d538c9ed86e761dba0775025726d7310 Modified Files

pgsql: Improve docs for the new INCLUDE directive in CREATE/ALTER TABLE

2018-04-18 Thread Heikki Linnakangas
Improve docs for the new INCLUDE directive in CREATE/ALTER TABLE. Author: Michael Paquier Discussion: https://www.postgresql.org/message-id/20180411082020.GD19732%40paquier.xyz Branch -- master Details ---

pgsql: Make PGJIT_* macros safer.

2018-04-23 Thread Heikki Linnakangas
Make PGJIT_* macros safer. Author: David Rowley Discussion: https://www.postgresql.org/message-id/cakjs1f8ge2y0sds6rqejfh-vjb-bwhs86rcx4fp4fz+tmxt...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/6a7b2ce2bdb9ab5fd23c98ace4bb2d811231706a Modified

pgsql: Fix confusion on the padding of GIDs in on commit and abort reco

2018-04-17 Thread Heikki Linnakangas
Fix confusion on the padding of GIDs in on commit and abort records. Review of commit 1eb6d652: It's pointless to add padding to the GID fields, when the code that follows assumes that there is no alignment, and uses memcpy(). Remove the pointless padding. Update comments to note the new fields

pgsql: Also fix the descriptions in pg_config.h.win32.

2018-04-04 Thread Heikki Linnakangas
Also fix the descriptions in pg_config.h.win32. I missed pg_config.h.win32 in the previous commit that fixed these in pg_config.h.in. Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/0d2012c9f04afe375200d16d539a9ec5c0093c07 Modified Files --

pgsql: Also fix the descriptions in pg_config.h.win32.

2018-04-04 Thread Heikki Linnakangas
Also fix the descriptions in pg_config.h.win32. I missed pg_config.h.win32 in the previous commit that fixed these in pg_config.h.in. Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/8ed5249afff499d79bb9414a0340c495fccf53b1 Modified Files --

pgsql: Also fix the descriptions in pg_config.h.win32.

2018-04-04 Thread Heikki Linnakangas
Also fix the descriptions in pg_config.h.win32. I missed pg_config.h.win32 in the previous commit that fixed these in pg_config.h.in. Branch -- REL9_5_STABLE Details --- https://git.postgresql.org/pg/commitdiff/0b650285269d6055d0f1c8b10e96a49b118a6d0d Modified Files --

pgsql: Also fix the descriptions in pg_config.h.win32.

2018-04-04 Thread Heikki Linnakangas
Also fix the descriptions in pg_config.h.win32. I missed pg_config.h.win32 in the previous commit that fixed these in pg_config.h.in. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/638a199fa9459dac42b588ccfcf7003539f37416 Modified Files --

pgsql: Use ARMv8 CRC instructions where available.

2018-04-04 Thread Heikki Linnakangas
Use ARMv8 CRC instructions where available. ARMv8 introduced special CPU instructions for calculating CRC-32C. Use them, when available, for speed. Like with the similar Intel CRC instructions, several factors affect whether the instructions can be used. The compiler intrinsics for them must be

pgsql: Fix incorrect description of USE_SLICING_BY_8_CRC32C.

2018-04-04 Thread Heikki Linnakangas
Fix incorrect description of USE_SLICING_BY_8_CRC32C. And a typo in the description of USE_SSE42_CRC32C_WITH_RUNTIME_CHECK, spotted by Daniel Gustafsson. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/8989f52b1b0636969545e6c8f6c813bc563ebcf5 Modified Files

pgsql: Fix incorrect description of USE_SLICING_BY_8_CRC32C.

2018-04-04 Thread Heikki Linnakangas
Fix incorrect description of USE_SLICING_BY_8_CRC32C. And a typo in the description of USE_SSE42_CRC32C_WITH_RUNTIME_CHECK, spotted by Daniel Gustafsson. Branch -- REL9_5_STABLE Details --- https://git.postgresql.org/pg/commitdiff/127f489c2c7e9ff0e6cd5f990dab497ea3cf7e87 Modified Files

pgsql: Fix incorrect description of USE_SLICING_BY_8_CRC32C.

2018-04-04 Thread Heikki Linnakangas
Fix incorrect description of USE_SLICING_BY_8_CRC32C. And a typo in the description of USE_SSE42_CRC32C_WITH_RUNTIME_CHECK, spotted by Daniel Gustafsson. Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/a3c64ed6ce0da2d18e56179cac8bd752cf79f4b7 Modified Files

pgsql: Fix misc typos in comments.

2019-01-23 Thread Heikki Linnakangas
Fix misc typos in comments. Spotted mostly by Fabien Coelho. Discussion: https://www.postgresql.org/message-id/alpine.DEB.2.21.1901230947050.16643@lancre Branch -- REL9_4_STABLE Details --- https://git.postgresql.org/pg/commitdiff/e46a475718680db3afa7fd343a2a75ae3e5d0d8e Modified

pgsql: Fix misc typos in comments.

2019-01-23 Thread Heikki Linnakangas
Fix misc typos in comments. Spotted mostly by Fabien Coelho. Discussion: https://www.postgresql.org/message-id/alpine.DEB.2.21.1901230947050.16643@lancre Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/0359d832128485840bd7dcf0b09646ad752f6a72 Modified

pgsql: Fix misc typos in comments.

2019-01-23 Thread Heikki Linnakangas
Fix misc typos in comments. Spotted mostly by Fabien Coelho. Discussion: https://www.postgresql.org/message-id/alpine.DEB.2.21.1901230947050.16643@lancre Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/2146718b3cf99f32cc0b09d9b7c0a14463f25fd4 Modified

pgsql: Fix misc typos in comments.

2019-01-23 Thread Heikki Linnakangas
Fix misc typos in comments. Spotted mostly by Fabien Coelho. Discussion: https://www.postgresql.org/message-id/alpine.DEB.2.21.1901230947050.16643@lancre Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/95931133a959404cf7320b49058b2f1c2e4606b9 Modified Files

pgsql: Fix misc typos in comments.

2019-01-23 Thread Heikki Linnakangas
Fix misc typos in comments. Spotted mostly by Fabien Coelho. Discussion: https://www.postgresql.org/message-id/alpine.DEB.2.21.1901230947050.16643@lancre Branch -- REL9_5_STABLE Details --- https://git.postgresql.org/pg/commitdiff/a5e48d1ed42940e64a5f862e319fd4ff8329edb8 Modified

pgsql: Fix misc typos in comments.

2019-01-23 Thread Heikki Linnakangas
Fix misc typos in comments. Spotted mostly by Fabien Coelho. Discussion: https://www.postgresql.org/message-id/alpine.DEB.2.21.1901230947050.16643@lancre Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/6bf9f4e6e38b0b8d6f4ba26da473d6d5bb7fa49d Modified

pgsql: Detach postmaster process from pg_ctl's session at server startu

2019-01-14 Thread Heikki Linnakangas
Detach postmaster process from pg_ctl's session at server startup. pg_ctl is supposed to daemonize the postmaster process, so that it's not affected by signals to the launching process group. Before this patch, if you had a shell script that used "pg_ctl start", and you interrupted the shell

pgsql: Clean up the Simple-8b encoder code.

2019-03-25 Thread Heikki Linnakangas
Clean up the Simple-8b encoder code. Coverity complained that simple8b_encode() might read beyond the end of the 'diffs' array, in the loop to encode the integers. That was a false positive, because we never get into the loop in modes 0 or 1, and the array is large enough for all the other modes.

pgsql: Refactor code to print pgbench progress reports.

2019-03-25 Thread Heikki Linnakangas
Refactor code to print pgbench progress reports. threadRun() function is very long and deeply-nested. Extract the code to print progress reports to a separate function, to make it slightly easier to read. Author: Fabien Coelho Discussion:

Re: pgsql: Further code review for new integerset code.

2019-03-25 Thread Heikki Linnakangas
On 25/03/2019 18:23, Tom Lane wrote: Further code review for new integerset code. Thanks! Wow, that was an embarrassing number of typos. - Heikki

pgsql: Generate less WAL during GiST, GIN and SP-GiST index build.

2019-04-03 Thread Heikki Linnakangas
special values in the future. Author: Anastasia Lubennikova, Andrey V. Lepikhov Reviewed-by: Heikki Linnakangas, Dmitry Dolgov Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/9155580fd5fc2a0cbb23376dfca7cd21f59c2c7b Modified Files -- src/backend/access

pgsql: Scan GiST indexes in physical order during VACUUM.

2019-03-05 Thread Heikki Linnakangas
Scan GiST indexes in physical order during VACUUM. Scanning an index in physical order is faster than walking it in logical order, because sequential I/O is faster than random I/O. The idea and code structure is borrowed from B-tree vacuum code. Patch by Andrey Borodin, with changes by me. Based

pgsql: Fix bug in the GiST vacuum's 2nd stage.

2019-03-22 Thread Heikki Linnakangas
Fix bug in the GiST vacuum's 2nd stage. We mustn't assume that the IndexVacuumInfo pointer passed to bulkdelete() stage is still valid in the vacuumcleanup() stage. Per very pink buildfarm. Branch -- master Details ---

pgsql: More portability fixes for integerset tests.

2019-03-22 Thread Heikki Linnakangas
More portability fixes for integerset tests. Use UINT64CONST for large constants. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c477c68c8f660550219c69fac2ab41beb86d7f45 Modified Files -- src/test/modules/test_integerset/test_integerset.c | 24

pgsql: Delete empty pages during GiST VACUUM.

2019-03-22 Thread Heikki Linnakangas
Delete empty pages during GiST VACUUM. To do this, we scan GiST two times. In the first pass we make note of empty leaf pages and internal pages. At second pass we scan through internal pages, looking for downlinks to the empty pages. Deleting internal pages is still not supported, like in

pgsql: Add IntegerSet, to hold large sets of 64-bit ints efficiently.

2019-03-22 Thread Heikki Linnakangas
/test/modules/test_integerset. It can be used to verify correctness, as a regression test, but if you run it manully, it can also print memory usage and execution time of some of the tests. Author: Heikki Linnakangas, Andrey Borodin Reviewed-by: Julien Rouhaud Discussion: https://www.postgresql.org

pgsql: Make the integerset test more verbose.

2019-03-22 Thread Heikki Linnakangas
Make the integerset test more verbose. Buildfarm member 'woodlouse' failed one of the tests, and I'm not sure which test failed. Better to print the names of the tests, so that it will appear in the regression.diffs on failure. Branch -- master Details ---

pgsql: Make printf format strings in test_integerset portable.

2019-03-22 Thread Heikki Linnakangas
Make printf format strings in test_integerset portable. Use UINT64_FORMAT for printing uint64s. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/32f8ddf7e1c8b24382f98c14f6b588cd7e17418c Modified Files --

pgsql: Fix yet more portability bugs in integerset and its tests.

2019-03-22 Thread Heikki Linnakangas
Fix yet more portability bugs in integerset and its tests. There were more large constants that needed UINT64CONST. And one variable was declared as "int", when it needed to be uint64. These bugs were only visible on 32-bit systems; clearly I should've tested on one, given that this code does a

pgsql: Use single-byte Boyer-Moore-Horspool search even with multibyte

2019-01-25 Thread Heikki Linnakangas
Use single-byte Boyer-Moore-Horspool search even with multibyte encodings. The old implementation first converted the input strings to arrays of wchars, and performed the conversion on those. However, the conversion is expensive, and for a large input string, consumes a lot of memory. Allocating

pgsql: Fix comments that claimed that mblen() only looks at first byte.

2019-01-25 Thread Heikki Linnakangas
Fix comments that claimed that mblen() only looks at first byte. GB18030's mblen() function looks at the first and the second byte of the multibyte character, to determine its length. copy.c had made the assumption that mblen() only looks at the first byte, but it turns out to work out fine,

pgsql: Fix example in comment.

2019-04-08 Thread Heikki Linnakangas
Fix example in comment. Author: Adrien Nayrat Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/16954e22e2a881a4a5ead82f364635bfa63cc9df Modified Files -- src/backend/lib/integerset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Fix copy-pasto in freeing memory on error in vacuumlo.

2019-06-07 Thread Heikki Linnakangas
Fix copy-pasto in freeing memory on error in vacuumlo. It's harmless to call PQfreemem() with a NULL argument, so the only consequence was that if allocating 'schema' failed, but allocating 'table' or 'field' succeeded, we would leak a bit of memory. That's highly unlikely to happen, so this is

pgsql: Fix copy-pasto in freeing memory on error in vacuumlo.

2019-06-07 Thread Heikki Linnakangas
Fix copy-pasto in freeing memory on error in vacuumlo. It's harmless to call PQfreemem() with a NULL argument, so the only consequence was that if allocating 'schema' failed, but allocating 'table' or 'field' succeeded, we would leak a bit of memory. That's highly unlikely to happen, so this is

pgsql: Fix copy-pasto in freeing memory on error in vacuumlo.

2019-06-07 Thread Heikki Linnakangas
Fix copy-pasto in freeing memory on error in vacuumlo. It's harmless to call PQfreemem() with a NULL argument, so the only consequence was that if allocating 'schema' failed, but allocating 'table' or 'field' succeeded, we would leak a bit of memory. That's highly unlikely to happen, so this is

pgsql: Fix copy-pasto in freeing memory on error in vacuumlo.

2019-06-07 Thread Heikki Linnakangas
Fix copy-pasto in freeing memory on error in vacuumlo. It's harmless to call PQfreemem() with a NULL argument, so the only consequence was that if allocating 'schema' failed, but allocating 'table' or 'field' succeeded, we would leak a bit of memory. That's highly unlikely to happen, so this is

pgsql: Fix copy-pasto in freeing memory on error in vacuumlo.

2019-06-07 Thread Heikki Linnakangas
Fix copy-pasto in freeing memory on error in vacuumlo. It's harmless to call PQfreemem() with a NULL argument, so the only consequence was that if allocating 'schema' failed, but allocating 'table' or 'field' succeeded, we would leak a bit of memory. That's highly unlikely to happen, so this is

pgsql: Fix confusion on different kinds of slots in IndexOnlyScans.

2019-06-06 Thread Heikki Linnakangas
Fix confusion on different kinds of slots in IndexOnlyScans. We used the same slot to store a tuple from the index, and to store a tuple from the table. That's not OK. It worked with the heap, because heapam_getnextslot() stores a HeapTuple to the slot, and doesn't care how large the

pgsql: Fix comment on when HOT update is possible.

2019-05-14 Thread Heikki Linnakangas
Fix comment on when HOT update is possible. The conditions listed in this comment have changed several times, and at some point the thing that the "if so" referred to was negated. The text was OK up to 9.6. It was differently wrong in v10, v11 and master, so fix in all those versions. Branch

pgsql: Fix comment on when HOT update is possible.

2019-05-14 Thread Heikki Linnakangas
Fix comment on when HOT update is possible. The conditions listed in this comment have changed several times, and at some point the thing that the "if so" referred to was negated. The text was OK up to 9.6. It was differently wrong in v10, v11 and master, so fix in all those versions. Branch

  1   2   3   4   5   6   7   >