pg_query 5.1.0 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (490) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +30 -0
  3. data/README.md +1 -1
  4. data/Rakefile +4 -4
  5. data/ext/pg_query/ext_symbols_freebsd.sym +1 -0
  6. data/ext/pg_query/ext_symbols_freebsd_with_ruby_abi_version.sym +2 -0
  7. data/ext/pg_query/ext_symbols_openbsd.sym +1 -0
  8. data/ext/pg_query/ext_symbols_openbsd_with_ruby_abi_version.sym +2 -0
  9. data/ext/pg_query/ext_symbols_with_ruby_abi_version.sym +2 -0
  10. data/ext/pg_query/extconf.rb +20 -6
  11. data/ext/pg_query/include/pg_query.h +4 -3
  12. data/ext/pg_query/include/pg_query_enum_defs.c +424 -154
  13. data/ext/pg_query/include/pg_query_fingerprint_conds.c +68 -4
  14. data/ext/pg_query/include/pg_query_fingerprint_defs.c +2952 -1845
  15. data/ext/pg_query/include/pg_query_outfuncs_conds.c +51 -3
  16. data/ext/pg_query/include/pg_query_outfuncs_defs.c +210 -23
  17. data/ext/pg_query/include/pg_query_readfuncs_conds.c +17 -1
  18. data/ext/pg_query/include/pg_query_readfuncs_defs.c +271 -52
  19. data/ext/pg_query/include/postgres/access/amapi.h +14 -3
  20. data/ext/pg_query/include/postgres/access/attmap.h +1 -1
  21. data/ext/pg_query/include/postgres/access/attnum.h +1 -1
  22. data/ext/pg_query/include/postgres/access/brin_internal.h +116 -0
  23. data/ext/pg_query/include/postgres/access/brin_tuple.h +112 -0
  24. data/ext/pg_query/include/postgres/access/clog.h +2 -3
  25. data/ext/pg_query/include/postgres/access/commit_ts.h +2 -3
  26. data/ext/pg_query/include/postgres/access/detoast.h +1 -1
  27. data/ext/pg_query/include/postgres/access/genam.h +17 -4
  28. data/ext/pg_query/include/postgres/access/gin.h +1 -1
  29. data/ext/pg_query/include/postgres/access/htup.h +1 -1
  30. data/ext/pg_query/include/postgres/access/htup_details.h +11 -11
  31. data/ext/pg_query/include/postgres/access/itup.h +3 -3
  32. data/ext/pg_query/include/postgres/access/parallel.h +1 -2
  33. data/ext/pg_query/include/postgres/access/printtup.h +1 -1
  34. data/ext/pg_query/include/postgres/access/relation.h +1 -1
  35. data/ext/pg_query/include/postgres/access/relscan.h +1 -1
  36. data/ext/pg_query/include/postgres/access/rmgrlist.h +1 -1
  37. data/ext/pg_query/include/postgres/access/sdir.h +1 -1
  38. data/ext/pg_query/include/postgres/access/skey.h +1 -1
  39. data/ext/pg_query/include/postgres/access/slru.h +218 -0
  40. data/ext/pg_query/include/postgres/access/stratnum.h +1 -1
  41. data/ext/pg_query/include/postgres/access/sysattr.h +1 -1
  42. data/ext/pg_query/include/postgres/access/table.h +1 -1
  43. data/ext/pg_query/include/postgres/access/tableam.h +35 -25
  44. data/ext/pg_query/include/postgres/access/tidstore.h +50 -0
  45. data/ext/pg_query/include/postgres/access/toast_compression.h +2 -2
  46. data/ext/pg_query/include/postgres/access/transam.h +50 -7
  47. data/ext/pg_query/include/postgres/access/tsmapi.h +1 -1
  48. data/ext/pg_query/include/postgres/access/tupconvert.h +1 -1
  49. data/ext/pg_query/include/postgres/access/tupdesc.h +5 -5
  50. data/ext/pg_query/include/postgres/access/tupmacs.h +1 -1
  51. data/ext/pg_query/include/postgres/access/twophase.h +2 -2
  52. data/ext/pg_query/include/postgres/access/xact.h +5 -5
  53. data/ext/pg_query/include/postgres/access/xlog.h +20 -12
  54. data/ext/pg_query/include/postgres/access/xlog_internal.h +4 -3
  55. data/ext/pg_query/include/postgres/access/xlogbackup.h +3 -1
  56. data/ext/pg_query/include/postgres/access/xlogdefs.h +5 -5
  57. data/ext/pg_query/include/postgres/access/xlogprefetcher.h +2 -2
  58. data/ext/pg_query/include/postgres/access/xlogreader.h +2 -2
  59. data/ext/pg_query/include/postgres/access/xlogrecord.h +3 -3
  60. data/ext/pg_query/include/postgres/access/xlogrecovery.h +4 -4
  61. data/ext/pg_query/include/postgres/archive/archive_module.h +9 -1
  62. data/ext/pg_query/include/postgres/c.h +32 -37
  63. data/ext/pg_query/include/postgres/catalog/catalog.h +3 -1
  64. data/ext/pg_query/include/postgres/catalog/catversion.h +2 -2
  65. data/ext/pg_query/include/postgres/catalog/dependency.h +17 -59
  66. data/ext/pg_query/include/postgres/catalog/genbki.h +12 -6
  67. data/ext/pg_query/include/postgres/catalog/index.h +22 -18
  68. data/ext/pg_query/include/postgres/catalog/indexing.h +1 -1
  69. data/ext/pg_query/include/postgres/catalog/namespace.h +18 -19
  70. data/ext/pg_query/include/postgres/catalog/objectaccess.h +2 -2
  71. data/ext/pg_query/include/postgres/catalog/objectaddress.h +5 -1
  72. data/ext/pg_query/include/postgres/catalog/pg_aggregate.h +4 -2
  73. data/ext/pg_query/include/postgres/catalog/pg_aggregate_d.h +1 -1
  74. data/ext/pg_query/include/postgres/catalog/pg_am.h +6 -3
  75. data/ext/pg_query/include/postgres/catalog/pg_am_d.h +1 -1
  76. data/ext/pg_query/include/postgres/catalog/pg_attribute.h +31 -14
  77. data/ext/pg_query/include/postgres/catalog/pg_attribute_d.h +3 -3
  78. data/ext/pg_query/include/postgres/catalog/pg_authid.h +6 -3
  79. data/ext/pg_query/include/postgres/catalog/pg_authid_d.h +2 -1
  80. data/ext/pg_query/include/postgres/catalog/pg_class.h +10 -5
  81. data/ext/pg_query/include/postgres/catalog/pg_class_d.h +4 -2
  82. data/ext/pg_query/include/postgres/catalog/pg_collation.h +11 -5
  83. data/ext/pg_query/include/postgres/catalog/pg_collation_d.h +5 -2
  84. data/ext/pg_query/include/postgres/catalog/pg_constraint.h +15 -10
  85. data/ext/pg_query/include/postgres/catalog/pg_constraint_d.h +2 -1
  86. data/ext/pg_query/include/postgres/catalog/pg_control.h +5 -3
  87. data/ext/pg_query/include/postgres/catalog/pg_conversion.h +8 -4
  88. data/ext/pg_query/include/postgres/catalog/pg_conversion_d.h +1 -1
  89. data/ext/pg_query/include/postgres/catalog/pg_database.h +9 -4
  90. data/ext/pg_query/include/postgres/catalog/pg_database_d.h +13 -12
  91. data/ext/pg_query/include/postgres/catalog/pg_depend.h +3 -3
  92. data/ext/pg_query/include/postgres/catalog/pg_depend_d.h +1 -1
  93. data/ext/pg_query/include/postgres/catalog/pg_event_trigger.h +6 -3
  94. data/ext/pg_query/include/postgres/catalog/pg_event_trigger_d.h +1 -1
  95. data/ext/pg_query/include/postgres/catalog/pg_index.h +5 -3
  96. data/ext/pg_query/include/postgres/catalog/pg_index_d.h +1 -1
  97. data/ext/pg_query/include/postgres/catalog/pg_language.h +6 -3
  98. data/ext/pg_query/include/postgres/catalog/pg_language_d.h +1 -1
  99. data/ext/pg_query/include/postgres/catalog/pg_namespace.h +6 -3
  100. data/ext/pg_query/include/postgres/catalog/pg_namespace_d.h +1 -1
  101. data/ext/pg_query/include/postgres/catalog/pg_opclass.h +6 -3
  102. data/ext/pg_query/include/postgres/catalog/pg_opclass_d.h +1 -1
  103. data/ext/pg_query/include/postgres/catalog/pg_operator.h +20 -3
  104. data/ext/pg_query/include/postgres/catalog/pg_operator_d.h +1 -1
  105. data/ext/pg_query/include/postgres/catalog/pg_opfamily.h +6 -3
  106. data/ext/pg_query/include/postgres/catalog/pg_opfamily_d.h +1 -1
  107. data/ext/pg_query/include/postgres/catalog/pg_partitioned_table.h +4 -2
  108. data/ext/pg_query/include/postgres/catalog/pg_partitioned_table_d.h +1 -1
  109. data/ext/pg_query/include/postgres/catalog/pg_proc.h +6 -3
  110. data/ext/pg_query/include/postgres/catalog/pg_proc_d.h +1 -1
  111. data/ext/pg_query/include/postgres/catalog/pg_publication.h +6 -3
  112. data/ext/pg_query/include/postgres/catalog/pg_publication_d.h +1 -1
  113. data/ext/pg_query/include/postgres/catalog/pg_replication_origin.h +6 -3
  114. data/ext/pg_query/include/postgres/catalog/pg_replication_origin_d.h +1 -1
  115. data/ext/pg_query/include/postgres/catalog/pg_statistic.h +10 -4
  116. data/ext/pg_query/include/postgres/catalog/pg_statistic_d.h +7 -3
  117. data/ext/pg_query/include/postgres/catalog/pg_statistic_ext.h +10 -7
  118. data/ext/pg_query/include/postgres/catalog/pg_statistic_ext_d.h +3 -3
  119. data/ext/pg_query/include/postgres/catalog/pg_transform.h +6 -3
  120. data/ext/pg_query/include/postgres/catalog/pg_transform_d.h +1 -1
  121. data/ext/pg_query/include/postgres/catalog/pg_trigger.h +4 -4
  122. data/ext/pg_query/include/postgres/catalog/pg_trigger_d.h +1 -1
  123. data/ext/pg_query/include/postgres/catalog/pg_ts_config.h +6 -3
  124. data/ext/pg_query/include/postgres/catalog/pg_ts_config_d.h +1 -1
  125. data/ext/pg_query/include/postgres/catalog/pg_ts_dict.h +6 -3
  126. data/ext/pg_query/include/postgres/catalog/pg_ts_dict_d.h +1 -1
  127. data/ext/pg_query/include/postgres/catalog/pg_ts_parser.h +6 -3
  128. data/ext/pg_query/include/postgres/catalog/pg_ts_parser_d.h +1 -1
  129. data/ext/pg_query/include/postgres/catalog/pg_ts_template.h +6 -3
  130. data/ext/pg_query/include/postgres/catalog/pg_ts_template_d.h +1 -1
  131. data/ext/pg_query/include/postgres/catalog/pg_type.h +6 -3
  132. data/ext/pg_query/include/postgres/catalog/pg_type_d.h +1 -1
  133. data/ext/pg_query/include/postgres/catalog/storage.h +1 -1
  134. data/ext/pg_query/include/postgres/catalog/syscache_ids.h +104 -0
  135. data/ext/pg_query/include/postgres/commands/async.h +2 -6
  136. data/ext/pg_query/include/postgres/commands/dbcommands.h +1 -1
  137. data/ext/pg_query/include/postgres/commands/defrem.h +6 -6
  138. data/ext/pg_query/include/postgres/commands/event_trigger.h +11 -2
  139. data/ext/pg_query/include/postgres/commands/explain.h +19 -3
  140. data/ext/pg_query/include/postgres/commands/prepare.h +1 -1
  141. data/ext/pg_query/include/postgres/commands/tablespace.h +1 -1
  142. data/ext/pg_query/include/postgres/commands/trigger.h +1 -1
  143. data/ext/pg_query/include/postgres/commands/vacuum.h +28 -26
  144. data/ext/pg_query/include/postgres/common/cryptohash.h +2 -2
  145. data/ext/pg_query/include/postgres/common/file_perm.h +1 -1
  146. data/ext/pg_query/include/postgres/common/file_utils.h +65 -0
  147. data/ext/pg_query/include/postgres/common/hashfn.h +16 -1
  148. data/ext/pg_query/include/postgres/common/hashfn_unstable.h +407 -0
  149. data/ext/pg_query/include/postgres/common/int.h +79 -4
  150. data/ext/pg_query/include/postgres/common/keywords.h +1 -1
  151. data/ext/pg_query/include/postgres/common/kwlookup.h +1 -1
  152. data/ext/pg_query/include/postgres/common/pg_prng.h +2 -1
  153. data/ext/pg_query/include/postgres/common/relpath.h +4 -4
  154. data/ext/pg_query/include/postgres/common/scram-common.h +1 -1
  155. data/ext/pg_query/include/postgres/common/sha2.h +1 -1
  156. data/ext/pg_query/include/postgres/common/string.h +1 -1
  157. data/ext/pg_query/include/postgres/common/unicode_east_asian_fw_table.h +2 -3
  158. data/ext/pg_query/include/postgres/copyfuncs.funcs.c +278 -30
  159. data/ext/pg_query/include/postgres/copyfuncs.switch.c +55 -4
  160. data/ext/pg_query/include/postgres/datatype/timestamp.h +29 -3
  161. data/ext/pg_query/include/postgres/equalfuncs.funcs.c +239 -26
  162. data/ext/pg_query/include/postgres/equalfuncs.switch.c +55 -4
  163. data/ext/pg_query/include/postgres/executor/execdesc.h +2 -2
  164. data/ext/pg_query/include/postgres/executor/executor.h +6 -5
  165. data/ext/pg_query/include/postgres/executor/functions.h +2 -1
  166. data/ext/pg_query/include/postgres/executor/instrument.h +5 -3
  167. data/ext/pg_query/include/postgres/executor/spi.h +2 -8
  168. data/ext/pg_query/include/postgres/executor/tablefunc.h +1 -1
  169. data/ext/pg_query/include/postgres/executor/tuptable.h +31 -2
  170. data/ext/pg_query/include/postgres/fmgr.h +2 -2
  171. data/ext/pg_query/include/postgres/foreign/fdwapi.h +1 -1
  172. data/ext/pg_query/include/postgres/funcapi.h +2 -2
  173. data/ext/pg_query/include/postgres/gram.h +871 -830
  174. data/ext/pg_query/include/postgres/gramparse.h +1 -1
  175. data/ext/pg_query/include/postgres/jit/jit.h +4 -3
  176. data/ext/pg_query/include/postgres/kwlist_d.h +511 -466
  177. data/ext/pg_query/include/postgres/lib/dshash.h +25 -10
  178. data/ext/pg_query/include/postgres/lib/ilist.h +1 -1
  179. data/ext/pg_query/include/postgres/lib/pairingheap.h +1 -1
  180. data/ext/pg_query/include/postgres/lib/simplehash.h +40 -18
  181. data/ext/pg_query/include/postgres/lib/sort_template.h +14 -1
  182. data/ext/pg_query/include/postgres/lib/stringinfo.h +93 -11
  183. data/ext/pg_query/include/postgres/libpq/auth.h +1 -1
  184. data/ext/pg_query/include/postgres/libpq/crypt.h +2 -2
  185. data/ext/pg_query/include/postgres/libpq/hba.h +4 -4
  186. data/ext/pg_query/include/postgres/libpq/libpq-be.h +35 -28
  187. data/ext/pg_query/include/postgres/libpq/libpq.h +6 -7
  188. data/ext/pg_query/include/postgres/libpq/pqcomm.h +26 -20
  189. data/ext/pg_query/include/postgres/libpq/pqformat.h +2 -3
  190. data/ext/pg_query/include/postgres/libpq/pqsignal.h +1 -1
  191. data/ext/pg_query/include/postgres/libpq/protocol.h +89 -0
  192. data/ext/pg_query/include/postgres/libpq/sasl.h +1 -1
  193. data/ext/pg_query/include/postgres/libpq/scram.h +1 -1
  194. data/ext/pg_query/include/postgres/mb/pg_wchar.h +103 -82
  195. data/ext/pg_query/include/postgres/mb/stringinfo_mb.h +1 -1
  196. data/ext/pg_query/include/postgres/miscadmin.h +72 -52
  197. data/ext/pg_query/include/postgres/nodes/bitmapset.h +17 -3
  198. data/ext/pg_query/include/postgres/nodes/execnodes.h +112 -25
  199. data/ext/pg_query/include/postgres/nodes/extensible.h +1 -1
  200. data/ext/pg_query/include/postgres/nodes/lockoptions.h +4 -4
  201. data/ext/pg_query/include/postgres/nodes/makefuncs.h +8 -2
  202. data/ext/pg_query/include/postgres/nodes/memnodes.h +43 -4
  203. data/ext/pg_query/include/postgres/nodes/miscnodes.h +1 -1
  204. data/ext/pg_query/include/postgres/nodes/nodeFuncs.h +1 -1
  205. data/ext/pg_query/include/postgres/nodes/nodes.h +30 -41
  206. data/ext/pg_query/include/postgres/nodes/nodetags.h +464 -444
  207. data/ext/pg_query/include/postgres/nodes/params.h +1 -1
  208. data/ext/pg_query/include/postgres/nodes/parsenodes.h +358 -175
  209. data/ext/pg_query/include/postgres/nodes/pathnodes.h +64 -10
  210. data/ext/pg_query/include/postgres/nodes/pg_list.h +62 -11
  211. data/ext/pg_query/include/postgres/nodes/plannodes.h +11 -10
  212. data/ext/pg_query/include/postgres/nodes/primnodes.h +352 -54
  213. data/ext/pg_query/include/postgres/nodes/print.h +1 -1
  214. data/ext/pg_query/include/postgres/nodes/queryjumble.h +2 -2
  215. data/ext/pg_query/include/postgres/nodes/replnodes.h +23 -2
  216. data/ext/pg_query/include/postgres/nodes/supportnodes.h +1 -1
  217. data/ext/pg_query/include/postgres/nodes/tidbitmap.h +1 -1
  218. data/ext/pg_query/include/postgres/nodes/value.h +1 -1
  219. data/ext/pg_query/include/postgres/optimizer/cost.h +5 -4
  220. data/ext/pg_query/include/postgres/optimizer/geqo.h +1 -1
  221. data/ext/pg_query/include/postgres/optimizer/geqo_gene.h +1 -1
  222. data/ext/pg_query/include/postgres/optimizer/optimizer.h +5 -2
  223. data/ext/pg_query/include/postgres/optimizer/paths.h +13 -8
  224. data/ext/pg_query/include/postgres/optimizer/planmain.h +7 -1
  225. data/ext/pg_query/include/postgres/parser/analyze.h +3 -1
  226. data/ext/pg_query/include/postgres/parser/kwlist.h +22 -2
  227. data/ext/pg_query/include/postgres/parser/parse_agg.h +1 -1
  228. data/ext/pg_query/include/postgres/parser/parse_coerce.h +5 -2
  229. data/ext/pg_query/include/postgres/parser/parse_expr.h +1 -1
  230. data/ext/pg_query/include/postgres/parser/parse_func.h +2 -2
  231. data/ext/pg_query/include/postgres/parser/parse_node.h +3 -2
  232. data/ext/pg_query/include/postgres/parser/parse_oper.h +4 -1
  233. data/ext/pg_query/include/postgres/parser/parse_relation.h +1 -1
  234. data/ext/pg_query/include/postgres/parser/parse_type.h +2 -2
  235. data/ext/pg_query/include/postgres/parser/parser.h +3 -3
  236. data/ext/pg_query/include/postgres/parser/parsetree.h +1 -1
  237. data/ext/pg_query/include/postgres/parser/scanner.h +1 -1
  238. data/ext/pg_query/include/postgres/parser/scansup.h +1 -1
  239. data/ext/pg_query/include/postgres/partitioning/partdefs.h +1 -1
  240. data/ext/pg_query/include/postgres/pg_config.h +53 -45
  241. data/ext/pg_query/include/postgres/pg_config_manual.h +21 -8
  242. data/ext/pg_query/include/postgres/pg_getopt.h +1 -1
  243. data/ext/pg_query/include/postgres/pg_trace.h +1 -1
  244. data/ext/pg_query/include/postgres/pgstat.h +13 -11
  245. data/ext/pg_query/include/postgres/pgtime.h +1 -1
  246. data/ext/pg_query/include/postgres/pl_reserved_kwlist.h +1 -1
  247. data/ext/pg_query/include/postgres/pl_reserved_kwlist_d.h +1 -1
  248. data/ext/pg_query/include/postgres/pl_unreserved_kwlist.h +1 -1
  249. data/ext/pg_query/include/postgres/pl_unreserved_kwlist_d.h +1 -1
  250. data/ext/pg_query/include/postgres/plerrcodes.h +4 -4
  251. data/ext/pg_query/include/postgres/plpgsql.h +15 -13
  252. data/ext/pg_query/include/postgres/port/atomics/arch-arm.h +1 -1
  253. data/ext/pg_query/include/postgres/port/atomics/arch-hppa.h +1 -1
  254. data/ext/pg_query/include/postgres/port/atomics/arch-ppc.h +3 -1
  255. data/ext/pg_query/include/postgres/port/atomics/arch-x86.h +3 -1
  256. data/ext/pg_query/include/postgres/port/atomics/fallback.h +1 -1
  257. data/ext/pg_query/include/postgres/port/atomics/generic-gcc.h +38 -1
  258. data/ext/pg_query/include/postgres/port/atomics/generic-msvc.h +19 -1
  259. data/ext/pg_query/include/postgres/port/atomics/generic-sunpro.h +16 -1
  260. data/ext/pg_query/include/postgres/port/atomics/generic.h +38 -2
  261. data/ext/pg_query/include/postgres/port/atomics.h +93 -6
  262. data/ext/pg_query/include/postgres/port/pg_bitutils.h +91 -9
  263. data/ext/pg_query/include/postgres/port/pg_bswap.h +1 -1
  264. data/ext/pg_query/include/postgres/port/pg_crc32c.h +10 -1
  265. data/ext/pg_query/include/postgres/port/pg_iovec.h +117 -0
  266. data/ext/pg_query/include/postgres/port/simd.h +48 -1
  267. data/ext/pg_query/include/postgres/port/win32/sys/socket.h +8 -0
  268. data/ext/pg_query/include/postgres/port/win32_port.h +1 -13
  269. data/ext/pg_query/include/postgres/port.h +39 -4
  270. data/ext/pg_query/include/postgres/portability/instr_time.h +1 -1
  271. data/ext/pg_query/include/postgres/postgres.h +1 -1
  272. data/ext/pg_query/include/postgres/postmaster/autovacuum.h +5 -16
  273. data/ext/pg_query/include/postgres/postmaster/bgworker.h +8 -6
  274. data/ext/pg_query/include/postgres/postmaster/bgworker_internals.h +3 -7
  275. data/ext/pg_query/include/postgres/postmaster/bgwriter.h +3 -3
  276. data/ext/pg_query/include/postgres/postmaster/interrupt.h +1 -1
  277. data/ext/pg_query/include/postgres/postmaster/pgarch.h +2 -2
  278. data/ext/pg_query/include/postgres/postmaster/postmaster.h +25 -5
  279. data/ext/pg_query/include/postgres/postmaster/startup.h +2 -2
  280. data/ext/pg_query/include/postgres/postmaster/syslogger.h +2 -4
  281. data/ext/pg_query/include/postgres/postmaster/walsummarizer.h +35 -0
  282. data/ext/pg_query/include/postgres/postmaster/walwriter.h +2 -2
  283. data/ext/pg_query/include/postgres/regex/regex.h +92 -9
  284. data/ext/pg_query/include/postgres/replication/logicallauncher.h +1 -1
  285. data/ext/pg_query/include/postgres/replication/logicalproto.h +2 -2
  286. data/ext/pg_query/include/postgres/replication/logicalworker.h +2 -1
  287. data/ext/pg_query/include/postgres/replication/origin.h +1 -1
  288. data/ext/pg_query/include/postgres/replication/reorderbuffer.h +27 -46
  289. data/ext/pg_query/include/postgres/replication/slot.h +45 -5
  290. data/ext/pg_query/include/postgres/replication/slotsync.h +38 -0
  291. data/ext/pg_query/include/postgres/replication/syncrep.h +1 -1
  292. data/ext/pg_query/include/postgres/replication/walreceiver.h +37 -11
  293. data/ext/pg_query/include/postgres/replication/walsender.h +5 -3
  294. data/ext/pg_query/include/postgres/rewrite/prs2lock.h +1 -1
  295. data/ext/pg_query/include/postgres/rewrite/rewriteHandler.h +7 -1
  296. data/ext/pg_query/include/postgres/rewrite/rewriteManip.h +2 -2
  297. data/ext/pg_query/include/postgres/rewrite/rewriteSupport.h +1 -1
  298. data/ext/pg_query/include/postgres/storage/block.h +1 -1
  299. data/ext/pg_query/include/postgres/storage/buf.h +1 -1
  300. data/ext/pg_query/include/postgres/storage/bufmgr.h +59 -41
  301. data/ext/pg_query/include/postgres/storage/bufpage.h +1 -1
  302. data/ext/pg_query/include/postgres/storage/condition_variable.h +1 -1
  303. data/ext/pg_query/include/postgres/storage/dsm.h +1 -1
  304. data/ext/pg_query/include/postgres/storage/dsm_impl.h +2 -2
  305. data/ext/pg_query/include/postgres/storage/fd.h +30 -13
  306. data/ext/pg_query/include/postgres/storage/fileset.h +1 -1
  307. data/ext/pg_query/include/postgres/storage/ipc.h +4 -1
  308. data/ext/pg_query/include/postgres/storage/item.h +1 -1
  309. data/ext/pg_query/include/postgres/storage/itemid.h +1 -1
  310. data/ext/pg_query/include/postgres/storage/itemptr.h +1 -1
  311. data/ext/pg_query/include/postgres/storage/large_object.h +1 -1
  312. data/ext/pg_query/include/postgres/storage/latch.h +4 -2
  313. data/ext/pg_query/include/postgres/storage/lmgr.h +8 -2
  314. data/ext/pg_query/include/postgres/storage/lock.h +19 -19
  315. data/ext/pg_query/include/postgres/storage/lockdefs.h +3 -1
  316. data/ext/pg_query/include/postgres/storage/lwlock.h +17 -9
  317. data/ext/pg_query/include/postgres/storage/lwlocknames.h +7 -10
  318. data/ext/pg_query/include/postgres/storage/off.h +1 -1
  319. data/ext/pg_query/include/postgres/storage/pg_sema.h +1 -1
  320. data/ext/pg_query/include/postgres/storage/pg_shmem.h +5 -4
  321. data/ext/pg_query/include/postgres/storage/pmsignal.h +2 -2
  322. data/ext/pg_query/include/postgres/storage/predicate.h +1 -5
  323. data/ext/pg_query/include/postgres/storage/proc.h +48 -26
  324. data/ext/pg_query/include/postgres/storage/procarray.h +5 -1
  325. data/ext/pg_query/include/postgres/storage/proclist_types.h +11 -9
  326. data/ext/pg_query/include/postgres/storage/procnumber.h +43 -0
  327. data/ext/pg_query/include/postgres/storage/procsignal.h +8 -6
  328. data/ext/pg_query/include/postgres/storage/read_stream.h +65 -0
  329. data/ext/pg_query/include/postgres/storage/relfilelocator.h +16 -15
  330. data/ext/pg_query/include/postgres/storage/s_lock.h +7 -27
  331. data/ext/pg_query/include/postgres/storage/sharedfileset.h +1 -1
  332. data/ext/pg_query/include/postgres/storage/shm_mq.h +2 -2
  333. data/ext/pg_query/include/postgres/storage/shm_toc.h +1 -1
  334. data/ext/pg_query/include/postgres/storage/shmem.h +1 -1
  335. data/ext/pg_query/include/postgres/storage/sinval.h +3 -3
  336. data/ext/pg_query/include/postgres/storage/smgr.h +46 -29
  337. data/ext/pg_query/include/postgres/storage/spin.h +1 -1
  338. data/ext/pg_query/include/postgres/storage/standby.h +13 -3
  339. data/ext/pg_query/include/postgres/storage/standbydefs.h +2 -2
  340. data/ext/pg_query/include/postgres/storage/sync.h +4 -4
  341. data/ext/pg_query/include/postgres/tcop/cmdtag.h +1 -2
  342. data/ext/pg_query/include/postgres/tcop/cmdtaglist.h +3 -2
  343. data/ext/pg_query/include/postgres/tcop/deparse_utility.h +2 -2
  344. data/ext/pg_query/include/postgres/tcop/dest.h +3 -2
  345. data/ext/pg_query/include/postgres/tcop/fastpath.h +1 -1
  346. data/ext/pg_query/include/postgres/tcop/pquery.h +1 -1
  347. data/ext/pg_query/include/postgres/tcop/tcopprot.h +9 -5
  348. data/ext/pg_query/include/postgres/tcop/utility.h +2 -2
  349. data/ext/pg_query/include/postgres/tsearch/ts_cache.h +1 -1
  350. data/ext/pg_query/include/postgres/utils/acl.h +19 -7
  351. data/ext/pg_query/include/postgres/utils/aclchk_internal.h +1 -1
  352. data/ext/pg_query/include/postgres/utils/array.h +1 -2
  353. data/ext/pg_query/include/postgres/utils/ascii.h +84 -0
  354. data/ext/pg_query/include/postgres/utils/backend_progress.h +3 -2
  355. data/ext/pg_query/include/postgres/utils/backend_status.h +8 -10
  356. data/ext/pg_query/include/postgres/utils/builtins.h +4 -1
  357. data/ext/pg_query/include/postgres/utils/bytea.h +2 -2
  358. data/ext/pg_query/include/postgres/utils/catcache.h +6 -6
  359. data/ext/pg_query/include/postgres/utils/date.h +1 -1
  360. data/ext/pg_query/include/postgres/utils/datetime.h +4 -1
  361. data/ext/pg_query/include/postgres/utils/datum.h +1 -1
  362. data/ext/pg_query/include/postgres/utils/dsa.h +44 -5
  363. data/ext/pg_query/include/postgres/utils/elog.h +3 -8
  364. data/ext/pg_query/include/postgres/utils/errcodes.h +1 -3
  365. data/ext/pg_query/include/postgres/utils/expandeddatum.h +1 -1
  366. data/ext/pg_query/include/postgres/utils/expandedrecord.h +1 -1
  367. data/ext/pg_query/include/postgres/utils/float.h +1 -1
  368. data/ext/pg_query/include/postgres/utils/fmgroids.h +49 -16
  369. data/ext/pg_query/include/postgres/utils/fmgrprotos.h +47 -14
  370. data/ext/pg_query/include/postgres/utils/fmgrtab.h +1 -1
  371. data/ext/pg_query/include/postgres/utils/guc.h +20 -6
  372. data/ext/pg_query/include/postgres/utils/guc_hooks.h +23 -2
  373. data/ext/pg_query/include/postgres/utils/guc_tables.h +6 -5
  374. data/ext/pg_query/include/postgres/utils/hsearch.h +2 -2
  375. data/ext/pg_query/include/postgres/utils/injection_point.h +44 -0
  376. data/ext/pg_query/include/postgres/utils/inval.h +1 -1
  377. data/ext/pg_query/include/postgres/utils/logtape.h +5 -5
  378. data/ext/pg_query/include/postgres/utils/lsyscache.h +6 -3
  379. data/ext/pg_query/include/postgres/utils/memdebug.h +1 -1
  380. data/ext/pg_query/include/postgres/utils/memutils.h +12 -5
  381. data/ext/pg_query/include/postgres/utils/memutils_internal.h +53 -13
  382. data/ext/pg_query/include/postgres/utils/memutils_memorychunk.h +25 -9
  383. data/ext/pg_query/include/postgres/utils/numeric.h +6 -1
  384. data/ext/pg_query/include/postgres/utils/palloc.h +1 -15
  385. data/ext/pg_query/include/postgres/utils/partcache.h +1 -1
  386. data/ext/pg_query/include/postgres/utils/pg_locale.h +8 -7
  387. data/ext/pg_query/include/postgres/utils/pgstat_internal.h +30 -17
  388. data/ext/pg_query/include/postgres/utils/plancache.h +5 -3
  389. data/ext/pg_query/include/postgres/utils/portal.h +10 -10
  390. data/ext/pg_query/include/postgres/utils/queryenvironment.h +2 -2
  391. data/ext/pg_query/include/postgres/utils/regproc.h +1 -1
  392. data/ext/pg_query/include/postgres/utils/rel.h +14 -15
  393. data/ext/pg_query/include/postgres/utils/relcache.h +2 -5
  394. data/ext/pg_query/include/postgres/utils/reltrigger.h +1 -1
  395. data/ext/pg_query/include/postgres/utils/resowner.h +90 -9
  396. data/ext/pg_query/include/postgres/utils/ruleutils.h +1 -1
  397. data/ext/pg_query/include/postgres/utils/sharedtuplestore.h +1 -1
  398. data/ext/pg_query/include/postgres/utils/snapmgr.h +1 -52
  399. data/ext/pg_query/include/postgres/utils/snapshot.h +2 -2
  400. data/ext/pg_query/include/postgres/utils/sortsupport.h +1 -1
  401. data/ext/pg_query/include/postgres/utils/syscache.h +7 -98
  402. data/ext/pg_query/include/postgres/utils/timeout.h +3 -2
  403. data/ext/pg_query/include/postgres/utils/timestamp.h +1 -1
  404. data/ext/pg_query/include/postgres/utils/tuplesort.h +36 -9
  405. data/ext/pg_query/include/postgres/utils/tuplestore.h +2 -5
  406. data/ext/pg_query/include/postgres/utils/typcache.h +2 -1
  407. data/ext/pg_query/include/postgres/utils/varlena.h +1 -1
  408. data/ext/pg_query/include/postgres/utils/wait_event.h +28 -214
  409. data/ext/pg_query/include/postgres/utils/wait_event_types.h +218 -0
  410. data/ext/pg_query/include/postgres/utils/xml.h +4 -4
  411. data/ext/pg_query/include/postgres/varatt.h +1 -1
  412. data/ext/pg_query/include/protobuf/pg_query.pb-c.h +1546 -792
  413. data/ext/pg_query/include/protobuf/pg_query.pb.h +58365 -46595
  414. data/ext/pg_query/pg_query.pb-c.c +6598 -3739
  415. data/ext/pg_query/pg_query_normalize.c +42 -1
  416. data/ext/pg_query/pg_query_outfuncs_json.c +3 -1
  417. data/ext/pg_query/pg_query_parse_plpgsql.c +12 -13
  418. data/ext/pg_query/pg_query_readfuncs_protobuf.c +2 -2
  419. data/ext/pg_query/pg_query_scan.c +1 -1
  420. data/ext/pg_query/postgres_deparse.c +601 -172
  421. data/ext/pg_query/src_backend_catalog_namespace.c +241 -66
  422. data/ext/pg_query/src_backend_catalog_pg_proc.c +1 -3
  423. data/ext/pg_query/src_backend_commands_define.c +2 -3
  424. data/ext/pg_query/src_backend_nodes_bitmapset.c +137 -94
  425. data/ext/pg_query/src_backend_nodes_copyfuncs.c +1 -1
  426. data/ext/pg_query/src_backend_nodes_equalfuncs.c +1 -1
  427. data/ext/pg_query/src_backend_nodes_extensible.c +1 -1
  428. data/ext/pg_query/src_backend_nodes_list.c +3 -7
  429. data/ext/pg_query/src_backend_nodes_makefuncs.c +59 -20
  430. data/ext/pg_query/src_backend_nodes_nodeFuncs.c +109 -2
  431. data/ext/pg_query/src_backend_nodes_value.c +1 -1
  432. data/ext/pg_query/src_backend_parser_gram.c +34491 -32136
  433. data/ext/pg_query/src_backend_parser_parser.c +8 -8
  434. data/ext/pg_query/src_backend_parser_scan.c +5637 -3028
  435. data/ext/pg_query/src_backend_parser_scansup.c +2 -1
  436. data/ext/pg_query/src_backend_storage_ipc_ipc.c +1 -1
  437. data/ext/pg_query/src_backend_tcop_postgres.c +34 -10
  438. data/ext/pg_query/src_backend_utils_activity_pgstat_database.c +2 -2
  439. data/ext/pg_query/src_backend_utils_adt_datum.c +8 -6
  440. data/ext/pg_query/src_backend_utils_adt_expandeddatum.c +1 -1
  441. data/ext/pg_query/src_backend_utils_adt_format_type.c +1 -1
  442. data/ext/pg_query/src_backend_utils_adt_numutils.c +4 -5
  443. data/ext/pg_query/src_backend_utils_adt_ruleutils.c +101 -28
  444. data/ext/pg_query/src_backend_utils_error_assert.c +1 -1
  445. data/ext/pg_query/src_backend_utils_error_elog.c +47 -42
  446. data/ext/pg_query/src_backend_utils_fmgr_fmgr.c +4 -2
  447. data/ext/pg_query/src_backend_utils_init_globals.c +15 -3
  448. data/ext/pg_query/src_backend_utils_mb_mbutils.c +11 -18
  449. data/ext/pg_query/src_backend_utils_misc_guc_tables.c +16 -6
  450. data/ext/pg_query/src_backend_utils_mmgr_alignedalloc.c +8 -5
  451. data/ext/pg_query/src_backend_utils_mmgr_aset.c +308 -238
  452. data/ext/pg_query/src_backend_utils_mmgr_bump.c +728 -0
  453. data/ext/pg_query/src_backend_utils_mmgr_generation.c +273 -197
  454. data/ext/pg_query/src_backend_utils_mmgr_mcxt.c +270 -215
  455. data/ext/pg_query/src_backend_utils_mmgr_slab.c +154 -96
  456. data/ext/pg_query/src_common_encnames.c +43 -44
  457. data/ext/pg_query/src_common_hashfn.c +1 -1
  458. data/ext/pg_query/src_common_keywords.c +1 -1
  459. data/ext/pg_query/src_common_kwlist_d.h +511 -466
  460. data/ext/pg_query/src_common_kwlookup.c +1 -1
  461. data/ext/pg_query/src_common_psprintf.c +3 -3
  462. data/ext/pg_query/src_common_stringinfo.c +18 -1
  463. data/ext/pg_query/src_common_wchar.c +92 -109
  464. data/ext/pg_query/src_pl_plpgsql_src_pl_comp.c +99 -5
  465. data/ext/pg_query/src_pl_plpgsql_src_pl_funcs.c +1 -1
  466. data/ext/pg_query/src_pl_plpgsql_src_pl_gram.c +242 -143
  467. data/ext/pg_query/src_pl_plpgsql_src_pl_handler.c +1 -1
  468. data/ext/pg_query/src_pl_plpgsql_src_pl_reserved_kwlist_d.h +1 -1
  469. data/ext/pg_query/src_pl_plpgsql_src_pl_scanner.c +19 -1
  470. data/ext/pg_query/src_pl_plpgsql_src_pl_unreserved_kwlist_d.h +1 -1
  471. data/ext/pg_query/src_port_pg_bitutils.c +173 -28
  472. data/ext/pg_query/src_port_pgstrcasecmp.c +29 -1
  473. data/ext/pg_query/src_port_snprintf.c +15 -18
  474. data/ext/pg_query/src_port_strerror.c +1 -3
  475. data/ext/pg_query/src_port_strlcpy.c +1 -1
  476. data/lib/pg_query/fingerprint.rb +3 -5
  477. data/lib/pg_query/param_refs.rb +2 -2
  478. data/lib/pg_query/parse.rb +5 -7
  479. data/lib/pg_query/parse_error.rb +1 -0
  480. data/lib/pg_query/pg_query_pb.rb +27 -25
  481. data/lib/pg_query/scan.rb +1 -0
  482. data/lib/pg_query/treewalker.rb +38 -15
  483. data/lib/pg_query/truncate.rb +18 -20
  484. data/lib/pg_query/version.rb +1 -1
  485. metadata +31 -82
  486. data/ext/pg_query/include/postgres/storage/backendid.h +0 -37
  487. data/ext/pg_query/include/postgres/storage/sinvaladt.h +0 -45
  488. data/ext/pg_query/pg_query_ruby_freebsd.sym +0 -2
  489. data/ext/pg_query/src_backend_nodes_nodes.c +0 -38
  490. /data/ext/pg_query/{pg_query_ruby.sym → ext_symbols.sym} +0 -0
@@ -4,7 +4,7 @@
4
4
  * postgres transaction system definitions
5
5
  *
6
6
  *
7
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
7
+ * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
8
8
  * Portions Copyright (c) 1994, Regents of the University of California
9
9
  *
10
10
  * src/include/access/xact.h
@@ -72,8 +72,8 @@ typedef enum
72
72
  SYNCHRONOUS_COMMIT_REMOTE_WRITE, /* wait for local flush and remote
73
73
  * write */
74
74
  SYNCHRONOUS_COMMIT_REMOTE_FLUSH, /* wait for local and remote flush */
75
- SYNCHRONOUS_COMMIT_REMOTE_APPLY /* wait for local and remote flush and
76
- * remote apply */
75
+ SYNCHRONOUS_COMMIT_REMOTE_APPLY, /* wait for local and remote flush and
76
+ * remote apply */
77
77
  } SyncCommitLevel;
78
78
 
79
79
  /* Define the default setting for synchronous_commit */
@@ -132,7 +132,7 @@ typedef enum
132
132
  XACT_EVENT_PREPARE,
133
133
  XACT_EVENT_PRE_COMMIT,
134
134
  XACT_EVENT_PARALLEL_PRE_COMMIT,
135
- XACT_EVENT_PRE_PREPARE
135
+ XACT_EVENT_PRE_PREPARE,
136
136
  } XactEvent;
137
137
 
138
138
  typedef void (*XactCallback) (XactEvent event, void *arg);
@@ -142,7 +142,7 @@ typedef enum
142
142
  SUBXACT_EVENT_START_SUB,
143
143
  SUBXACT_EVENT_COMMIT_SUB,
144
144
  SUBXACT_EVENT_ABORT_SUB,
145
- SUBXACT_EVENT_PRE_COMMIT_SUB
145
+ SUBXACT_EVENT_PRE_COMMIT_SUB,
146
146
  } SubXactEvent;
147
147
 
148
148
  typedef void (*SubXactCallback) (SubXactEvent event, SubTransactionId mySubid,
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * PostgreSQL write-ahead log manager
5
5
  *
6
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
6
+ * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
7
7
  * Portions Copyright (c) 1994, Regents of the University of California
8
8
  *
9
9
  * src/include/access/xlog.h
@@ -19,12 +19,15 @@
19
19
 
20
20
 
21
21
  /* Sync methods */
22
- #define SYNC_METHOD_FSYNC 0
23
- #define SYNC_METHOD_FDATASYNC 1
24
- #define SYNC_METHOD_OPEN 2 /* for O_SYNC */
25
- #define SYNC_METHOD_FSYNC_WRITETHROUGH 3
26
- #define SYNC_METHOD_OPEN_DSYNC 4 /* for O_DSYNC */
27
- extern PGDLLIMPORT int sync_method;
22
+ enum WalSyncMethod
23
+ {
24
+ WAL_SYNC_METHOD_FSYNC = 0,
25
+ WAL_SYNC_METHOD_FDATASYNC,
26
+ WAL_SYNC_METHOD_OPEN, /* for O_SYNC */
27
+ WAL_SYNC_METHOD_FSYNC_WRITETHROUGH,
28
+ WAL_SYNC_METHOD_OPEN_DSYNC /* for O_DSYNC */
29
+ };
30
+ extern PGDLLIMPORT int wal_sync_method;
28
31
 
29
32
  extern PGDLLIMPORT XLogRecPtr ProcLastRecPtr;
30
33
  extern PGDLLIMPORT XLogRecPtr XactLastRecEnd;
@@ -59,7 +62,7 @@ typedef enum ArchiveMode
59
62
  {
60
63
  ARCHIVE_MODE_OFF = 0, /* disabled */
61
64
  ARCHIVE_MODE_ON, /* enabled while server is running normally */
62
- ARCHIVE_MODE_ALWAYS /* enabled always (even during recovery) */
65
+ ARCHIVE_MODE_ALWAYS, /* enabled always (even during recovery) */
63
66
  } ArchiveMode;
64
67
  extern PGDLLIMPORT int XLogArchiveMode;
65
68
 
@@ -68,7 +71,7 @@ typedef enum WalLevel
68
71
  {
69
72
  WAL_LEVEL_MINIMAL = 0,
70
73
  WAL_LEVEL_REPLICA,
71
- WAL_LEVEL_LOGICAL
74
+ WAL_LEVEL_LOGICAL,
72
75
  } WalLevel;
73
76
 
74
77
  /* Compression algorithms for WAL */
@@ -77,7 +80,7 @@ typedef enum WalCompression
77
80
  WAL_COMPRESSION_NONE = 0,
78
81
  WAL_COMPRESSION_PGLZ,
79
82
  WAL_COMPRESSION_LZ4,
80
- WAL_COMPRESSION_ZSTD
83
+ WAL_COMPRESSION_ZSTD,
81
84
  } WalCompression;
82
85
 
83
86
  /* Recovery states */
@@ -85,7 +88,7 @@ typedef enum RecoveryState
85
88
  {
86
89
  RECOVERY_STATE_CRASH = 0, /* crash recovery */
87
90
  RECOVERY_STATE_ARCHIVE, /* archive recovery */
88
- RECOVERY_STATE_DONE /* currently in production */
91
+ RECOVERY_STATE_DONE, /* currently in production */
89
92
  } RecoveryState;
90
93
 
91
94
  extern PGDLLIMPORT int wal_level;
@@ -187,7 +190,7 @@ typedef enum WALAvailability
187
190
  WALAVAIL_EXTENDED, /* WAL segment is reserved by a slot or
188
191
  * wal_keep_size */
189
192
  WALAVAIL_UNRESERVED, /* no longer reserved, but not removed yet */
190
- WALAVAIL_REMOVED /* WAL segment has been removed */
193
+ WALAVAIL_REMOVED, /* WAL segment has been removed */
191
194
  } WALAvailability;
192
195
 
193
196
  struct XLogRecData;
@@ -206,6 +209,7 @@ extern int XLogFileOpen(XLogSegNo segno, TimeLineID tli);
206
209
 
207
210
  extern void CheckXLogRemoved(XLogSegNo segno, TimeLineID tli);
208
211
  extern XLogSegNo XLogGetLastRemovedSegno(void);
212
+ extern XLogSegNo XLogGetOldestSegno(TimeLineID tli);
209
213
  extern void XLogSetAsyncXactLSN(XLogRecPtr asyncXactLSN);
210
214
  extern void XLogSetReplicationSlotMinimumLSN(XLogRecPtr lsn);
211
215
 
@@ -244,10 +248,14 @@ extern XLogRecPtr GetRedoRecPtr(void);
244
248
  extern XLogRecPtr GetInsertRecPtr(void);
245
249
  extern XLogRecPtr GetFlushRecPtr(TimeLineID *insertTLI);
246
250
  extern TimeLineID GetWALInsertionTimeLine(void);
251
+ extern TimeLineID GetWALInsertionTimeLineIfSet(void);
247
252
  extern XLogRecPtr GetLastImportantRecPtr(void);
248
253
 
249
254
  extern void SetWalWriterSleeping(bool sleeping);
250
255
 
256
+ extern Size WALReadFromBuffers(char *dstbuf, XLogRecPtr startptr, Size count,
257
+ TimeLineID tli);
258
+
251
259
  /*
252
260
  * Routines used by xlogrecovery.c to call back into xlog.c during recovery.
253
261
  */
@@ -11,7 +11,7 @@
11
11
  * Note: This file must be includable in both frontend and backend contexts,
12
12
  * to allow stand-alone tools like pg_receivewal to deal with WAL files.
13
13
  *
14
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
14
+ * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
15
15
  * Portions Copyright (c) 1994, Regents of the University of California
16
16
  *
17
17
  * src/include/access/xlog_internal.h
@@ -31,7 +31,7 @@
31
31
  /*
32
32
  * Each page of XLOG file has a header like this:
33
33
  */
34
- #define XLOG_PAGE_MAGIC 0xD113 /* can be used as WAL version indicator */
34
+ #define XLOG_PAGE_MAGIC 0xD116 /* can be used as WAL version indicator */
35
35
 
36
36
  typedef struct XLogPageHeaderData
37
37
  {
@@ -302,6 +302,7 @@ typedef struct xl_end_of_recovery
302
302
  TimestampTz end_time;
303
303
  TimeLineID ThisTimeLineID; /* new TLI */
304
304
  TimeLineID PrevTimeLineID; /* previous TLI we forked off from */
305
+ int wal_level;
305
306
  } xl_end_of_recovery;
306
307
 
307
308
  /*
@@ -322,7 +323,7 @@ typedef enum
322
323
  {
323
324
  RECOVERY_TARGET_ACTION_PAUSE,
324
325
  RECOVERY_TARGET_ACTION_PROMOTE,
325
- RECOVERY_TARGET_ACTION_SHUTDOWN
326
+ RECOVERY_TARGET_ACTION_SHUTDOWN,
326
327
  } RecoveryTargetAction;
327
328
 
328
329
  struct LogicalDecodingContext;
@@ -3,7 +3,7 @@
3
3
  * xlogbackup.h
4
4
  * Definitions for internals of base backups.
5
5
  *
6
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
6
+ * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
7
7
  * Portions Copyright (c) 1994, Regents of the University of California
8
8
  *
9
9
  * IDENTIFICATION
@@ -28,6 +28,8 @@ typedef struct BackupState
28
28
  XLogRecPtr checkpointloc; /* last checkpoint location */
29
29
  pg_time_t starttime; /* backup start time */
30
30
  bool started_in_recovery; /* backup started in recovery? */
31
+ XLogRecPtr istartpoint; /* incremental based on backup at this LSN */
32
+ TimeLineID istarttli; /* incremental based on backup on this TLI */
31
33
 
32
34
  /* Fields saved at the end of backup */
33
35
  XLogRecPtr stoppoint; /* backup stop WAL location */
@@ -4,7 +4,7 @@
4
4
  * Postgres write-ahead log manager record pointer and
5
5
  * timeline number definitions
6
6
  *
7
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
7
+ * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
8
8
  * Portions Copyright (c) 1994, Regents of the University of California
9
9
  *
10
10
  * src/include/access/xlogdefs.h
@@ -71,12 +71,12 @@ typedef uint16 RepOriginId;
71
71
  *
72
72
  * Note that we define our own O_DSYNC on Windows, but not O_SYNC.
73
73
  */
74
- #if defined(PLATFORM_DEFAULT_SYNC_METHOD)
75
- #define DEFAULT_SYNC_METHOD PLATFORM_DEFAULT_SYNC_METHOD
74
+ #if defined(PLATFORM_DEFAULT_WAL_SYNC_METHOD)
75
+ #define DEFAULT_WAL_SYNC_METHOD PLATFORM_DEFAULT_WAL_SYNC_METHOD
76
76
  #elif defined(O_DSYNC) && (!defined(O_SYNC) || O_DSYNC != O_SYNC)
77
- #define DEFAULT_SYNC_METHOD SYNC_METHOD_OPEN_DSYNC
77
+ #define DEFAULT_WAL_SYNC_METHOD WAL_SYNC_METHOD_OPEN_DSYNC
78
78
  #else
79
- #define DEFAULT_SYNC_METHOD SYNC_METHOD_FDATASYNC
79
+ #define DEFAULT_WAL_SYNC_METHOD WAL_SYNC_METHOD_FDATASYNC
80
80
  #endif
81
81
 
82
82
  #endif /* XLOG_DEFS_H */
@@ -3,7 +3,7 @@
3
3
  * xlogprefetcher.h
4
4
  * Declarations for the recovery prefetching module.
5
5
  *
6
- * Portions Copyright (c) 2022-2023, PostgreSQL Global Development Group
6
+ * Portions Copyright (c) 2022-2024, PostgreSQL Global Development Group
7
7
  * Portions Copyright (c) 1994, Regents of the University of California
8
8
  *
9
9
  * IDENTIFICATION
@@ -25,7 +25,7 @@ typedef enum
25
25
  {
26
26
  RECOVERY_PREFETCH_OFF,
27
27
  RECOVERY_PREFETCH_ON,
28
- RECOVERY_PREFETCH_TRY
28
+ RECOVERY_PREFETCH_TRY,
29
29
  } RecoveryPrefetchValue;
30
30
 
31
31
  struct XLogPrefetcher;
@@ -3,7 +3,7 @@
3
3
  * xlogreader.h
4
4
  * Definitions for the generic XLog reading facility
5
5
  *
6
- * Portions Copyright (c) 2013-2023, PostgreSQL Global Development Group
6
+ * Portions Copyright (c) 2013-2024, PostgreSQL Global Development Group
7
7
  *
8
8
  * IDENTIFICATION
9
9
  * src/include/access/xlogreader.h
@@ -350,7 +350,7 @@ typedef enum XLogPageReadResult
350
350
  {
351
351
  XLREAD_SUCCESS = 0, /* record is successfully read */
352
352
  XLREAD_FAIL = -1, /* failed during reading a record */
353
- XLREAD_WOULDBLOCK = -2 /* nonblocking mode only, no data */
353
+ XLREAD_WOULDBLOCK = -2, /* nonblocking mode only, no data */
354
354
  } XLogPageReadResult;
355
355
 
356
356
  /* Read the next XLog record. Returns NULL on end-of-WAL or failure */
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Definitions for the WAL record format.
5
5
  *
6
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
6
+ * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
7
7
  * Portions Copyright (c) 1994, Regents of the University of California
8
8
  *
9
9
  * src/include/access/xlogrecord.h
@@ -68,8 +68,8 @@ typedef struct XLogRecord
68
68
  * in length if we ignore any allocation overhead of the XLogReader.
69
69
  *
70
70
  * To accommodate some overhead, this value allows for 4M of allocation
71
- * overhead, that should be plenty enough for what
72
- * DecodeXLogRecordRequiredSpace() expects as extra.
71
+ * overhead, that should be plenty enough for what the XLogReader
72
+ * infrastructure expects as extra.
73
73
  */
74
74
  #define XLogRecordMaxSize (1020 * 1024 * 1024)
75
75
 
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Functions for WAL recovery and standby mode
5
5
  *
6
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
6
+ * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
7
7
  * Portions Copyright (c) 1994, Regents of the University of California
8
8
  *
9
9
  * src/include/access/xlogrecovery.h
@@ -27,7 +27,7 @@ typedef enum
27
27
  RECOVERY_TARGET_TIME,
28
28
  RECOVERY_TARGET_NAME,
29
29
  RECOVERY_TARGET_LSN,
30
- RECOVERY_TARGET_IMMEDIATE
30
+ RECOVERY_TARGET_IMMEDIATE,
31
31
  } RecoveryTargetType;
32
32
 
33
33
  /*
@@ -37,7 +37,7 @@ typedef enum
37
37
  {
38
38
  RECOVERY_TARGET_TIMELINE_CONTROLFILE,
39
39
  RECOVERY_TARGET_TIMELINE_LATEST,
40
- RECOVERY_TARGET_TIMELINE_NUMERIC
40
+ RECOVERY_TARGET_TIMELINE_NUMERIC,
41
41
  } RecoveryTargetTimeLineGoal;
42
42
 
43
43
  /* Recovery pause states */
@@ -45,7 +45,7 @@ typedef enum RecoveryPauseState
45
45
  {
46
46
  RECOVERY_NOT_PAUSED, /* pause not requested */
47
47
  RECOVERY_PAUSE_REQUESTED, /* pause requested, but not yet paused */
48
- RECOVERY_PAUSED /* recovery is paused */
48
+ RECOVERY_PAUSED, /* recovery is paused */
49
49
  } RecoveryPauseState;
50
50
 
51
51
  /* User-settable GUC parameters */
@@ -3,7 +3,7 @@
3
3
  * archive_module.h
4
4
  * Exports for archive modules.
5
5
  *
6
- * Copyright (c) 2022-2023, PostgreSQL Global Development Group
6
+ * Copyright (c) 2022-2024, PostgreSQL Global Development Group
7
7
  *
8
8
  * src/include/archive/archive_module.h
9
9
  *
@@ -56,4 +56,12 @@ typedef const ArchiveModuleCallbacks *(*ArchiveModuleInit) (void);
56
56
 
57
57
  extern PGDLLEXPORT const ArchiveModuleCallbacks *_PG_archive_module_init(void);
58
58
 
59
+ /* Support for messages reported from archive module callbacks. */
60
+
61
+ extern PGDLLIMPORT char *arch_module_check_errdetail_string;
62
+
63
+ #define arch_module_check_errdetail \
64
+ pre_format_elog_string(errno, TEXTDOMAIN), \
65
+ arch_module_check_errdetail_string = format_elog_string
66
+
59
67
  #endif /* _ARCHIVE_MODULE_H */
@@ -9,7 +9,7 @@
9
9
  * polluting the namespace with lots of stuff...
10
10
  *
11
11
  *
12
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
12
+ * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
13
13
  * Portions Copyright (c) 1994, Regents of the University of California
14
14
  *
15
15
  * src/include/c.h
@@ -75,6 +75,11 @@
75
75
  #include <libintl.h>
76
76
  #endif
77
77
 
78
+ /* Define before including zlib.h to add const decorations to zlib API. */
79
+ #ifdef HAVE_LIBZ
80
+ #define ZLIB_CONST
81
+ #endif
82
+
78
83
 
79
84
  /* ----------------------------------------------------------------
80
85
  * Section 1: compiler characteristics
@@ -100,8 +105,6 @@
100
105
  * GCC: https://gcc.gnu.org/onlinedocs/gcc/Type-Attributes.html
101
106
  * Clang: https://clang.llvm.org/docs/AttributeReference.html
102
107
  * Sunpro: https://docs.oracle.com/cd/E18659_01/html/821-1384/gjzke.html
103
- * XLC: https://www.ibm.com/support/knowledgecenter/SSGH2K_13.1.2/com.ibm.xlc131.aix.doc/language_ref/function_attributes.html
104
- * XLC: https://www.ibm.com/support/knowledgecenter/SSGH2K_13.1.2/com.ibm.xlc131.aix.doc/language_ref/type_attrib.html
105
108
  */
106
109
 
107
110
  /*
@@ -132,6 +135,19 @@
132
135
  #define pg_nodiscard
133
136
  #endif
134
137
 
138
+ /*
139
+ * This macro will disable address safety instrumentation for a function
140
+ * when running with "-fsanitize=address". Think twice before using this!
141
+ */
142
+ #if defined(__clang__) || __GNUC__ >= 8
143
+ #define pg_attribute_no_sanitize_address() __attribute__((no_sanitize("address")))
144
+ #elif __has_attribute(no_sanitize_address)
145
+ /* This would work for clang, but it's deprecated. */
146
+ #define pg_attribute_no_sanitize_address() __attribute__((no_sanitize_address))
147
+ #else
148
+ #define pg_attribute_no_sanitize_address()
149
+ #endif
150
+
135
151
  /*
136
152
  * Place this macro before functions that should be allowed to make misaligned
137
153
  * accesses. Think twice before using it on non-x86-specific code!
@@ -166,8 +182,8 @@
166
182
  #define PG_USED_FOR_ASSERTS_ONLY pg_attribute_unused()
167
183
  #endif
168
184
 
169
- /* GCC and XLC support format attributes */
170
- #if defined(__GNUC__) || defined(__IBMC__)
185
+ /* GCC supports format attributes */
186
+ #if defined(__GNUC__)
171
187
  #define pg_attribute_format_arg(a) __attribute__((format_arg(a)))
172
188
  #define pg_attribute_printf(f,a) __attribute__((format(PG_PRINTF_ATTRIBUTE, f, a)))
173
189
  #else
@@ -175,8 +191,8 @@
175
191
  #define pg_attribute_printf(f,a)
176
192
  #endif
177
193
 
178
- /* GCC, Sunpro and XLC support aligned, packed and noreturn */
179
- #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
194
+ /* GCC and Sunpro support aligned, packed and noreturn */
195
+ #if defined(__GNUC__) || defined(__SUNPRO_C)
180
196
  #define pg_attribute_aligned(a) __attribute__((aligned(a)))
181
197
  #define pg_attribute_noreturn() __attribute__((noreturn))
182
198
  #define pg_attribute_packed() __attribute__((packed))
@@ -207,8 +223,8 @@
207
223
  * choose not to. But, if possible, don't force inlining in unoptimized
208
224
  * debug builds.
209
225
  */
210
- #if (defined(__GNUC__) && __GNUC__ > 3 && defined(__OPTIMIZE__)) || defined(__SUNPRO_C) || defined(__IBMC__)
211
- /* GCC > 3, Sunpro and XLC support always_inline via __attribute__ */
226
+ #if (defined(__GNUC__) && __GNUC__ > 3 && defined(__OPTIMIZE__)) || defined(__SUNPRO_C)
227
+ /* GCC > 3 and Sunpro support always_inline via __attribute__ */
212
228
  #define pg_attribute_always_inline __attribute__((always_inline)) inline
213
229
  #elif defined(_MSC_VER)
214
230
  /* MSVC has a special keyword for this */
@@ -224,8 +240,8 @@
224
240
  * for proper cost attribution. Note that unlike the pg_attribute_XXX macros
225
241
  * above, this should be placed before the function's return type and name.
226
242
  */
227
- /* GCC, Sunpro and XLC support noinline via __attribute__ */
228
- #if (defined(__GNUC__) && __GNUC__ > 2) || defined(__SUNPRO_C) || defined(__IBMC__)
243
+ /* GCC and Sunpro support noinline via __attribute__ */
244
+ #if (defined(__GNUC__) && __GNUC__ > 2) || defined(__SUNPRO_C)
229
245
  #define pg_noinline __attribute__((noinline))
230
246
  /* msvc via declspec */
231
247
  #elif defined(_MSC_VER)
@@ -419,7 +435,7 @@ typedef void (*pg_funcptr_t) (void);
419
435
  * bool
420
436
  * Boolean value, either true or false.
421
437
  *
422
- * We use stdbool.h if available and its bool has size 1. That's useful for
438
+ * We use stdbool.h if bool has size 1 after including it. That's useful for
423
439
  * better compiler and debugger output and for compatibility with third-party
424
440
  * libraries. But PostgreSQL currently cannot deal with bool of other sizes;
425
441
  * there are static assertions around the code to prevent that.
@@ -1055,30 +1071,6 @@ extern void ExceptionalCondition(const char *conditionName,
1055
1071
  } while (0)
1056
1072
 
1057
1073
 
1058
- /*
1059
- * MemSetTest/MemSetLoop are a variant version that allow all the tests in
1060
- * MemSet to be done at compile time in cases where "val" and "len" are
1061
- * constants *and* we know the "start" pointer must be word-aligned.
1062
- * If MemSetTest succeeds, then it is okay to use MemSetLoop, otherwise use
1063
- * MemSetAligned. Beware of multiple evaluations of the arguments when using
1064
- * this approach.
1065
- */
1066
- #define MemSetTest(val, len) \
1067
- ( ((len) & LONG_ALIGN_MASK) == 0 && \
1068
- (len) <= MEMSET_LOOP_LIMIT && \
1069
- MEMSET_LOOP_LIMIT != 0 && \
1070
- (val) == 0 )
1071
-
1072
- #define MemSetLoop(start, val, len) \
1073
- do \
1074
- { \
1075
- long * _start = (long *) (start); \
1076
- long * _stop = (long *) ((char *) _start + (Size) (len)); \
1077
- \
1078
- while (_start < _stop) \
1079
- *_start++ = 0; \
1080
- } while (0)
1081
-
1082
1074
  /*
1083
1075
  * Macros for range-checking float values before converting to integer.
1084
1076
  * We must be careful here that the boundary values are expressed exactly
@@ -1240,7 +1232,10 @@ typedef union PGAlignedXLogBlock
1240
1232
  * Note that this only works in function scope, not for global variables (it'd
1241
1233
  * be nice, but not trivial, to improve that).
1242
1234
  */
1243
- #if defined(HAVE__BUILTIN_TYPES_COMPATIBLE_P)
1235
+ #if defined(__cplusplus)
1236
+ #define unconstify(underlying_type, expr) const_cast<underlying_type>(expr)
1237
+ #define unvolatize(underlying_type, expr) const_cast<underlying_type>(expr)
1238
+ #elif defined(HAVE__BUILTIN_TYPES_COMPATIBLE_P)
1244
1239
  #define unconstify(underlying_type, expr) \
1245
1240
  (StaticAssertExpr(__builtin_types_compatible_p(__typeof(expr), const underlying_type), \
1246
1241
  "wrong cast"), \
@@ -4,7 +4,7 @@
4
4
  * prototypes for functions in backend/catalog/catalog.c
5
5
  *
6
6
  *
7
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
7
+ * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
8
8
  * Portions Copyright (c) 1994, Regents of the University of California
9
9
  *
10
10
  * src/include/catalog/catalog.h
@@ -21,11 +21,13 @@
21
21
  extern bool IsSystemRelation(Relation relation);
22
22
  extern bool IsToastRelation(Relation relation);
23
23
  extern bool IsCatalogRelation(Relation relation);
24
+ extern bool IsInplaceUpdateRelation(Relation relation);
24
25
 
25
26
  extern bool IsSystemClass(Oid relid, Form_pg_class reltuple);
26
27
  extern bool IsToastClass(Form_pg_class reltuple);
27
28
 
28
29
  extern bool IsCatalogRelationOid(Oid relid);
30
+ extern bool IsInplaceUpdateOid(Oid relid);
29
31
 
30
32
  extern bool IsCatalogNamespace(Oid namespaceId);
31
33
  extern bool IsToastNamespace(Oid namespaceId);
@@ -38,7 +38,7 @@
38
38
  * parsenodes.h will warrant a catversion update.
39
39
  *
40
40
  *
41
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
41
+ * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
42
42
  * Portions Copyright (c) 1994, Regents of the University of California
43
43
  *
44
44
  * src/include/catalog/catversion.h
@@ -57,6 +57,6 @@
57
57
  */
58
58
 
59
59
  /* yyyymmddN */
60
- #define CATALOG_VERSION_NO 202307071
60
+ #define CATALOG_VERSION_NO 202406281
61
61
 
62
62
  #endif
@@ -4,7 +4,7 @@
4
4
  * Routines to support inter-object dependencies.
5
5
  *
6
6
  *
7
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
7
+ * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
8
8
  * Portions Copyright (c) 1994, Regents of the University of California
9
9
  *
10
10
  * src/include/catalog/dependency.h
@@ -36,7 +36,7 @@ typedef enum DependencyType
36
36
  DEPENDENCY_PARTITION_PRI = 'P',
37
37
  DEPENDENCY_PARTITION_SEC = 'S',
38
38
  DEPENDENCY_EXTENSION = 'e',
39
- DEPENDENCY_AUTO_EXTENSION = 'x'
39
+ DEPENDENCY_AUTO_EXTENSION = 'x',
40
40
  } DependencyType;
41
41
 
42
42
  /*
@@ -56,11 +56,17 @@ typedef enum DependencyType
56
56
  * created for the owner of an object; hence two objects may be linked by
57
57
  * one or the other, but not both, of these dependency types.)
58
58
  *
59
- * (c) a SHARED_DEPENDENCY_POLICY entry means that the referenced object is
59
+ * (c) a SHARED_DEPENDENCY_INITACL entry means that the referenced object is
60
+ * a role mentioned in a pg_init_privs entry for the dependent object.
61
+ * The referenced object must be a pg_authid entry. (Unlike the case for
62
+ * SHARED_DEPENDENCY_ACL, we make an entry for such a role whether or not
63
+ * it is the object's owner.)
64
+ *
65
+ * (d) a SHARED_DEPENDENCY_POLICY entry means that the referenced object is
60
66
  * a role mentioned in a policy object. The referenced object must be a
61
67
  * pg_authid entry.
62
68
  *
63
- * (d) a SHARED_DEPENDENCY_TABLESPACE entry means that the referenced
69
+ * (e) a SHARED_DEPENDENCY_TABLESPACE entry means that the referenced
64
70
  * object is a tablespace mentioned in a relation without storage. The
65
71
  * referenced object must be a pg_tablespace entry. (Relations that have
66
72
  * storage don't need this: they are protected by the existence of a physical
@@ -73,65 +79,15 @@ typedef enum SharedDependencyType
73
79
  {
74
80
  SHARED_DEPENDENCY_OWNER = 'o',
75
81
  SHARED_DEPENDENCY_ACL = 'a',
82
+ SHARED_DEPENDENCY_INITACL = 'i',
76
83
  SHARED_DEPENDENCY_POLICY = 'r',
77
84
  SHARED_DEPENDENCY_TABLESPACE = 't',
78
- SHARED_DEPENDENCY_INVALID = 0
85
+ SHARED_DEPENDENCY_INVALID = 0,
79
86
  } SharedDependencyType;
80
87
 
81
88
  /* expansible list of ObjectAddresses (private in dependency.c) */
82
89
  typedef struct ObjectAddresses ObjectAddresses;
83
90
 
84
- /*
85
- * This enum covers all system catalogs whose OIDs can appear in
86
- * pg_depend.classId or pg_shdepend.classId. Keep object_classes[] in sync.
87
- */
88
- typedef enum ObjectClass
89
- {
90
- OCLASS_CLASS, /* pg_class */
91
- OCLASS_PROC, /* pg_proc */
92
- OCLASS_TYPE, /* pg_type */
93
- OCLASS_CAST, /* pg_cast */
94
- OCLASS_COLLATION, /* pg_collation */
95
- OCLASS_CONSTRAINT, /* pg_constraint */
96
- OCLASS_CONVERSION, /* pg_conversion */
97
- OCLASS_DEFAULT, /* pg_attrdef */
98
- OCLASS_LANGUAGE, /* pg_language */
99
- OCLASS_LARGEOBJECT, /* pg_largeobject */
100
- OCLASS_OPERATOR, /* pg_operator */
101
- OCLASS_OPCLASS, /* pg_opclass */
102
- OCLASS_OPFAMILY, /* pg_opfamily */
103
- OCLASS_AM, /* pg_am */
104
- OCLASS_AMOP, /* pg_amop */
105
- OCLASS_AMPROC, /* pg_amproc */
106
- OCLASS_REWRITE, /* pg_rewrite */
107
- OCLASS_TRIGGER, /* pg_trigger */
108
- OCLASS_SCHEMA, /* pg_namespace */
109
- OCLASS_STATISTIC_EXT, /* pg_statistic_ext */
110
- OCLASS_TSPARSER, /* pg_ts_parser */
111
- OCLASS_TSDICT, /* pg_ts_dict */
112
- OCLASS_TSTEMPLATE, /* pg_ts_template */
113
- OCLASS_TSCONFIG, /* pg_ts_config */
114
- OCLASS_ROLE, /* pg_authid */
115
- OCLASS_ROLE_MEMBERSHIP, /* pg_auth_members */
116
- OCLASS_DATABASE, /* pg_database */
117
- OCLASS_TBLSPACE, /* pg_tablespace */
118
- OCLASS_FDW, /* pg_foreign_data_wrapper */
119
- OCLASS_FOREIGN_SERVER, /* pg_foreign_server */
120
- OCLASS_USER_MAPPING, /* pg_user_mapping */
121
- OCLASS_DEFACL, /* pg_default_acl */
122
- OCLASS_EXTENSION, /* pg_extension */
123
- OCLASS_EVENT_TRIGGER, /* pg_event_trigger */
124
- OCLASS_PARAMETER_ACL, /* pg_parameter_acl */
125
- OCLASS_POLICY, /* pg_policy */
126
- OCLASS_PUBLICATION, /* pg_publication */
127
- OCLASS_PUBLICATION_NAMESPACE, /* pg_publication_namespace */
128
- OCLASS_PUBLICATION_REL, /* pg_publication_rel */
129
- OCLASS_SUBSCRIPTION, /* pg_subscription */
130
- OCLASS_TRANSFORM /* pg_transform */
131
- } ObjectClass;
132
-
133
- #define LAST_OCLASS OCLASS_TRANSFORM
134
-
135
91
  /* flag bits for performDeletion/performMultipleDeletions: */
136
92
  #define PERFORM_DELETION_INTERNAL 0x0001 /* internal action */
137
93
  #define PERFORM_DELETION_CONCURRENTLY 0x0002 /* concurrent drop */
@@ -164,8 +120,6 @@ extern void recordDependencyOnSingleRelExpr(const ObjectAddress *depender,
164
120
  DependencyType self_behavior,
165
121
  bool reverse_self);
166
122
 
167
- extern ObjectClass getObjectClass(const ObjectAddress *object);
168
-
169
123
  extern ObjectAddresses *new_object_addresses(void);
170
124
 
171
125
  extern void add_exact_object_address(const ObjectAddress *object,
@@ -223,7 +177,7 @@ extern List *getAutoExtensionsOfObject(Oid classId, Oid objectId);
223
177
 
224
178
  extern bool sequenceIsOwned(Oid seqId, char deptype, Oid *tableId, int32 *colId);
225
179
  extern List *getOwnedSequences(Oid relid);
226
- extern Oid getIdentitySequence(Oid relid, AttrNumber attnum, bool missing_ok);
180
+ extern Oid getIdentitySequence(Relation rel, AttrNumber attnum, bool missing_ok);
227
181
 
228
182
  extern Oid get_index_constraint(Oid indexId);
229
183
 
@@ -254,6 +208,10 @@ extern void updateAclDependencies(Oid classId, Oid objectId, int32 objsubId,
254
208
  int noldmembers, Oid *oldmembers,
255
209
  int nnewmembers, Oid *newmembers);
256
210
 
211
+ extern void updateInitAclDependencies(Oid classId, Oid objectId, int32 objsubId,
212
+ int noldmembers, Oid *oldmembers,
213
+ int nnewmembers, Oid *newmembers);
214
+
257
215
  extern bool checkSharedDependencies(Oid classId, Oid objectId,
258
216
  char **detail_msg, char **detail_log_msg);
259
217