Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rTvdw-007mKL-9S for pgsql-hackers@arkaria.postgresql.org; Sun, 28 Jan 2024 03:15:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rTvds-007zFg-IZ for pgsql-hackers@arkaria.postgresql.org; Sun, 28 Jan 2024 03:15:32 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rTvds-007zFY-71 for pgsql-hackers@lists.postgresql.org; Sun, 28 Jan 2024 03:15:32 +0000 Received: from mail-qk1-x72c.google.com ([2607:f8b0:4864:20::72c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rTvdk-003jBN-DT for pgsql-hackers@lists.postgresql.org; Sun, 28 Jan 2024 03:15:30 +0000 Received: by mail-qk1-x72c.google.com with SMTP id af79cd13be357-783ced0216aso121251085a.1 for ; Sat, 27 Jan 2024 19:15:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706411722; x=1707016522; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ChVwv82AXHt16ZiAeD+rRjUG+yhGKQVhZplPxgj6KZA=; b=KSrWW2x7iJi+1HJInZpA44hLmpfKh+FSdIQ39JUKsb/q/Si+jdhthMt2sVMMKWUjTo LszJTHI8Vnkk6F42BpRa3xqmmQcL99FVGzlmXM/zsfwZj59iRPVaJfDC/G/YF+axnlQ2 jOVdKtXiI1K8h3zChyLTYesMZwPaMIdG6G0vpvIbk9yu7QQG0An4gXrToYojFS37R2g8 RyrruR92egI+QCEDl4wvBcS5ALBH8/uNL4iGA2yJYUSJN4L9Gb1AW1gwVUp/JVqQdgZD IQp1w75v+UtQHvwA5M0FzBX1MzMkKoxh2tLFY5HTcHXT1r1XMzKueVAhnubfazTpunHW ooxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706411722; x=1707016522; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ChVwv82AXHt16ZiAeD+rRjUG+yhGKQVhZplPxgj6KZA=; b=wSQLjWVfozpxoaVzkzF0V/CGD1wnDn5ogLdW2BGsEVvMenAHgBbM2aCy9td1kTZSgQ Kt/oWCHcr93tXpjpCoqNLDOL5lBW9faJzPl8edUc4UPmJC/L9rdokSqvnZQuRdZA8hMo 0bE5zQOZU9SIu28OF1b6cCVq4djbQpSSR0YtUngUdzBidYhnSA7758colIWpmS5UIF9g p/lrm0Fnkrvnl1+0fo0jOy5VMnQKF9/hJkiQqHwi4VSVx7vDpDJ3FYxtv4XYolO2SFES WKCuec2RuYwW3oWU+H0yGfGCcUAVHsRmCwWlcfYJ8VzU+ka9ffUQ1wsxBSddRCckETYn 9+CA== X-Gm-Message-State: AOJu0YzPjTIu2ll+iEjqJDI7aPdFWpqfxgxDavLO4ONq6+AEs1N7RQ+e Zaa9snjV6piucA7/3pdqlL90+ZjgEC1tHFfsQyOgyr5Vb2uM/w91JrxEsVHu9Mr4ltOzWZUDQ8k /xXGe2s5e44tgAazgKs5PV9GtMik= X-Google-Smtp-Source: AGHT+IGW/mWiOWNU96KrGhFcj6AusQ6oYpT371kcZEXDG7KKY/hV2+cGmKLX3cj+pRHgs2cq+qtKl3TzPCWrNFsquB8= X-Received: by 2002:a05:620a:1230:b0:783:90db:7466 with SMTP id v16-20020a05620a123000b0078390db7466mr2732939qkj.59.1706411721818; Sat, 27 Jan 2024 19:15:21 -0800 (PST) MIME-Version: 1.0 References: <202401261211.r7kf6dik7y34@alvherre.pgsql> In-Reply-To: From: vignesh C Date: Sun, 28 Jan 2024 08:45:08 +0530 Message-ID: Subject: Re: [EXTERNAL] Re: Add non-blocking version of PQcancel To: Jelte Fennema-Nio Cc: Alvaro Herrera , Thomas Munro , Denis Laxalde , Greg Stark , Tom Lane , "Gregory Stark (as CFM)" , Jelte Fennema , Daniel Gustafsson , Peter Eisentraut , Andres Freund , Justin Pryzby , Robert Haas , "pgsql-hackers@lists.postgresql.org" Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 26 Jan 2024 at 22:22, Jelte Fennema-Nio wrote: > > On Fri, 26 Jan 2024 at 13:11, Alvaro Herrera wrote: > > I wonder, would it make sense to put all these new functions in a > > separate file fe-cancel.c? > > > Okay I tried doing that. I think the end result is indeed quite nice, > having all the cancellation related functions together in a file. But > it did require making a bunch of static functions in fe-connect > extern, and adding them to libpq-int.h. On one hand that seems fine to > me, on the other maybe that indicates that this cancellation logic > makes sense to be in the same file as the other connection functions > (in a sense, connecting is all that a cancel request does). CFBot shows that the patch has few compilation errors as in [1]: [17:07:07.621] /usr/bin/ld: ../../../src/fe_utils/libpgfeutils.a(cancel.o): in function `handle_sigint': [17:07:07.621] cancel.c:(.text+0x50): undefined reference to `PQcancel' [17:07:07.621] /usr/bin/ld: ../../../src/fe_utils/libpgfeutils.a(cancel.o): in function `SetCancelConn': [17:07:07.621] cancel.c:(.text+0x10c): undefined reference to `PQfreeCancel' [17:07:07.621] /usr/bin/ld: cancel.c:(.text+0x114): undefined reference to `PQgetCancel' [17:07:07.621] /usr/bin/ld: ../../../src/fe_utils/libpgfeutils.a(cancel.o): in function `ResetCancelConn': [17:07:07.621] cancel.c:(.text+0x148): undefined reference to `PQfreeCancel' [17:07:07.621] /usr/bin/ld: ../../../src/fe_utils/libpgfeutils.a(connect_utils.o): in function `disconnectDatabase': [17:07:07.621] connect_utils.c:(.text+0x2fc): undefined reference to `PQcancelConn' [17:07:07.621] /usr/bin/ld: connect_utils.c:(.text+0x307): undefined reference to `PQcancelSend' [17:07:07.621] /usr/bin/ld: connect_utils.c:(.text+0x30f): undefined reference to `PQcancelFinish' [17:07:07.623] /usr/bin/ld: ../../../src/interfaces/libpq/libpq.so: undefined reference to `PQcancelPoll' [17:07:07.626] collect2: error: ld returned 1 exit status [17:07:07.626] make[3]: *** [Makefile:31: pg_amcheck] Error 1 [17:07:07.626] make[2]: *** [Makefile:45: all-pg_amcheck-recurse] Error 2 [17:07:07.626] make[2]: *** Waiting for unfinished jobs.... [17:07:08.126] /usr/bin/ld: ../../../src/interfaces/libpq/libpq.so: undefined reference to `PQcancelPoll' [17:07:08.130] collect2: error: ld returned 1 exit status [17:07:08.131] make[3]: *** [Makefile:42: initdb] Error 1 [17:07:08.131] make[2]: *** [Makefile:45: all-initdb-recurse] Error 2 [17:07:08.492] /usr/bin/ld: ../../../src/interfaces/libpq/libpq.so: undefined reference to `PQcancelPoll' [17:07:08.495] collect2: error: ld returned 1 exit status [17:07:08.496] make[3]: *** [Makefile:50: pg_basebackup] Error 1 [17:07:08.496] make[2]: *** [Makefile:45: all-pg_basebackup-recurse] Error 2 [17:07:09.060] /usr/bin/ld: parallel.o: in function `sigTermHandler': [17:07:09.060] parallel.c:(.text+0x1aa): undefined reference to `PQcancel' Please post an updated version for the same. [1] - https://cirrus-ci.com/task/6210637211107328 Regards, Vignesh