Skip to content

Commit 391daa9

Browse files
committed
Trace more information
1 parent 0d78873 commit 391daa9

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

contrib/multimaster/multimaster.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,6 +1238,9 @@ static void MMProcessUtility(Node *parsetree, const char *queryString,
12381238
break;
12391239
}
12401240
if (skipCommand || IsTransactionBlock()) {
1241+
if (!skipCommand) {
1242+
elog(WARNING, "Statement '%s' is in transaction block at node %d", queryString, MMNodeId);
1243+
}
12411244
if (PreviousProcessUtilityHook != NULL)
12421245
{
12431246
PreviousProcessUtilityHook(parsetree, queryString, context,
@@ -1259,6 +1262,8 @@ static void MMProcessUtility(Node *parsetree, const char *queryString,
12591262
char const* errorMsg = NULL;
12601263
PGconn **conns;
12611264
conns = palloc(sizeof(PGconn*)*MMNodes);
1265+
1266+
elog(WARNING, "Broadcast utility statement '%s' at node %d", queryString, MMNodeId);
12621267

12631268
while (conn_str < conn_str_end) {
12641269
char* p = strchr(conn_str, ',');

contrib/multimaster/sockhub/sockhub.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ static int resolve_host_by_name(const char *hostname, unsigned* addrs, unsigned*
9292

9393
static void close_socket(Shub* shub, int fd)
9494
{
95-
close(fd);
9695
#ifdef USE_EPOLL
9796
if (epoll_ctl(shub->epollfd, EPOLL_CTL_DEL, fd, NULL) < 0) {
9897
char buf[ERR_BUF_SIZE];
@@ -102,6 +101,7 @@ static void close_socket(Shub* shub, int fd)
102101
#else
103102
FD_CLR(fd, &shub->inset);
104103
#endif
104+
close(fd);
105105
}
106106

107107
int ShubReadSocketEx(int sd, void* buf, int min_size, int max_size)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy