 src/backend/catalog/Catalog.pm             |  3 ++-
 src/backend/catalog/Makefile               |  2 +-
 src/backend/utils/Gen_fmgrtab.pl           |  3 ++-
 src/include/catalog/pg_partitioned_table.h |  2 +-
 src/include/catalog/pg_sequence.h          | 10 ++++++++++
 src/include/catalog/pg_subscription_rel.h  |  5 +----
 6 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/src/backend/catalog/Catalog.pm b/src/backend/catalog/Catalog.pm
new file mode 100644
index 54f8353..0b260ec
*** a/src/backend/catalog/Catalog.pm
--- b/src/backend/catalog/Catalog.pm
*************** sub Catalogs
*** 36,42 ****
  		'int64'         => 'int8',
  		'Oid'           => 'oid',
  		'NameData'      => 'name',
! 		'TransactionId' => 'xid');
  
  	foreach my $input_file (@_)
  	{
--- 36,43 ----
  		'int64'         => 'int8',
  		'Oid'           => 'oid',
  		'NameData'      => 'name',
! 		'TransactionId' => 'xid',
! 		'XLogRecPtr'    => 'pg_lsn');
  
  	foreach my $input_file (@_)
  	{
diff --git a/src/backend/catalog/Makefile b/src/backend/catalog/Makefile
new file mode 100644
index fd33426..30ca509
*** a/src/backend/catalog/Makefile
--- b/src/backend/catalog/Makefile
*************** POSTGRES_BKI_SRCS = $(addprefix $(top_sr
*** 45,51 ****
  	pg_default_acl.h pg_init_privs.h pg_seclabel.h pg_shseclabel.h \
  	pg_collation.h pg_partitioned_table.h pg_range.h pg_transform.h \
  	pg_sequence.h pg_publication.h pg_publication_rel.h pg_subscription.h \
! 	pg_subscription_rel.h toasting.h indexing.h \
  	toasting.h indexing.h \
      )
  
--- 45,51 ----
  	pg_default_acl.h pg_init_privs.h pg_seclabel.h pg_shseclabel.h \
  	pg_collation.h pg_partitioned_table.h pg_range.h pg_transform.h \
  	pg_sequence.h pg_publication.h pg_publication_rel.h pg_subscription.h \
! 	pg_subscription_rel.h \
  	toasting.h indexing.h \
      )
  
diff --git a/src/backend/utils/Gen_fmgrtab.pl b/src/backend/utils/Gen_fmgrtab.pl
new file mode 100644
index ee89d50..c0efc07
*** a/src/backend/utils/Gen_fmgrtab.pl
--- b/src/backend/utils/Gen_fmgrtab.pl
***************
*** 2,8 ****
  #-------------------------------------------------------------------------
  #
  # Gen_fmgrtab.pl
! #    Perl script that generates fmgroids.h and fmgrtab.c from pg_proc.h
  #
  # Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
  # Portions Copyright (c) 1994, Regents of the University of California
--- 2,9 ----
  #-------------------------------------------------------------------------
  #
  # Gen_fmgrtab.pl
! #    Perl script that generates fmgroids.h, fmgrprotos.h, and fmgrtab.c
! #    from pg_proc.h
  #
  # Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
  # Portions Copyright (c) 1994, Regents of the University of California
diff --git a/src/include/catalog/pg_partitioned_table.h b/src/include/catalog/pg_partitioned_table.h
new file mode 100644
index 525e541..731147e
*** a/src/include/catalog/pg_partitioned_table.h
--- b/src/include/catalog/pg_partitioned_table.h
***************
*** 10,16 ****
   * src/include/catalog/pg_partitioned_table.h
   *
   * NOTES
!  *	  the genbki.sh script reads this file and generates .bki
   *	  information from the DATA() statements.
   *
   *-------------------------------------------------------------------------
--- 10,16 ----
   * src/include/catalog/pg_partitioned_table.h
   *
   * NOTES
!  *	  the genbki.pl script reads this file and generates .bki
   *	  information from the DATA() statements.
   *
   *-------------------------------------------------------------------------
diff --git a/src/include/catalog/pg_sequence.h b/src/include/catalog/pg_sequence.h
new file mode 100644
index 8ae6b71..6de54bb
*** a/src/include/catalog/pg_sequence.h
--- b/src/include/catalog/pg_sequence.h
***************
*** 1,3 ****
--- 1,13 ----
+ /* -------------------------------------------------------------------------
+  *
+  * pg_sequence.h
+  *	  definition of the system "sequence" relation (pg_sequence)
+  *
+  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
+  * Portions Copyright (c) 1994, Regents of the University of California
+  *
+  * -------------------------------------------------------------------------
+  */
  #ifndef PG_SEQUENCE_H
  #define PG_SEQUENCE_H
  
diff --git a/src/include/catalog/pg_subscription_rel.h b/src/include/catalog/pg_subscription_rel.h
new file mode 100644
index 991ca9d..5748297
*** a/src/include/catalog/pg_subscription_rel.h
--- b/src/include/catalog/pg_subscription_rel.h
***************
*** 23,37 ****
   */
  #define SubscriptionRelRelationId			6102
  
- /* Workaround for genbki not knowing about XLogRecPtr */
- #define pg_lsn XLogRecPtr
- 
  CATALOG(pg_subscription_rel,6102) BKI_WITHOUT_OIDS
  {
  	Oid			srsubid;		/* Oid of subscription */
  	Oid			srrelid;		/* Oid of relation */
  	char		srsubstate;		/* state of the relation in subscription */
! 	pg_lsn		srsublsn;		/* remote lsn of the state change used for
  								 * synchronization coordination */
  } FormData_pg_subscription_rel;
  
--- 23,34 ----
   */
  #define SubscriptionRelRelationId			6102
  
  CATALOG(pg_subscription_rel,6102) BKI_WITHOUT_OIDS
  {
  	Oid			srsubid;		/* Oid of subscription */
  	Oid			srrelid;		/* Oid of relation */
  	char		srsubstate;		/* state of the relation in subscription */
! 	XLogRecPtr	srsublsn;		/* remote lsn of the state change used for
  								 * synchronization coordination */
  } FormData_pg_subscription_rel;
  
