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

Commitee678fe

Browse files
committed
Make NOTIFY_PAYLOAD_MAX_LENGTH depend explicitly on BLCKSZ and
NAMEDATALEN, so this code doesn't go nuts with smaller than defaultBLCKSZ or larger than default NAMEDATALEN. The standard value isstill exactly 8000.
1 parentd1e0272 commitee678fe

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

‎src/backend/commands/async.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/commands/async.c,v 1.151 2010/02/16 22:34:43 tgl Exp $
10+
* $PostgreSQL: pgsql/src/backend/commands/async.c,v 1.152 2010/02/17 00:52:09 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -137,9 +137,12 @@
137137
/*
138138
* Maximum size of a NOTIFY payload, including terminating NULL. This
139139
* must be kept small enough so that a notification message fits on one
140-
* SLRU page.
140+
* SLRU page. The magic fudge factor here is noncritical as long as it's
141+
* more than AsyncQueueEntryEmptySize --- we make it significantly bigger
142+
* than that, so changes in that data structure won't affect user-visible
143+
* restrictions.
141144
*/
142-
#defineNOTIFY_PAYLOAD_MAX_LENGTH8000
145+
#defineNOTIFY_PAYLOAD_MAX_LENGTH(BLCKSZ - NAMEDATALEN - 128)
143146

144147
/*
145148
* Struct representing an entry in the global notify queue

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp