{"push_id":1328989652,"size":21,"distinct_size":21,"ref":"refs/heads/master","head":"e94568ecc10f2638e542ae34f2990b821bbf90ac","before":"728a3e73e96173bb0b0b2afc0da061991f9e3d5d","commits":[{"sha":"8e91e12bc3af85ba2287866669268f6825d2cc03","author":{"name":"Tom Lane","email":"9ca635a44fdf5aa326758d8d245579b9ae84653c@sss.pgh.pa.us"},"message":"Allow contrib/file_fdw to read from a program, like COPY FROM PROGRAM.\n\nThis patch just exposes COPY's FROM PROGRAM option in contrib/file_fdw.\nThere don't seem to be any security issues with that that are any worse\nthan what already exist with file_fdw and COPY; as in the existing cases,\nonly superusers are allowed to control what gets executed.\n\nA regression test case might be nice here, but choosing a 100% portable\ncommand to run is hard.  (We haven't got a test for COPY FROM PROGRAM\nitself, either.)\n\nCorey Huinker and Adam Gomaa, reviewed by Amit Langote\n\nDiscussion: <CADkLM=dGDGmaEiZ=UDepzumWg-CVn7r8MHPjr2NArj8S3TsROQ@mail.gmail.com>","distinct":true,"url":"https://api.github.com/repos/jesperpedersen/postgres/commits/8e91e12bc3af85ba2287866669268f6825d2cc03"},{"sha":"f2af8dc5ba8801c126d877a52076d441cac78646","author":{"name":"Peter Eisentraut","email":"2f47089682e4afbd5de3eea4edffc95dfc1eb9de@gmx.net"},"message":"Fix compiler warnings\n\nThis was missed in bf5bb2e85b6492c7245b9446efaf43d52a98db13, because the\ncode is only visible under PG_FLUSH_DATA_WORKS.","distinct":true,"url":"https://api.github.com/repos/jesperpedersen/postgres/commits/f2af8dc5ba8801c126d877a52076d441cac78646"},{"sha":"fd321a1dfd64d30bf1652ea6b39b654304f68ae4","author":{"name":"Stephen Frost","email":"2063edcf0aa2fa8dfb7bba729d6cffa6fed14981@snowman.net"},"message":"Remove superuser checks in pgstattuple\n\nNow that we track initial privileges on extension objects and changes to\nthose permissions, we can drop the superuser() checks from the various\nfunctions which are part of the pgstattuple extension and rely on the\nGRANT system to control access to those functions.\n\nSince a pg_upgrade will preserve the version of the extension which\nexisted prior to the upgrade, we can't simply modify the existing\nfunctions but instead need to create new functions which remove the\nchecks and update the SQL-level functions to use the new functions\n(and to REVOKE EXECUTE rights on those functions from PUBLIC).\n\nThanks to Tom and Andres for adding support for extensions to follow\nupdate paths (see: 40b449a), allowing this patch to be much smaller\nsince no new base version script needed to be included.\n\nApproach suggested by Noah.\n\nReviewed by Michael Paquier.","distinct":true,"url":"https://api.github.com/repos/jesperpedersen/postgres/commits/fd321a1dfd64d30bf1652ea6b39b654304f68ae4"},{"sha":"3d39244e6e7374febff59eba338f7a82f696a618","author":{"name":"Magnus Hagander","email":"96ad6b06de7111eee5a9c968ba6978bf7a7a179d@hagander.net"},"message":"Retry opening new segments in pg_xlogdump --folllow\n\nThere is a small window between when the server closes out the existing\nsegment and the new one is created. Put a loop around the open call in\nthis case to make sure we wait for the new file to actually appear.","distinct":true,"url":"https://api.github.com/repos/jesperpedersen/postgres/commits/3d39244e6e7374febff59eba338f7a82f696a618"},{"sha":"f1a469c9f1cfeab9f9c7d4a5d3e75892e7b6f60c","author":{"name":"Peter Eisentraut","email":"2f47089682e4afbd5de3eea4edffc95dfc1eb9de@gmx.net"},"message":"Fix use of offsetof()\n\nUsing offsetof() with a run-time computed argument is not allowed in\neither C or C++.  Apparently, gcc allows it, but g++ doesn't.\n\nReviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>\nReviewed-by: Thomas Munro <thomas.munro@enterprisedb.com>","distinct":true,"url":"https://api.github.com/repos/jesperpedersen/postgres/commits/f1a469c9f1cfeab9f9c7d4a5d3e75892e7b6f60c"},{"sha":"1c0cf52b39ca3a9a79661129cff918dc000a55eb","author":{"name":"Peter Eisentraut","email":"2f47089682e4afbd5de3eea4edffc95dfc1eb9de@gmx.net"},"message":"Use return instead of exit() in configure\n\nUsing exit() requires stdlib.h, which is not included.  Use return\ninstead.  Also add return type for main().\n\nReviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>\nReviewed-by: Thomas Munro <thomas.munro@enterprisedb.com>","distinct":true,"url":"https://api.github.com/repos/jesperpedersen/postgres/commits/1c0cf52b39ca3a9a79661129cff918dc000a55eb"},{"sha":"a5da81359dbddfee49ea7800b43d99c204b4d31f","author":{"name":"Peter Eisentraut","email":"2f47089682e4afbd5de3eea4edffc95dfc1eb9de@gmx.net"},"message":"Add missing include files to configure tests\n\natoi() needs stdlib.h\nstrcmp() needs string.h\n\nReviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>\nReviewed-by: Thomas Munro <thomas.munro@enterprisedb.com>","distinct":true,"url":"https://api.github.com/repos/jesperpedersen/postgres/commits/a5da81359dbddfee49ea7800b43d99c204b4d31f"},{"sha":"0665023b4435a469e42289d7065c436967a022b6","author":{"name":"Peter Eisentraut","email":"2f47089682e4afbd5de3eea4edffc95dfc1eb9de@gmx.net"},"message":"Remove unnecessary prototypes\n\nPrototypes for functions implementing V1-callable functions are no\nlonger necessary.\n\nReviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>\nReviewed-by: Thomas Munro <thomas.munro@enterprisedb.com>","distinct":true,"url":"https://api.github.com/repos/jesperpedersen/postgres/commits/0665023b4435a469e42289d7065c436967a022b6"},{"sha":"330b48b94b53bcbbc490f952d6798d5ab637721a","author":{"name":"Peter Eisentraut","email":"2f47089682e4afbd5de3eea4edffc95dfc1eb9de@gmx.net"},"message":"Separate enum from struct\n\nOtherwise the enum symbols are not visible outside the struct in C++.\n\nReviewed-by: Thomas Munro <thomas.munro@enterprisedb.com>","distinct":true,"url":"https://api.github.com/repos/jesperpedersen/postgres/commits/330b48b94b53bcbbc490f952d6798d5ab637721a"},{"sha":"cd03890d0b5d9cbcfca169195d71f1693f84cafa","author":{"name":"Peter Eisentraut","email":"2f47089682e4afbd5de3eea4edffc95dfc1eb9de@gmx.net"},"message":"Fix breakage in previous change","distinct":true,"url":"https://api.github.com/repos/jesperpedersen/postgres/commits/cd03890d0b5d9cbcfca169195d71f1693f84cafa"},{"sha":"5afcd2aa740f87fa6cec7c6693a4891b9df2b67d","author":{"name":"Tom Lane","email":"9ca635a44fdf5aa326758d8d245579b9ae84653c@sss.pgh.pa.us"},"message":"Fix multiple portability issues in pg_upgrade's rewriteVisibilityMap().\n\nThis is new code in 9.6, and evidently we missed out testing it as\nthoroughly as it should have been.  Bugs fixed here:\n\n1. Use binary not text mode to open the files on Windows.  Before, if\nthe visibility map chanced to contain two bytes that looked like \\r\\n,\nWindows' read() would convert that to \\n, which both corrupts the map\ndata and causes the file to look shorter than it should.  Unless you\nwere *very* unlucky and had an exact multiple of 8K such occurrences\nin each VM file, this would cause pg_upgrade to report a failure,\nthough with a rather obscure error message.\n\n2. The code for copying rebuilt bytes into the output was simply wrong.\nIt chanced to work okay on little-endian machines but would emit the\nbytes in the wrong order on big-endian, leading to silent corruption\nof the visibility map data.\n\n3. The code was careless about alignment of the working buffers.  Given\nall three of an alignment-picky architecture, a compiler that chooses\nto put the new_vmbuf[] local variable at an odd starting address, and\na checksum-enabled database, pg_upgrade would dump core.\n\nPoint one was reported by Thomas Kellerer, the other two detected by\ncode-reading.\n\nPoint two is much the nastiest of these issues from an impact standpoint,\nthough fortunately it affects only a minority of users.  The Windows issue\nwill definitely bite people, but it seems quite unlikely that there would\nbe undetected corruption from that.\n\nIn addition, I failed to resist the temptation to do some minor cosmetic\nadjustments, mostly improving the comments.\n\nIt would be a good idea to try to improve the error reporting here, but\nthat seems like material for a separate patch.\n\nDiscussion: <nsjrbh$8li$1@blaine.gmane.org>","distinct":true,"url":"https://api.github.com/repos/jesperpedersen/postgres/commits/5afcd2aa740f87fa6cec7c6693a4891b9df2b67d"},{"sha":"f002ed2b8e45286fe73a36e119cba2016ea0de19","author":{"name":"Tom Lane","email":"9ca635a44fdf5aa326758d8d245579b9ae84653c@sss.pgh.pa.us"},"message":"Improve error reporting in pg_upgrade's file copying/linking/rewriting.\n\nThe previous design for this had copyFile(), linkFile(), and\nrewriteVisibilityMap() returning strerror strings, with the caller\nproducing one-size-fits-all error messages based on that.  This made it\nimpossible to produce messages that described the failures with any degree\nof precision, especially not short-read problems since those don't set\nerrno at all.\n\nSince pg_upgrade has no intention of continuing after any error in this\narea, let's fix this by just letting these functions call pg_fatal() for\nthemselves, making it easy for each point of failure to have a suitable\nerror message.  Taking this approach also allows dropping cleanup code\nthat was unnecessary and was often rather sloppy about preserving errno.\nTo not lose relevant info that was reported before, pass in the schema name\nand table name of the current table so that they can be included in the\nerror reports.\n\nAn additional problem was the use of getErrorText(), which was flat out\nwrong for all but a couple of call sites, because it unconditionally did\n\"_dosmaperr(GetLastError())\" on Windows.  That's only appropriate when\nreporting an error from a Windows-native API, which only a couple of\nthe callers were actually doing.  Thus, even the reported strerror string\nwould be unrelated to the actual failure in many cases on Windows.\nTo fix, get rid of getErrorText() altogether, and just have call sites\ndo strerror(errno) instead, since that's the way all the rest of our\nfrontend programs do it.  Add back the _dosmaperr() calls in the two\nplaces where that's actually appropriate.\n\nIn passing, make assorted messages hew more closely to project style\nguidelines, notably by removing initial capitals in not-complete-sentence\nprimary error messages.  (I didn't make any effort to clean up places\nI didn't have another reason to touch, though.)\n\nPer discussion of a report from Thomas Kellerer.  Back-patch to 9.6,\nbut no further; given the relative infrequency of reports of problems\nhere, it's not clear it's worth adapting the patch to older branches.\n\nPatch by me, but with credit to Alvaro Herrera for spotting the issue\nwith getErrorText's misuse of _dosmaperr().\n\nDiscussion: <nsjrbh$8li$1@blaine.gmane.org>","distinct":true,"url":"https://api.github.com/repos/jesperpedersen/postgres/commits/f002ed2b8e45286fe73a36e119cba2016ea0de19"},{"sha":"a4327296df7366ecc657b706a9b5e87aa921311a","author":{"name":"Peter Eisentraut","email":"2f47089682e4afbd5de3eea4edffc95dfc1eb9de@gmx.net"},"message":"Set log_line_prefix and application name in test drivers\n\nBefore pg_regress runs psql, set the application name to the test name.\nSimilarly, set the application name to the test file name in the TAP\ntests.  Also, set a default log_line_prefix that show the application\nname, as well as the PID and a time stamp.\n\nThat way, the server log output can be correlated to the test input\nfiles, making debugging a bit easier.","distinct":true,"url":"https://api.github.com/repos/jesperpedersen/postgres/commits/a4327296df7366ecc657b706a9b5e87aa921311a"},{"sha":"7107d58ec5a3c45967e77525809612a5f89b97f3","author":{"name":"Tom Lane","email":"9ca635a44fdf5aa326758d8d245579b9ae84653c@sss.pgh.pa.us"},"message":"Fix misplacement of submake-generated-headers prerequisites.\n\nThe sequence \"configure; cd src/pl/plpython; make -j\" failed due to\ntrying to compile plpython's .o files before the generated headers\nfinished building.  (This is an important real-world case, since it's\nthe typical second step when building both plpython2 and plpython3.)\nThis happens because the submake-generated-headers target is not\nplaced in a way to make it a prerequisite to compiling the .o files.\nFix that.\n\nChecking other uses of submake-generated-headers, I noted that the one\nattached to pg_regress was similarly misplaced; but it's actually not\nneeded at all for pg_regress.o, rather regress.o, so move it to be a\nprerequisite of that.\n\nBack-patch to 9.6 where submake-generated-headers was introduced\n(by commit 548af97fc).  It's not immediately clear to me why the\nprevious coding didn't have the same issue; but since we've not\nhad field reports of plpython make failing, leave it alone in the\nolder branches.\n\nPavel Raiskup and Tom Lane\n\nDiscussion: <1925924.izSMJEZO3x@unused-4-107.brq.redhat.com>","distinct":true,"url":"https://api.github.com/repos/jesperpedersen/postgres/commits/7107d58ec5a3c45967e77525809612a5f89b97f3"},{"sha":"ea046f08d1bcee56c3bedfa16a05c38a0515b41d","author":{"name":"Tom Lane","email":"9ca635a44fdf5aa326758d8d245579b9ae84653c@sss.pgh.pa.us"},"message":"Fix misstatement in comment in Makefile.shlib.\n\nThere is no need for \"all: all-lib\" to be placed before inclusion of\nMakefile.shlib.  Makefile.global is what ensures that \"all\" is the\ndefault target, and we already document that that has to be included\nfirst.  Per comment from Pavel Raiskup.\n\nDiscussion: <1925924.izSMJEZO3x@unused-4-107.brq.redhat.com>","distinct":true,"url":"https://api.github.com/repos/jesperpedersen/postgres/commits/ea046f08d1bcee56c3bedfa16a05c38a0515b41d"},{"sha":"33596edf09516a7cab65914e16cfd6adf9fc55d1","author":{"name":"Tom Lane","email":"9ca635a44fdf5aa326758d8d245579b9ae84653c@sss.pgh.pa.us"},"message":"Copy-editing for contrib/pg_visibility documentation.\n\nAdd omitted names for some function parameters.\nFix some minor grammatical issues.","distinct":true,"url":"https://api.github.com/repos/jesperpedersen/postgres/commits/33596edf09516a7cab65914e16cfd6adf9fc55d1"},{"sha":"9a109452da1b923e183f20fcf5516984d448ece9","author":{"name":"Tom Lane","email":"9ca635a44fdf5aa326758d8d245579b9ae84653c@sss.pgh.pa.us"},"message":"Fix bugs in contrib/pg_visibility.\n\ncollect_corrupt_items() failed to initialize tuple.t_self.  While\nHeapTupleSatisfiesVacuum() doesn't actually use that value, it does\nAssert that it's valid, so that the code would dump core if ip_posid\nchanced to be zero.  (That's somewhat unlikely, which probably explains\nhow this got missed.  In any case it wouldn't matter for field use.)\n\nAlso, collect_corrupt_items was returning the wrong TIDs, that is the\ncontents of t_ctid rather than the tuple's own location.  This would\nbe the same thing in simple cases, but it could be wrong if, for\nexample, a past update attempt had been rolled back, leaving a live\ntuple whose t_ctid doesn't point at itself.\n\nAlso, in pg_visibility(), guard against trying to read a page past\nthe end of the rel.  The VM code handles inquiries beyond the end\nof the map by silently returning zeroes, and it seems like we should\ndo the same thing here.\n\nI ran into the assertion failure while using pg_visibility to check\npg_upgrade's behavior, and then noted the other problems while\nreading the code.\n\nReport: <29043.1475288648@sss.pgh.pa.us>","distinct":true,"url":"https://api.github.com/repos/jesperpedersen/postgres/commits/9a109452da1b923e183f20fcf5516984d448ece9"},{"sha":"3b90e38c5d592ea8ec8236287dd5c749fc041728","author":{"name":"Tom Lane","email":"9ca635a44fdf5aa326758d8d245579b9ae84653c@sss.pgh.pa.us"},"message":"Do ClosePostmasterPorts() earlier in SubPostmasterMain().\n\nIn standard Unix builds, postmaster child processes do ClosePostmasterPorts\nimmediately after InitPostmasterChild, that is almost immediately after\nbeing spawned.  This is important because we don't want children holding\nopen the postmaster's end of the postmaster death watch pipe.\n\nHowever, in EXEC_BACKEND builds, SubPostmasterMain was postponing this\nresponsibility significantly, in order to make it slightly more convenient\nto pass the right flag value to ClosePostmasterPorts.  This is bad,\nparticularly seeing that process_shared_preload_libraries() might invoke\nnearly-arbitrary code.  Rearrange so that we do it as soon as we've\nfetched the socket FDs via read_backend_variables().\n\nAlso move the comment explaining about randomize_va_space to before the\ncall of PGSharedMemoryReAttach, which is where it's relevant.  The old\nplacement was appropriate when the reattach happened inside\nCreateSharedMemoryAndSemaphores, but that was a long time ago.\n\nBack-patch to 9.3; the patch doesn't apply cleanly before that, and\nit doesn't seem worth a lot of effort given that we've had no actual\nfield complaints traceable to this.\n\nDiscussion: <4157.1475178360@sss.pgh.pa.us>","distinct":true,"url":"https://api.github.com/repos/jesperpedersen/postgres/commits/3b90e38c5d592ea8ec8236287dd5c749fc041728"},{"sha":"728ceba938dfadb204a4854bb76ae3b11b635401","author":{"name":"Tom Lane","email":"9ca635a44fdf5aa326758d8d245579b9ae84653c@sss.pgh.pa.us"},"message":"Avoid leaking FDs after an fsync failure.\n\nFixes errors introduced in commit bc34223bc, as detected by Coverity.\n\nIn passing, report ENOSPC for a short write while padding a new wal file in\nopen_walfile, make certain that close_walfile closes walfile in all cases,\nand improve a couple of comments.\n\nMichael Paquier and Tom Lane","distinct":true,"url":"https://api.github.com/repos/jesperpedersen/postgres/commits/728ceba938dfadb204a4854bb76ae3b11b635401"},{"sha":"e8bdee2770ff52aab208bc6f8965a4a01979d0aa","author":{"name":"Tom Lane","email":"9ca635a44fdf5aa326758d8d245579b9ae84653c@sss.pgh.pa.us"},"message":"Add ALTER EXTENSION ADD/DROP ACCESS METHOD, and use it in pg_upgrade.\n\nWithout this, an extension containing an access method is not properly\ndumped/restored during pg_upgrade --- the AM ends up not being a member\nof the extension after upgrading.\n\nAnother oversight in commit 473b93287, reported by Andrew Dunstan.\n\nReport: <f7ac29f3-515c-2a44-21c5-ec925053265f@dunslane.net>","distinct":true,"url":"https://api.github.com/repos/jesperpedersen/postgres/commits/e8bdee2770ff52aab208bc6f8965a4a01979d0aa"}]}
{"actor":{"display_login":"jesperpedersen"}}