1) It seems that no test case covers the below scenario: 2 sessions attach the same gtt, and insert/update/select concurrently. It is better to use the test framework in src/test/isolation like the code changes in https://commitfest.postgresql.org/24/2233/.
2) CREATE GLOBAL TEMP SEQUENCE also need to be supported in src/bin/psql/tab-complete.c