pg.ddx.io  pgdogdev/pgdog GitHub issues and pull requests  
help / color / mirror / Atom feed
From: github-actions[bot] (bot) (@github-actions[bot]) <noreply+github-actions[bot]@github.com>
To: pgdogdev/pgdog <noreply+pgdogdev-pgdog@github.com>
Subject: Re: [pgdogdev/pgdog] PR #2066: fix: support cross-shard subqueries that only return constants (e.g., Rails .limit(N).count)
Date: Wed, 18 Nov 2026 20:49:37 +0000
Message-ID: <gh-pgdogdev-pgdog-2066-c6991233398@github.com> (raw)
In-Reply-To: <gh-pgdogdev-pgdog-2066@github.com>
References: <gh-pgdogdev-pgdog-2066@github.com>

<!-- metal-bench -->

**Metal bench (arm64) failed.** 1 of 520 measures outside bounds.

| suite | throughput | cpu/txn | user cycles/txn | user instr/txn | kernel cycles/txn | kernel instr/txn | ctx/txn |
|---|---|---|---|---|---|---|---|
| pooler |  | 19.06 (+1.0% ± 1.2%) | 17,900 (+0.3% ± 0.5%) | 31,453 (-0.0% ± 0.05%) | 30,867 (+1.3% ± 2.2%) | 51,015 (-0.3% ± 0.4%) |  |
| lb |  | 19.54 (+0.4% ± 1.7%) | 18,469 (-0.1% ± 0.9%) | 32,358 (-0.0% ± 0.05%) | 31,314 (+0.8% ± 2.8%) | 52,155 (-0.1% ± 0.4%) |  |
| sharding-w2 |  | 32.7 (-0.0% ± 2.2%) | 43,733 (-0.4% ± 0.4%) | 94,979 (+0.0% ± 0.07%) | 41,085 (+0.2% ± 5.6%) | 53,656 (-0.0% ± 0.10%) | 1.546 (-0.0% ± 0.4%) |
| sharding-w8 | 247,189 (-0.2% ± 2.0%) | 28.78 (+0.1% ± 2.2%) | 43,721 (+0.1% ± 1.6%) | 50,527 (+0.0% ± 0.03%) | 35,721 (+0.1% ± 3.1%) | 42,394 (+0.0% ± 0.06%) | 0.1733 (+0.2% ± 4.2%) |

<details><summary>Counters per txn</summary>

| suite | frontend stall | l1i refill | backend stall |
|---|---|---|---|
| pooler | 7,615 (+1.1% ± 1.6%) | 2,659 (+0.3% ± 0.8%) |  |
| lb | 7,965 (+0.1% ± 2.3%) | 2,706 (-0.0% ± 0.9%) |  |
| sharding-w2 | 18,086 (-1.1% ± 0.9%) | 4,154 (-0.3% ± 0.8%) |  |
| sharding-w8 | 18,839 (-1.5% ± 7.6%) | 3,929 (-1.0% ± 4.2%) |  |
</details>

| benchmark | measure | result | baseline | change | bound |
|---|---|---|---|---|---|
| full_named_cached::having_distinct_limit | alloc_count | 535 | 526 | **+1.75% ± 0.94%** | +0% |

Microbench: 506 of 507 measures within bounds.

<details><summary>Hot code per txn</summary>

| path | base | head | change |
|---|---|---|---|
| pooler | 114.6 KB | 113.8 KB | **-0.8 KB** |
| sharding-w2 | 169.7 KB | 168.4 KB | **-1.2 KB** |

pooler:

| crate | base | head | change |
|---|---|---|---|
| pgdog::frontend::client::query_engine | 20.4 KB | 20.4 KB | +0.0 KB |
| tokio | 18.4 KB | 18.5 KB | +0.1 KB |
| pgdog::backend::pool | 17.8 KB | 17.5 KB | -0.3 KB |
| aws-lc (TLS crypto) | 10.2 KB | 10.1 KB | -0.1 KB |
| rustls (TLS) | 8.4 KB | 8.4 KB | +0.0 KB |
| pgdog::frontend (other) | 8.0 KB | 7.8 KB | -0.2 KB |
| pgdog::backend::server | 7.8 KB | 7.8 KB | +0.0 KB |
| other | 6.0 KB | 5.9 KB | -0.1 KB |
| everything else | 17.6 KB | 17.4 KB | -0.1 KB |

| function | head | change |
|---|---|---|
| `pgdog::frontend::client::Client::run::{{closure}}` | 5.6 KB | -0.1 KB |
| `pgdog::frontend::client::query_engine::query::<impl pgdog::frontend::client::query_engine:` | 5.3 KB | -0.1 KB |
| `pgdog::frontend::client::query_engine::QueryEngine::handle::{{closure}}` | 4.4 KB | +0.2 KB |
| `pgdog::frontend::client::query_engine::query::<impl pgdog::frontend::client::query_engine:` | 3.4 KB | -0.1 KB |
| `tokio::runtime::task::raw::poll` | 3.2 KB | +0.0 KB |

sharding-w2:

| crate | base | head | change |
|---|---|---|---|
| pgdog::frontend::router | 29.4 KB | 29.2 KB | -0.2 KB |
| pgdog::frontend::client::query_engine | 21.8 KB | 21.6 KB | -0.2 KB |
| tokio | 19.0 KB | 18.4 KB | -0.6 KB |
| pgdog::backend::pool | 18.2 KB | 18.1 KB | -0.1 KB |
| aws-lc (TLS crypto) | 13.0 KB | 13.2 KB | +0.2 KB |
| other | 10.3 KB | 10.4 KB | +0.1 KB |
| pgdog::frontend (other) | 8.6 KB | 8.8 KB | +0.2 KB |
| pgdog::backend::server | 8.2 KB | 8.1 KB | -0.1 KB |
| everything else | 41.1 KB | 40.6 KB | -0.5 KB |

| function | head | change |
|---|---|---|
| `pgdog::frontend::client::Client::run::{{closure}}` | 6.2 KB | +0.1 KB |
| `pgdog::frontend::client::query_engine::query::<impl pgdog::frontend::client::query_engine:` | 5.2 KB | -0.1 KB |
| `pgdog::frontend::client::query_engine::QueryEngine::handle::{{closure}}` | 4.1 KB | -0.1 KB |
| `pgdog::frontend::router::parser::query::select::<impl pgdog::frontend::router::parser::que` | 3.8 KB | -0.1 KB |
| `pgdog::frontend::client::query_engine::query::<impl pgdog::frontend::client::query_engine:` | 3.2 KB | +0.0 KB |

</details>

<details><summary>lb flamegraph vs 6b0e24d7</summary>

![lb](https://pgdog-metal-bench.s3.amazonaws.com/results/jk-rails-limit-count-const-return-fix/521afa7e484...)

[Open interactive](https://pgdog-metal-bench.s3.amazonaws.com/results/jk-rails-limit-count-const-return-fix/521afa7e484...) for hover, zoom and search.

![lb removed](https://pgdog-metal-bench.s3.amazonaws.com/results/jk-rails-limit-count-const-return-fix/521afa7e484...)

[Open interactive](https://pgdog-metal-bench.s3.amazonaws.com/results/jk-rails-limit-count-const-return-fix/521afa7e484...).
</details>
<details><summary>microbench flamegraph vs 6b0e24d7</summary>

![microbench](https://pgdog-metal-bench.s3.amazonaws.com/results/jk-rails-limit-count-const-return-fix/521afa7e484...)

[Open interactive](https://pgdog-metal-bench.s3.amazonaws.com/results/jk-rails-limit-count-const-return-fix/521afa7e484...) for hover, zoom and search.

![microbench removed](https://pgdog-metal-bench.s3.amazonaws.com/results/jk-rails-limit-count-const-return-fix/521afa7e484...)

[Open interactive](https://pgdog-metal-bench.s3.amazonaws.com/results/jk-rails-limit-count-const-return-fix/521afa7e484...).
</details>
<details><summary>pooler flamegraph vs 6b0e24d7</summary>

![pooler](https://pgdog-metal-bench.s3.amazonaws.com/results/jk-rails-limit-count-const-return-fix/521afa7e484...)

[Open interactive](https://pgdog-metal-bench.s3.amazonaws.com/results/jk-rails-limit-count-const-return-fix/521afa7e484...) for hover, zoom and search.

![pooler removed](https://pgdog-metal-bench.s3.amazonaws.com/results/jk-rails-limit-count-const-return-fix/521afa7e484...)

[Open interactive](https://pgdog-metal-bench.s3.amazonaws.com/results/jk-rails-limit-count-const-return-fix/521afa7e484...).
</details>
<details><summary>sharding-w2 flamegraph vs 6b0e24d7</summary>

![sharding-w2](https://pgdog-metal-bench.s3.amazonaws.com/results/jk-rails-limit-count-const-return-fix/521afa7e484...)

[Open interactive](https://pgdog-metal-bench.s3.amazonaws.com/results/jk-rails-limit-count-const-return-fix/521afa7e484...) for hover, zoom and search.

![sharding-w2 removed](https://pgdog-metal-bench.s3.amazonaws.com/results/jk-rails-limit-count-const-return-fix/521afa7e484...)

[Open interactive](https://pgdog-metal-bench.s3.amazonaws.com/results/jk-rails-limit-count-const-return-fix/521afa7e484...).
</details>
<details><summary>sharding-w8 flamegraph vs 6b0e24d7</summary>

![sharding-w8](https://pgdog-metal-bench.s3.amazonaws.com/results/jk-rails-limit-count-const-return-fix/521afa7e484...)

[Open interactive](https://pgdog-metal-bench.s3.amazonaws.com/results/jk-rails-limit-count-const-return-fix/521afa7e484...) for hover, zoom and search.

![sharding-w8 removed](https://pgdog-metal-bench.s3.amazonaws.com/results/jk-rails-limit-count-const-return-fix/521afa7e484...)

[Open interactive](https://pgdog-metal-bench.s3.amazonaws.com/results/jk-rails-limit-count-const-return-fix/521afa7e484...).
</details>

<details><summary>Logs</summary>

[lb](https://s3.console.aws.amazon.com/s3/object/pgdog-metal-bench?prefix=results/jk-rails-limit-count-co...), [microbench](https://s3.console.aws.amazon.com/s3/object/pgdog-metal-bench?prefix=results/jk-rails-limit-count-co...), [pooler](https://s3.console.aws.amazon.com/s3/object/pgdog-metal-bench?prefix=results/jk-rails-limit-count-co...), [sharding-w2](https://s3.console.aws.amazon.com/s3/object/pgdog-metal-bench?prefix=results/jk-rails-limit-count-co...), [sharding-w8](https://s3.console.aws.amazon.com/s3/object/pgdog-metal-bench?prefix=results/jk-rails-limit-count-co...), [verdict.json](https://s3.console.aws.amazon.com/s3/object/pgdog-metal-bench?prefix=results/jk-rails-limit-count-co...)
</details>

Compared 521afa7e with 6b0e24d7 on m8g.metal-24xl (spot).


view thread (6+ messages)  latest in thread

Message-ID: <gh-pgdogdev-pgdog-2066-c6991233398@github.com>
Permalink:  ../gh-pgdogdev-pgdog-2066-c6991233398@github.com/

 · 


This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox