Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit34d5957

Browse files
committed
update
1 parent2584029 commit34d5957

File tree

1 file changed

+25
-22
lines changed

1 file changed

+25
-22
lines changed

‎src/tools/backend/index.html

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
<HTML>
22
<HEAD>
3-
<TITLE>PostgreSQLBackend Flowchart</TITLE>
3+
<TITLE>HowPostgreSQLProcesses a Query</TITLE>
44
</HEAD>
55
<BODYBGCOLOR="#FFFFFF"TEXT="#000000"LINK="#FF0000"VLINK="#A00000"ALINK="#0000FF">
66
<H1ALIGN=CENTER>
7-
PostgreSQLBackend Flowchart
7+
HowPostgreSQLProcesses a Query
88
</H1>
99
<H2ALIGN=CENTER>
1010
by Bruce Momjian
1111
</H2>
1212
<P>
13-
A querycome into the backend via data packetscoming in through TCP/IP
14-
and Unix Domain sockets. It is loaded into a string, and passed to
13+
A querycomes to the backend via data packetsarriving through TCP/IP
14+
or Unix Domain sockets. It is loaded into a string, and passed to
1515
the
1616
<AHREF="../../backend/parser">parser,</A> where the lexical scanner,
1717
<AHREF="../../backend/parser/scan.l">scan.l,</A>
1818
breaks the query up into tokens(words). The parser
1919
uses
2020
<AHREF="../../backend/parser/gram.y">gram.y</A> and the tokens to
21-
identify the query type, and load the proper query-specific
22-
structure,like
23-
<AHREF="../../include/nodes/parsenodes.h">CreateStmt orSelectStmt.</A>
21+
identify the query type, and load the proper query-specific structure,
22+
like<AHREF="../../include/nodes/parsenodes.h">CreateStmt</A> or<A
23+
HREF="../../include/nodes/parsenodes.h">SelectStmt.</A>
2424
<P>
25-
The query is then identified as a<I>Utility</I>function or a more
26-
complexquery. A<I>Utility</I> query is processed by a
27-
query-specific functionin<AHREF="../../backend/commands">
28-
commands.</A> A complex query, like<CODE>SELECT, UPDATE,</CODE> and
25+
The query is then identified as a<I>Utility</I>query or a more complex
26+
query. A<I>Utility</I> query is processed by a query-specific function
27+
in<AHREF="../../backend/commands"> commands.</A> A complex query, like
28+
<CODE>SELECT, UPDATE,</CODE> and
2929
<CODE>DELETE</CODE> requires much more handling.
3030
<P>
3131
The parser takes a complex query, and creates a
@@ -37,7 +37,7 @@ <H2 ALIGN=CENTER>
3737
HREF="../../include/nodes/parsenodes.h"> RangeTableEntry,</A> and they
3838
are linked together to form the<I>range table</I> of the query, which is
3939
generated by<AHREF="../../backend/parser/parse_clause.c">
40-
makeRangeTable().</A> Query.rtable holds thequeries range table.
40+
makeRangeTable().</A> Query.rtable holds thequery's range table.
4141
<P>
4242
Certain queries, like<CODE>SELECT,</CODE> return columns of data. Other
4343
queries, like<CODE>INSERT</CODE> and<CODE>UPDATE,</CODE> specify the columns
@@ -48,7 +48,7 @@ <H2 ALIGN=CENTER>
4848
<AHREF="../../backend/parser/parse_target.c">transformTargetList().</A>
4949
<P>
5050
Other query elements, like aggregates(<CODE>SUM()</CODE>),<CODE>GROUP BY,</CODE>
51-
<CODE>ORDER BY</CODE> are also stored in their own Query fields.
51+
and<CODE>ORDER BY</CODE> are also stored in their own Query fields.
5252
<P>
5353
The next step is for the Query to be modified by any<CODE>VIEWS</CODE> or
5454
<CODE>RULES</CODE> that may apply to the query. This is performed by the<A
@@ -69,21 +69,22 @@ <H2 ALIGN=CENTER>
6969
There are many other modules that support this basic functionality.
7070
They can be accessed by clicking on the flowchart.
7171
<P>
72-
Another area of interest is the shared memory area, containing table
73-
data/index blocks, locks, backend information, and lookup tables for
74-
these structures:
72+
Another area of interest is the shared memory area, which contains data
73+
accessable to all backends. It has table recently used data/index
74+
blocks, locks, backend information, and lookup tables for these
75+
structures:
7576
<UL>
7677
<LI>ShmemIndex - lookup shared memory addresses using structure names
7778
<LI><AHREF="../../include/storage/buf_internals.h">Buffer
78-
Descriptors</A> - control header for buffer cache block
79-
<LI><AHREF="../../include/storage/buf_internals.h">BufferBlocks</A> -
79+
Descriptor</A> - control header for buffer cache block
80+
<LI><AHREF="../../include/storage/buf_internals.h">BufferBlock</A> -
8081
data/index buffer cache block
81-
<LI>SharedBuf Lookup Table - lookup of buffer cache blockaddress using
82+
<LI>SharedBuffer Lookup Table - lookup of buffer cache blockaddresses using
8283
table name and block number(<AHREF="../../include/storage/buf_internals.h">
8384
BufferTag</A>)
84-
<LI>MultiLevelLockTable (ctl) -<A
85-
HREF="../../include/storage/lock.h">LOCKCTL</A> control structure for
86-
each locking method. Currently, only multi-level locking is used.
85+
<LI>MultiLevelLockTable (ctl) -control structure for
86+
each locking method. Currently, only multi-level locking is used(<A
87+
HREF="../../include/storage/lock.h">LOCKMETHODCTL</A>).
8788
<LI>MultiLevelLockTable (lock hash) - the<A
8889
HREF="../../include/storage/lock.h">LOCK</A> structure, looked up using
8990
relation, database object ids(<A
@@ -105,7 +106,9 @@ <H2 ALIGN=CENTER>
105106
HREF="../../backend/storage/ipc/shmem.c">ShmemInitStruct(),</A> and
106107
the lookups are created by
107108
<AHREF="../../backend/storage/ipc/shmem.c">ShmemInitHash().</A>
109+
<P>
108110
<HR>
111+
<P>
109112
<CENTER>
110113
<EM><BIG>
111114
Click on an item to see more detail or

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp