dbcommands_xlog.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*-------------------------------------------------------------------------
  2. *
  3. * dbcommands_xlog.h
  4. * Database resource manager XLOG definitions (create/drop database).
  5. *
  6. *
  7. * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
  8. * Portions Copyright (c) 1994, Regents of the University of California
  9. *
  10. * src/include/commands/dbcommands_xlog.h
  11. *
  12. *-------------------------------------------------------------------------
  13. */
  14. #ifndef DBCOMMANDS_XLOG_H
  15. #define DBCOMMANDS_XLOG_H
  16. #include "access/xlogreader.h"
  17. #include "lib/stringinfo.h"
  18. /* record types */
  19. #define XLOG_DBASE_CREATE 0x00
  20. #define XLOG_DBASE_DROP 0x10
  21. typedef struct xl_dbase_create_rec
  22. {
  23. /* Records copying of a single subdirectory incl. contents */
  24. Oid db_id;
  25. Oid tablespace_id;
  26. Oid src_db_id;
  27. Oid src_tablespace_id;
  28. } xl_dbase_create_rec;
  29. typedef struct xl_dbase_drop_rec
  30. {
  31. /* Records dropping of a single subdirectory incl. contents */
  32. Oid db_id;
  33. Oid tablespace_id;
  34. } xl_dbase_drop_rec;
  35. extern void dbase_redo(XLogReaderState *rptr);
  36. extern void dbase_desc(StringInfo buf, XLogReaderState *rptr);
  37. extern const char *dbase_identify(uint8 info);
  38. #endif /* DBCOMMANDS_XLOG_H */