Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
16cad3e8
Commit
16cad3e8
authored
Jan 14, 2014
by
Robert Haas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Documentation for test_shm_mq.
Commit
4db3744f
added this contrib module but neglected to document it. Oops.
parent
b6827094
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
0 deletions
+73
-0
doc/src/sgml/contrib.sgml
doc/src/sgml/contrib.sgml
+1
-0
doc/src/sgml/filelist.sgml
doc/src/sgml/filelist.sgml
+1
-0
doc/src/sgml/test-shm-mq.sgml
doc/src/sgml/test-shm-mq.sgml
+71
-0
No files found.
doc/src/sgml/contrib.sgml
View file @
16cad3e8
...
@@ -141,6 +141,7 @@ CREATE EXTENSION <replaceable>module_name</> FROM unpackaged;
...
@@ -141,6 +141,7 @@ CREATE EXTENSION <replaceable>module_name</> FROM unpackaged;
&tablefunc;
&tablefunc;
&tcn;
&tcn;
&test-parser;
&test-parser;
&test-shm-mq;
&tsearch2;
&tsearch2;
&unaccent;
&unaccent;
&uuid-ossp;
&uuid-ossp;
...
...
doc/src/sgml/filelist.sgml
View file @
16cad3e8
...
@@ -144,6 +144,7 @@
...
@@ -144,6 +144,7 @@
<!ENTITY tablefunc SYSTEM "tablefunc.sgml">
<!ENTITY tablefunc SYSTEM "tablefunc.sgml">
<!ENTITY tcn SYSTEM "tcn.sgml">
<!ENTITY tcn SYSTEM "tcn.sgml">
<!ENTITY test-parser SYSTEM "test-parser.sgml">
<!ENTITY test-parser SYSTEM "test-parser.sgml">
<!ENTITY test-shm-mq SYSTEM "test-shm-mq.sgml">
<!ENTITY tsearch2 SYSTEM "tsearch2.sgml">
<!ENTITY tsearch2 SYSTEM "tsearch2.sgml">
<!ENTITY unaccent SYSTEM "unaccent.sgml">
<!ENTITY unaccent SYSTEM "unaccent.sgml">
<!ENTITY uuid-ossp SYSTEM "uuid-ossp.sgml">
<!ENTITY uuid-ossp SYSTEM "uuid-ossp.sgml">
...
...
doc/src/sgml/test-shm-mq.sgml
0 → 100644
View file @
16cad3e8
<!-- doc/src/sgml/test-shm-mq.sgml -->
<sect1 id="test-shm-mq" xreflabel="test_shm_mq">
<title>test_shm_mq</title>
<indexterm zone="test-shm-mq">
<primary>test_shm_mq</primary>
</indexterm>
<para>
<filename>test_shm_mq</> is an example of how to use dynamic shared memory
and the shared memory message queue facilities to coordinate a user backend
with the efforts of one or more background workers. It is not intended to
do anything useful on its own; rather, it is a demonstration of how these
facilities can be used, and a unit test of those facilities.
</para>
<para>
The function is this extension send the same message repeatedly through
a loop of processes. The message payload, the size of the message queue
through which it is sent, and the number of processes in the loop are
configurable. At the end, the message may be verified to ensure that it
has not been corrupted in transmission.
</para>
<sect2>
<title>Functions</title>
<synopsis>
test_shm_mq(queue_size int8, message text,
repeat_count int4 default 1, num_workers int4 default 1)
RETURNS void
</synopsis>
<para>
This function sends and receives messages synchronously. The user
backend sends the provided message to the first background worker using
a message queue of the given size. The first background worker sends
the message to the second background worker, if the number of workers
is greater than one, and so forth. Eventually, the last background
worker sends the message back to the user backend. If the repeat count
is greater than one, the user backend then sends the message back to
the first worker. Once the message has been send and received by all
the coordinating processes a number of times equal to the repeat count,
the user backend verifies that the message finally received matches the
one originally sent and throws an error if not.
</para>
<synopsis>
test_shm_mq_pipelined(queue_size int8, message text,
repeat_count int4 default 1, num_workers int4 default 1,
verify bool default true)
RETURNS void
</synopsis>
<para>
This function sends the same message multiple times, as specified by the
repeat count, to the first background worker using a queue of the given
size. These messages are then forwarded to each background worker in
turn, in each case using a queue of the given size. Finally, the last
background worker sends the messages back to the user backend. The user
backend uses non-blocking sends and receives, so that it may begin receiving
copies of the message before it has finished sending all copies of the
message. The <literal>verify</> argument controls whether or not the
received copies are checked against the message that was sent. (This
takes nontrivial time so it may be useful to disable it for benchmarking
purposes.)
</para>
</sect2>
</sect1>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment