Content-Length: 285186 | pFad | http://github.com/postgrespro/mmts/commit/605aa9ebf8f421eca3f76e72eb372a83aaced343

9E Merge remote-tracking branch 'origen/PGPRO-6607' · postgrespro/mmts@605aa9e · GitHub
Skip to content

Commit 605aa9e

Browse files
author
Marina Polyakova
committed
Merge remote-tracking branch 'origen/PGPRO-6607'
2 parents 62a5b52 + 9ebb737 commit 605aa9e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/dmq.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@
4444
#include "utils/builtins.h"
4545
#include "utils/timestamp.h"
4646
#include "storage/shm_toc.h"
47+
#include "postmaster/autovacuum.h"
4748
#include "postmaster/interrupt.h"
49+
#include "replication/walsender.h"
4850
#include "storage/shm_mq.h"
4951
#include "storage/ipc.h"
5052
#include "tcop/tcopprot.h"
@@ -362,9 +364,13 @@ static Size
362364
dmq_shmem_size(void)
363365
{
364366
Size size = 0;
367+
int maxbackends = 0;
368+
369+
maxbackends = MaxConnections + autovacuum_max_workers +
370+
max_worker_processes + max_wal_senders + 1;
365371

366372
size = add_size(size, sizeof(struct DmqSharedState));
367-
size = add_size(size, hash_estimate_size(DMQ_MAX_SUBS_PER_BACKEND * MaxBackends,
373+
size = add_size(size, hash_estimate_size(DMQ_MAX_SUBS_PER_BACKEND * maxbackends,
368374
sizeof(DmqStreamSubscription)));
369375
return MAXALIGN(size);
370376
}

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/mmts/commit/605aa9ebf8f421eca3f76e72eb372a83aaced343

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy