Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
f0bcb176
Commit
f0bcb176
authored
28 years ago
by
Marc G. Fournier
Browse files
Options
Downloads
Patches
Plain Diff
#ifdef ASYNC_DEBUG various sections of async.c
Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
parent
db7a90f1
No related branches found
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/backend/commands/async.c
+17
-1
17 additions, 1 deletion
src/backend/commands/async.c
with
17 additions
and
1 deletion
src/backend/commands/async.c
+
17
−
1
View file @
f0bcb176
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.
8
1996/12/
07
04:
36:38 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.
9
1996/12/
19
04:
54:56 scrappy
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -117,13 +117,17 @@ Async_NotifyHandler(SIGNAL_ARGS)
...
@@ -117,13 +117,17 @@ Async_NotifyHandler(SIGNAL_ARGS)
if
((
CurrentTransactionState
->
state
==
TRANS_DEFAULT
)
&&
if
((
CurrentTransactionState
->
state
==
TRANS_DEFAULT
)
&&
(
CurrentTransactionState
->
blockState
==
TRANS_DEFAULT
))
{
(
CurrentTransactionState
->
blockState
==
TRANS_DEFAULT
))
{
#ifdef ASYNC_DEBUG
elog
(
DEBUG
,
"Waking up sleeping backend process"
);
elog
(
DEBUG
,
"Waking up sleeping backend process"
);
#endif
Async_NotifyFrontEnd
();
Async_NotifyFrontEnd
();
}
else
{
}
else
{
#ifdef ASYNC_DEBUG
elog
(
DEBUG
,
"Process is in the middle of another transaction, state = %d, block state = %d"
,
elog
(
DEBUG
,
"Process is in the middle of another transaction, state = %d, block state = %d"
,
CurrentTransactionState
->
state
,
CurrentTransactionState
->
state
,
CurrentTransactionState
->
blockState
);
CurrentTransactionState
->
blockState
);
#endif
notifyFrontEndPending
=
1
;
notifyFrontEndPending
=
1
;
}
}
}
}
...
@@ -167,7 +171,9 @@ Async_Notify(char *relname)
...
@@ -167,7 +171,9 @@ Async_Notify(char *relname)
char
*
notifyName
;
char
*
notifyName
;
#ifdef ASYNC_DEBUG
elog
(
DEBUG
,
"Async_Notify: %s"
,
relname
);
elog
(
DEBUG
,
"Async_Notify: %s"
,
relname
);
#endif
if
(
!
pendingNotifies
)
if
(
!
pendingNotifies
)
pendingNotifies
=
DLNewList
();
pendingNotifies
=
DLNewList
();
...
@@ -249,7 +255,9 @@ Async_NotifyAtCommit()
...
@@ -249,7 +255,9 @@ Async_NotifyAtCommit()
if
(
notifyIssued
)
{
/* 'notify <relname>' issued by us */
if
(
notifyIssued
)
{
/* 'notify <relname>' issued by us */
notifyIssued
=
0
;
notifyIssued
=
0
;
StartTransactionCommand
();
StartTransactionCommand
();
#ifdef ASYNC_DEBUG
elog
(
DEBUG
,
"Async_NotifyAtCommit."
);
elog
(
DEBUG
,
"Async_NotifyAtCommit."
);
#endif
ScanKeyEntryInitialize
(
&
key
,
0
,
ScanKeyEntryInitialize
(
&
key
,
0
,
Anum_pg_listener_notify
,
Anum_pg_listener_notify
,
Integer32EqualRegProcedure
,
Integer32EqualRegProcedure
,
...
@@ -268,10 +276,14 @@ Async_NotifyAtCommit()
...
@@ -268,10 +276,14 @@ Async_NotifyAtCommit()
tdesc
,
&
isnull
);
tdesc
,
&
isnull
);
if
(
ourpid
==
DatumGetInt32
(
d
))
{
if
(
ourpid
==
DatumGetInt32
(
d
))
{
#ifdef ASYNC_DEBUG
elog
(
DEBUG
,
"Notifying self, setting notifyFronEndPending to 1"
);
elog
(
DEBUG
,
"Notifying self, setting notifyFronEndPending to 1"
);
#endif
notifyFrontEndPending
=
1
;
notifyFrontEndPending
=
1
;
}
else
{
}
else
{
#ifdef ASYNC_DEBUG
elog
(
DEBUG
,
"Notifying others"
);
elog
(
DEBUG
,
"Notifying others"
);
#endif
#ifndef win32
#ifndef win32
if
(
kill
(
DatumGetInt32
(
d
),
SIGUSR2
)
<
0
)
{
if
(
kill
(
DatumGetInt32
(
d
),
SIGUSR2
)
<
0
)
{
if
(
errno
==
ESRCH
)
{
if
(
errno
==
ESRCH
)
{
...
@@ -373,7 +385,9 @@ Async_Listen(char *relname, int pid)
...
@@ -373,7 +385,9 @@ Async_Listen(char *relname, int pid)
char
*
relnamei
;
char
*
relnamei
;
TupleDesc
tupDesc
;
TupleDesc
tupDesc
;
#ifdef ASYNC_DEBUG
elog
(
DEBUG
,
"Async_Listen: %s"
,
relname
);
elog
(
DEBUG
,
"Async_Listen: %s"
,
relname
);
#endif
for
(
i
=
0
;
i
<
Natts_pg_listener
;
i
++
)
{
for
(
i
=
0
;
i
<
Natts_pg_listener
;
i
++
)
{
nulls
[
i
]
=
' '
;
nulls
[
i
]
=
' '
;
values
[
i
]
=
PointerGetDatum
(
NULL
);
values
[
i
]
=
PointerGetDatum
(
NULL
);
...
@@ -514,7 +528,9 @@ Async_NotifyFrontEnd()
...
@@ -514,7 +528,9 @@ Async_NotifyFrontEnd()
notifyFrontEndPending
=
0
;
notifyFrontEndPending
=
0
;
#ifdef ASYNC_DEBUG
elog
(
DEBUG
,
"Async_NotifyFrontEnd: notifying front end."
);
elog
(
DEBUG
,
"Async_NotifyFrontEnd: notifying front end."
);
#endif
StartTransactionCommand
();
StartTransactionCommand
();
ourpid
=
getpid
();
ourpid
=
getpid
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment