tqueue.h 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. /*-------------------------------------------------------------------------
  2. *
  3. * tqueue.h
  4. * Use shm_mq to send & receive tuples between parallel backends
  5. *
  6. * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
  7. * Portions Copyright (c) 1994, Regents of the University of California
  8. *
  9. * src/include/executor/tqueue.h
  10. *
  11. *-------------------------------------------------------------------------
  12. */
  13. #ifndef TQUEUE_H
  14. #define TQUEUE_H
  15. #include "storage/shm_mq.h"
  16. #include "tcop/dest.h"
  17. /* Opaque struct, only known inside tqueue.c. */
  18. typedef struct TupleQueueReader TupleQueueReader;
  19. /* Use this to send tuples to a shm_mq. */
  20. extern DestReceiver *CreateTupleQueueDestReceiver(shm_mq_handle *handle);
  21. /* Use these to receive tuples from a shm_mq. */
  22. extern TupleQueueReader *CreateTupleQueueReader(shm_mq_handle *handle);
  23. extern void DestroyTupleQueueReader(TupleQueueReader *reader);
  24. extern MinimalTuple TupleQueueReaderNext(TupleQueueReader *reader,
  25. bool nowait, bool *done);
  26. #endif /* TQUEUE_H */