Lucas Fairchild-Madar <lucas(dot)madar(at)gmail(dot)com> writes:
> This might be related to or a duplicate of: BUG #14843: CREATE TABLE churns
> through all memory
Yeah, sounds like it. Can you check if the just-committed patch
fixes it?
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=0c25e9652461c08b5caef259a6af27a38707e07a
regards, tom lane