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.96) (envelope-from ) id 1wMnSX-000Lox-1T for pgsql-bugs@arkaria.postgresql.org; Tue, 12 May 2026 13:47:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wMnSW-004oEf-0f for pgsql-bugs@arkaria.postgresql.org; Tue, 12 May 2026 13:47:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wMnSV-004oEX-2r for pgsql-bugs@lists.postgresql.org; Tue, 12 May 2026 13:47:40 +0000 Received: from mail-oi1-x22f.google.com ([2607:f8b0:4864:20::22f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wMnST-00000000EOg-2jcD for pgsql-bugs@lists.postgresql.org; Tue, 12 May 2026 13:47:39 +0000 Received: by mail-oi1-x22f.google.com with SMTP id 5614622812f47-4824176bbbeso1392518b6e.0 for ; Tue, 12 May 2026 06:47:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1778593656; cv=none; d=google.com; s=arc-20240605; b=GLuslWEUE6RrQWXTl8X1MDbS8bUQf8TyM2+B0iTej6Vg/jFKoDNv6r+yNGOSaY8EzP AeFF3UfgbphX34HyGLmO5aW/8/g78sGnmLI/9/lImFY2jWRULGj5k0fVVxudxfyYd0Ub JxrUxspkaJ4Qpg5t8ZL2AEFNH8thWpjtwVlzADk6HiHflY20h/K9zSFJyi9qrJ4Eh+Q0 XTGJs3wssQ1yqBXK0LuAlivsoNd7Xc5qmd+HAv76U3i2hKAXlTKFtpmwVptO0K3KH3YQ F6CA7+OX4LQAc9VvSDMX5p2xk/auZe/B/18Uu2Ozp2+iVBhCKSs94fYEcuKQUkXZKiqj J4Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=5BemwFI4vZwMDdDaXCWADSH2HofsB9zkEN/jz+2SQ6A=; fh=vA1AOZ71cB7taRLq1MllH7VG3YC6MOjqVoGxNGTEOp8=; b=dxNp31ZyhQLhKXu3WNDKEnLeeDmGAAttNnTItDogDxuN2NHtnVWWnrJOEQeoj6wDkX X2q3KKOPabcf8dLLhcBv2pLsZSGwJpVzBMAKEwEULRrffzhJyZsdL8Wl8hqTLR3qAOQJ m2uWVmO7n7QfZ3e2csEqYTEv84uAT/7pDo4RCuxSCDtou7jpqZVO5m8U4hniKlnu4d8J ExdDRSzPTOc3r5XEDyfyRdife3sOArBCCFcWQsuGQ5VsS6qnn21t8NHnsOFmOc2FSI1f 8yLZsoEsRiICCHNPy7+nFRC2C5d6DNGpXYUyL25Fp6GIHvu+RIIuyT5u3rUco36xOOaO 3Kfg==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778593656; x=1779198456; darn=lists.postgresql.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=5BemwFI4vZwMDdDaXCWADSH2HofsB9zkEN/jz+2SQ6A=; b=Uw3K9jP07h/0r6Bf1K7ZPuu7H4lC6e+vyDIDgQ4k3Qi2gDsCOgRlBBsudqy7zpAapT 8vKw7q8aIDAY6402N4buAplvVffrFGC0TimMK9RE76wBHRI2ITbP4iPdVUBDaistz+wL xxEfaXEEz7HRgghgSxRqNEEUG56nsKl9L1MB/G4WuJS/1WQm+IGQGpnH9E59L6L+2kQX wL0+TbATYO2yU0PSbem8be1N2SZvFfhPJQ+B4Eh7fwlPchZ7KZ3Db05C8yDfHqjJgJmL xrmYKvuIqigR576JM/hpQMM+kLTcW5a2ZXxE6SF6g/zpSzOwYLKupziBhS1Hrts+2H/Z RCtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778593656; x=1779198456; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=5BemwFI4vZwMDdDaXCWADSH2HofsB9zkEN/jz+2SQ6A=; b=eATUqoNbitM5uQ2xcbwLzKktNBVd5azLoa2QvP/rK1agUWENYzIDbp1OK3XmGPrdRM wtOOcZ3gdV1cpT+k6ObonOH04/t3HvwSL2MaAcd7XUnPOwE6fQXflvzOu+Y29tHpOozs piMYOHtCBMllmaPmSy7mrbw8qYTtLvNSlaX+vrdLFpGUu6BOXPARwigSc/G1XRF8jY5P YCSQPlvC4/yJz72jblaKbq8ioPjnncyYMuLQbUZmi92O+09F7lY7wUvbbZl0cEalxdnG jZQR1r3df84kxp4btW9eaTvJVe0zvcXVqxIueeFnrjzEDisf/JFF8nK4LdfKdrv44bbr Bc5w== X-Forwarded-Encrypted: i=1; AFNElJ8WNQ3AU+nT86RVM9cjzoog1NxLU/OojuYJziLUpmHB2Rn6eQeLPpK6O8n+IhXrhODGNRCLMGuMbu98@lists.postgresql.org X-Gm-Message-State: AOJu0YyP4XtRPVsK0KDjuiWd9GpmFJaUxVJonRa9UDl7cbZ1HC1gS//9 rhMWIyXkk841nG3zMEk5fWFaev88rGfUW6T0aPGykkKVoOJcVoRH6tYne/MJYLi+fhRKcVr/GIT MTFABYj2mZFdHo7y5FQYqplE/MIr/UPucr3wTd0M= X-Gm-Gg: Acq92OFmrKeHqQCz4KFyghktSJSd0Eyxjapl4HXGk5rxtR4KNe+KmG0M2c06V6MnCd4 hxazYwteu0Pfdy1kMrFuPoUeShY6V9ESefJYW0KmiFH8Evl9Q+CO40+6NUhFy6BceUWNzQUxmpH qjYfxywfdGnfc8ki1IEw5ERnHAX4pc5D7kftluGjbdXyNyHYfX4fZyvlPeIMAopsrP5Tmjte9Lt evsAS7BK/usPKSuWttY4gx13kMxKnP1r0moxjTfjK5+rOdW6XOVjukQdScyClACG5RHcqnOwQdB pH3vIBLhiUjMhlLT9R4PUOT2NJJeASdUqqo2rgD9Mg== X-Received: by 2002:a05:6820:4c82:b0:67e:4189:818 with SMTP id 006d021491bc7-69b69ed931dmr1538264eaf.40.1778593656233; Tue, 12 May 2026 06:47:36 -0700 (PDT) MIME-Version: 1.0 References: <19473-92f01422b9220412@postgresql.org> In-Reply-To: <19473-92f01422b9220412@postgresql.org> From: Fujii Masao Date: Tue, 12 May 2026 22:47:24 +0900 X-Gm-Features: AVHnY4JkQXLRFSyK_661--85TLMVOOU8E-EZHjyj1AYBkyNR-hB9UIQS-YVwh9g Message-ID: Subject: Re: BUG #19473: regression error in dblink: another command is already in progress To: o15611@gmail.com, pgsql-bugs@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, May 9, 2026 at 4:43=E2=80=AFAM PG Bug reporting form wrote: > > The following bug has been logged on the website: > > Bug reference: 19473 > Logged by: Oleg Ivanov > Email address: o15611@gmail.com > PostgreSQL version: 18.3 > Operating system: Linux > Description: > > Testcase: > SELECT * FROM dblink('dbname=3Dpostgres user=3Dpostgres', $$ select 7; $$= ) as > (col1 int); > SELECT * FROM dblink_connect('connection1', 'host=3D/var/run/postgresql > port=3D5432'); > SELECT * FROM dblink_send_query('connection1', $$ select 8 from pg_sleep(= 1); > $$ ); > SELECT dblink_is_busy('connection1'); > SELECT * FROM dblink_get_result('connection1') as t(col1 int); > --- SELECT dblink_is_busy('connection1'); > SELECT * FROM dblink_exec('connection1', $$ CHECKPOINT; $$); > SELECT * FROM dblink_disconnect('connection1'); > > col1 > ------ > 7 > (1 row) > > dblink_connect > ---------------- > OK > (1 row) > > dblink_send_query > ------------------- > 1 > (1 row) > > dblink_is_busy > ---------------- > 1 > (1 row) > > col1 > ------ > 8 > (1 row) > > ERROR: another command is already in progress > CONTEXT: while executing command on dblink connection named "connection1= " > dblink_disconnect > ------------------- > OK > (1 row) > > There was no error in 16 version. The error appeared in 17 version. It > seems, there is a regression bug. > The workaround is to uncomment a commented statement. The documentation for dblink_get_result() notes "It must be called once for each query sent, and one additional time to obtain an empty set result, before the connection can be used again". So in your case, it seems that dblink_get_result() needs to be called one more time before calling dblink_exec(). If you do that, I think that the error "another command is already in progress" should not occur. Therefore, this does not seem to be a bug to me. Thought? Regards, --=20 Fujii Masao