{"push_id":595159662,"size":41,"distinct_size":1,"ref":"refs/heads/create_schema_during_pg_restore_schema_only","head":"75aead042861e066633a7bc28fcf06cec7e91a2d","before":"47249637a98beafc5d0bc699fbf14711f8e42304","commits":[{"sha":"3f190f67eb45ae61d696fbce8ab48d246a12f709","author":{"email":"3c84f0de6f8a0f296d36cdd9f57fa166641c96b1@alvh.no-ip.org","name":"Alvaro Herrera"},"message":"Fix table_rewrite event trigger for ALTER TYPE/SET DATA TYPE CASCADE\n\nWhen a composite type being used in a typed table is modified by way\nof ALTER TYPE, a table rewrite occurs appearing to come from ALTER TYPE.\nThe existing event_trigger.c code was unable to cope with that\nand raised a spurious error.  The fix is just to accept that command\ntag for the event, and document this properly.\n\nNoted while fooling with deparsing of DDL commands.  This appears to be\nan oversight in commit 618c9430a.\n\nThanks to Mark Wong for documentation wording help.","distinct":false,"url":"https://api.github.com/repos/fabriziomello/postgres/commits/3f190f67eb45ae61d696fbce8ab48d246a12f709"},{"sha":"654809e770ce270c0bb9de726c5df1ab193d60f0","author":{"email":"3c84f0de6f8a0f296d36cdd9f57fa166641c96b1@alvh.no-ip.org","name":"Alvaro Herrera"},"message":"Fix a couple of trivial issues in jsonb.c\n\nTypo \"aggreagate\" appeared three times, and the return value of function\nJsonbIteratorNext() was being assigned to an int variable in a bunch of\nplaces.","distinct":false,"url":"https://api.github.com/repos/fabriziomello/postgres/commits/654809e770ce270c0bb9de726c5df1ab193d60f0"},{"sha":"f65e8270587f3e9b8224e20f7d020ed1f816dfe1","author":{"email":"ffeaa947aef224da9ba99b6a18bdd74288df0e3e@sss.pgh.pa.us","name":"Tom Lane"},"message":"Invent a memory context reset/delete callback mechanism.\n\nThis allows cleanup actions to be registered to be called just before a\nparticular memory context's contents are flushed (either by deletion or\nMemoryContextReset).  The patch in itself has no use-cases for this, but\nseveral likely reasons for wanting this exist.\n\nIn passing, per discussion, rearrange some boolean fields in struct\nMemoryContextData so as to avoid wasted padding space.  For safety,\nthis requires making allowInCritSection's existence unconditional;\nbut I think that's a better approach than what was there anyway.","distinct":false,"url":"https://api.github.com/repos/fabriziomello/postgres/commits/f65e8270587f3e9b8224e20f7d020ed1f816dfe1"},{"sha":"fbef4342a86522c98cd605891ad8c1145a61d191","author":{"email":"3c84f0de6f8a0f296d36cdd9f57fa166641c96b1@alvh.no-ip.org","name":"Alvaro Herrera"},"message":"Make CREATE OR REPLACE VIEW internally more consistent\n\nThe way that columns are added to a view is by calling\nAlterTableInternal with special subtype AT_AddColumnToView; but that\nsubtype is changed to AT_AddColumnRecurse by ATPrepAddColumn.  This has\nno visible effect in the current code, since views cannot have\ninheritance children (thus the recursion step is a no-op) and adding a\ncolumn to a view is executed identically to doing it to a table; but it\ndoes make a difference for future event trigger code keeping track of\ncommands, because the current situation leads to confusing the case with\na normal ALTER TABLE ADD COLUMN.\n\nFix the problem by passing a flag to ATPrepAddColumn to prevent it from\nchanging the command subtype.  The event trigger code can then properly\nignore the subcommand.  (We could remove the call to ATPrepAddColumn,\nsince views are never typed, and there is never a need for recursion,\nwhich are the two conditions that are checked by ATPrepAddColumn; but it\nseems more future-proof to keep the call in place.)","distinct":false,"url":"https://api.github.com/repos/fabriziomello/postgres/commits/fbef4342a86522c98cd605891ad8c1145a61d191"},{"sha":"eaa5808e8ec4e82ce1a87103a6b6f687666e4e4c","author":{"email":"ffeaa947aef224da9ba99b6a18bdd74288df0e3e@sss.pgh.pa.us","name":"Tom Lane"},"message":"Redefine MemoryContextReset() as deleting, not resetting, child contexts.\n\nThat is, MemoryContextReset() now means what was formerly meant by\nMemoryContextResetAndDeleteChildren(), and the latter is now just a macro\nalias for the former.  If you really want the functionality that was\nformerly provided by MemoryContextReset(), what you have to do is\nMemoryContextResetChildren() plus MemoryContextResetOnly() (which is a\nnew API to reset *only* the named context and not touch its children).\n\nThe reason for this change is that near fifteen years of experience has\nproven that there is noplace where old-style MemoryContextReset() is\nactually what you want.  Making that the default behavior has led to lots\nof context-leakage bugs, while we've not found anyplace where it's actually\nnecessary to keep the child contexts; at least the standard regression\ntests do not reveal anyplace where this change breaks anything.  And there\nare upcoming patches that will introduce additional reasons why child\ncontexts need to be removed.\n\nWe could change existing calls of MemoryContextResetAndDeleteChildren to be\njust MemoryContextReset, but for the moment I'll leave them alone; they're\nnot costing anything.","distinct":false,"url":"https://api.github.com/repos/fabriziomello/postgres/commits/eaa5808e8ec4e82ce1a87103a6b6f687666e4e4c"},{"sha":"d61f1a93271b859938b6cdb301a367cdb8abf81c","author":{"email":"ffeaa947aef224da9ba99b6a18bdd74288df0e3e@sss.pgh.pa.us","name":"Tom Lane"},"message":"Suppress uninitialized-variable warning from less-bright compilers.\n\nThe type variable must get set on first iteration of the while loop,\nbut there are reasonably modern gcc versions that don't realize that.\nInitialize it with a dummy value.  This undoes a removal of initialization\nin commit 654809e770ce270c0bb9de726c5df1ab193d60f0.","distinct":false,"url":"https://api.github.com/repos/fabriziomello/postgres/commits/d61f1a93271b859938b6cdb301a367cdb8abf81c"},{"sha":"c4f4c7ca99169ac609df67c2d0eb78162484420c","author":{"email":"ffeaa947aef224da9ba99b6a18bdd74288df0e3e@sss.pgh.pa.us","name":"Tom Lane"},"message":"Improve mmgr README.\n\nAdd documentation about the new reset callback mechanism.\n\nAlso, at long last, recast the existing text so that it describes the\ncurrent context mechanisms as established fact rather than something\nwe're going to implement.  Shoulda done that in 2001 or so ...","distinct":false,"url":"https://api.github.com/repos/fabriziomello/postgres/commits/c4f4c7ca99169ac609df67c2d0eb78162484420c"},{"sha":"b514a7460d9127ddda6598307272c701cbb133b7","author":{"email":"ffeaa947aef224da9ba99b6a18bdd74288df0e3e@sss.pgh.pa.us","name":"Tom Lane"},"message":"Fix planning of star-schema-style queries.\n\nPart of the intent of the parameterized-path mechanism was to handle\nstar-schema queries efficiently, but some overly-restrictive search\nlimiting logic added in commit e2fa76d80ba571d4de8992de6386536867250474\nprevented such cases from working as desired.  Fix that and add a\nregression test about it.  Per gripe from Marc Cousin.\n\nThis is arguably a bug rather than a new feature, so back-patch to 9.2\nwhere parameterized paths were introduced.","distinct":false,"url":"https://api.github.com/repos/fabriziomello/postgres/commits/b514a7460d9127ddda6598307272c701cbb133b7"},{"sha":"e524cbdc45ec6d677b1dd49ee64dd403959eda0f","author":{"email":"ffeaa947aef224da9ba99b6a18bdd74288df0e3e@sss.pgh.pa.us","name":"Tom Lane"},"message":"Track typmods in plpgsql expression evaluation and assignment.\n\nThe main value of this change is to avoid expensive I/O conversions when\nassigning to a variable that has a typmod specification, if the value\nto be assigned is already known to have the right typmod.  This is\nparticularly valuable for arrays with typmod specifications; formerly,\nin an assignment to an array element the entire array would invariably\nget put through double I/O conversion to check the typmod, to absolutely\nno purpose since we'd already properly coerced the new element value.\n\nExtracted from my \"expanded arrays\" patch; this seems worth committing\nseparately, whatever becomes of that patch, since it's really an\nindependent issue.\n\nAs long as we're changing the function signatures, take the opportunity\nto rationalize the argument lists of exec_assign_value, exec_cast_value,\nand exec_simple_cast_value; that is, put the arguments into a saner order,\nand get rid of the bizarre choice to pass exec_assign_value's isNull flag\nby reference.","distinct":false,"url":"https://api.github.com/repos/fabriziomello/postgres/commits/e524cbdc45ec6d677b1dd49ee64dd403959eda0f"},{"sha":"e059e02e43cd825616192d010e9e638a96ad4717","author":{"email":"3c84f0de6f8a0f296d36cdd9f57fa166641c96b1@alvh.no-ip.org","name":"Alvaro Herrera"},"message":"Fix intermittent failure in event_trigger test\n\nAs evidenced by measles in buildfarm.  Pointed out by Tom.","distinct":false,"url":"https://api.github.com/repos/fabriziomello/postgres/commits/e059e02e43cd825616192d010e9e638a96ad4717"},{"sha":"097fe194aa7c590b4fa43d5e40c083940859c286","author":{"email":"ffeaa947aef224da9ba99b6a18bdd74288df0e3e@sss.pgh.pa.us","name":"Tom Lane"},"message":"Move memory context callback declarations into palloc.h.\n\nInitial experience with this feature suggests that instances of\nMemoryContextCallback are likely to propagate into some widely-used headers\nover time.  As things stood, that would result in pulling memutils.h or\nat least memnodes.h into common headers, which does not seem desirable.\nInstead, let's decide that this feature is part of the \"ordinary palloc\nuser\" API rather than the \"specialized context management\" API, and as\nsuch should be declared in palloc.h not memutils.h.","distinct":false,"url":"https://api.github.com/repos/fabriziomello/postgres/commits/097fe194aa7c590b4fa43d5e40c083940859c286"},{"sha":"424793fa5dc631254f69d5ee8d7d7d6de2976f60","author":{"email":"1db01d43e08596f43a65fb393d969b98ee5b4dc6@leadboat.com","name":"Noah Misch"},"message":"Unlink static libraries before rebuilding them.\n\nWhen the library already exists in the build directory, \"ar\" preserves\nmembers not named on its command line.  This mattered when, for example,\na \"configure\" rerun dropped a file from $(LIBOBJS).  libpgport carried\nthe obsolete member until \"make clean\".  Back-patch to 9.0 (all\nsupported versions).","distinct":false,"url":"https://api.github.com/repos/fabriziomello/postgres/commits/424793fa5dc631254f69d5ee8d7d7d6de2976f60"},{"sha":"b8a18ad4850ea5ad7884aa6ab731fd392e73b4ad","author":{"email":"1db01d43e08596f43a65fb393d969b98ee5b4dc6@leadboat.com","name":"Noah Misch"},"message":"Add transform functions for AT TIME ZONE.\n\nThis makes \"ALTER TABLE tabname ALTER tscol TYPE ... USING tscol AT TIME\nZONE 'UTC'\" skip rewriting the table when altering from \"timestamp\" to\n\"timestamptz\" or vice versa.  While it would be nicer still to optimize\nthis in the absence of the USING clause given timezone==UTC, transform\nfunctions must consult IMMUTABLE facts only.","distinct":false,"url":"https://api.github.com/repos/fabriziomello/postgres/commits/b8a18ad4850ea5ad7884aa6ab731fd392e73b4ad"},{"sha":"8abb3cda0ddc00a0ab98977a1633a95b97068d4e","author":{"email":"ffeaa947aef224da9ba99b6a18bdd74288df0e3e@sss.pgh.pa.us","name":"Tom Lane"},"message":"Use the typcache to cache constraints for domain types.\n\nPreviously, we cached domain constraints for the life of a query, or\nreally for the life of the FmgrInfo struct that was used to invoke\ndomain_in() or domain_check().  But plpgsql (and probably other places)\nare set up to cache such FmgrInfos for the whole lifespan of a session,\nwhich meant they could be enforcing really stale sets of constraints.\nOn the other hand, searching pg_constraint once per query gets kind of\nexpensive too: testing says that as much as half the runtime of a\ntrivial query such as \"SELECT 0::domaintype\" went into that.\n\nTo fix this, delegate the responsibility for tracking a domain's\nconstraints to the typcache, which has the infrastructure needed to\ndetect syscache invalidation events that signal possible changes.\nThis not only removes unnecessary repeat reads of pg_constraint,\nbut ensures that we never apply stale constraint data: whatever we\nuse is the current data according to syscache rules.\n\nUnfortunately, the current configuration of the system catalogs means\nwe have to flush cached domain-constraint data whenever either pg_type\nor pg_constraint changes, which happens rather a lot (eg, creation or\ndeletion of a temp table will do it).  It might be worth rearranging\nthings to split pg_constraint into two catalogs, of which the domain\nconstraint one would probably be very low-traffic.  That's a job for\nanother patch though, and in any case this patch should improve matters\nmaterially even with that handicap.\n\nThis patch makes use of the recently-added memory context reset callback\nfeature to manage the lifespan of domain constraint caches, so that we\ndon't risk deleting a cache that might be in the midst of evaluation.\n\nAlthough this is a bug fix as well as a performance improvement, no\nback-patch.  There haven't been many if any field complaints about\nstale domain constraint checks, so it doesn't seem worth taking the\nrisk of modifying data structures as basic as MemoryContexts in back\nbranches.","distinct":false,"url":"https://api.github.com/repos/fabriziomello/postgres/commits/8abb3cda0ddc00a0ab98977a1633a95b97068d4e"},{"sha":"ee4ddcb38a0abfdb8f7302bbc332a1cb92888ed1","author":{"email":"d3eaa418a359156a10c6383b2e3a44959960ecf6@snowman.net","name":"Stephen Frost"},"message":"Fix targetRelation initializiation in prepsecurity\n\nIn 6f9bd50eabb0a4960e94c83dac8855771c9f340d, we modified\nexpand_security_quals() to tell expand_security_qual() about when the\ncurrent RTE was the targetRelation.  Unfortunately, that commit\ninitialized the targetRelation variable used outside of the loop over\nthe RTEs instead of at the start of it.\n\nThis patch moves the variable and the initialization of it into the\nloop, where it should have been to begin with.\n\nPointed out by Dean Rasheed.\n\nBack-patch to 9.4 as the original commit was.","distinct":false,"url":"https://api.github.com/repos/fabriziomello/postgres/commits/ee4ddcb38a0abfdb8f7302bbc332a1cb92888ed1"},{"sha":"ebd092bc2a07787b31b249d62033b9c8140a5d85","author":{"email":"d3eaa418a359156a10c6383b2e3a44959960ecf6@snowman.net","name":"Stephen Frost"},"message":"Fix pg_dump handling of extension config tables\n\nSince 9.1, we've provided extensions with a way to denote\n\"configuration\" tables- tables created by an extension which the user\nmay modify.  By marking these as \"configuration\" tables, the extension\nis asking for the data in these tables to be pg_dump'd (tables which\nare not marked in this way are assumed to be entirely handled during\nCREATE EXTENSION and are not included at all in a pg_dump).\n\nUnfortunately, pg_dump neglected to consider foreign key relationships\nbetween extension configuration tables and therefore could end up\ntrying to reload the data in an order which would cause FK violations.\n\nThis patch teaches pg_dump about these dependencies, so that the data\ndumped out is done so in the best order possible.  Note that there's no\nway to handle circular dependencies, but those have yet to be seen in\nthe wild.\n\nThe release notes for this should include a caution to users that\nexisting pg_dump-based backups may be invalid due to this issue.  The\ndata is all there, but restoring from it will require extracting the\ndata for the configuration tables and then loading them in the correct\norder by hand.\n\nDiscussed initially back in bug #6738, more recently brought up by\nGilles Darold, who provided an initial patch which was further reworked\nby Michael Paquier.  Further modifications and documentation updates\nby me.\n\nBack-patch to 9.1 where we added the concept of extension configuration\ntables.","distinct":false,"url":"https://api.github.com/repos/fabriziomello/postgres/commits/ebd092bc2a07787b31b249d62033b9c8140a5d85"},{"sha":"878fdcb843e087cc1cdeadc987d6ef55202ddd04","author":{"email":"cc4ab156f0be9feefe10b35a552fd319cd7679ae@postgresql.org","name":"Robert Haas"},"message":"pgbench: Add a real expression syntax to \\set\n\nPreviously, you could do \\set variable operand1 operator operand2, but\nnothing more complicated.  Now, you can \\set variable expression, which\nmakes it much simpler to do multi-step calculations here.  This also\nadds support for the modulo operator (%), with the same semantics as in\nC.\n\nRobert Haas and Fabien Coelho, reviewed by Álvaro Herrera and\nStephen Frost","distinct":false,"url":"https://api.github.com/repos/fabriziomello/postgres/commits/878fdcb843e087cc1cdeadc987d6ef55202ddd04"},{"sha":"d1479011744d80d80c669b5bd64dc32187f26c1e","author":{"email":"ffeaa947aef224da9ba99b6a18bdd74288df0e3e@sss.pgh.pa.us","name":"Tom Lane"},"message":"Fix busted markup.\n\nEvidently from commit 878fdcb843e087cc1cdeadc987d6ef55202ddd04.\nPer buildfarm.","distinct":false,"url":"https://api.github.com/repos/fabriziomello/postgres/commits/d1479011744d80d80c669b5bd64dc32187f26c1e"},{"sha":"e5f36902495d0c8d5dee9a5f43fb45d44540f795","author":{"email":"cc4ab156f0be9feefe10b35a552fd319cd7679ae@postgresql.org","name":"Robert Haas"},"message":"pgbench: Fix mistakes in Makefile.\n\nMy commit 878fdcb843e087cc1cdeadc987d6ef55202ddd04 was not quite\nright.  Tom Lane pointed out one of the mistakes fixed here, and I\nnoticed the other myself while reviewing what I'd committed.","distinct":false,"url":"https://api.github.com/repos/fabriziomello/postgres/commits/e5f36902495d0c8d5dee9a5f43fb45d44540f795"},{"sha":"b67f1ce181910e012b3a8ec7a35ba20a48247757","author":{"email":"ffeaa947aef224da9ba99b6a18bdd74288df0e3e@sss.pgh.pa.us","name":"Tom Lane"},"message":"Reduce json <=> jsonb casts from explicit-only to assignment level.\n\nThere's no reason to make users write an explicit cast to store a\njson value in a jsonb column or vice versa.\n\nWe could probably even make these implicit, but that might open us up\nto problems with ambiguous function calls, so for now just do this.","distinct":false,"url":"https://api.github.com/repos/fabriziomello/postgres/commits/b67f1ce181910e012b3a8ec7a35ba20a48247757"}]}