You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Change the way pg_dump retrieves partitioning info
This gets rid of the code that issued separate queries to retrieve thepartitioning parent-child relationship, parent partition key, and childpartition bound information. With this patch, the information isretrieved instead using the queries issued from getTables() andgetInherits(), which is both more efficient than the previous approachand doesn't require any new code.Since the partitioning parent-child relationship is now retrieved withthe same old code that handles inheritance, partition attributes receivea proper flagInhAttrs() treatment (that it didn't receive before), whichis needed so that the inherited NOT NULL constraints are not emitted ifwe already emitted it for the parent.Also, fix a bug in pg_dump's --binary-upgrade code, which caused pg_dumpto emit invalid command to attach a partition to its parent.Author: Amit Langote, with some additional changes by me.