Conversation
outtersg
force-pushed
the
gh-15287-columnmeta
branch
from
September 24, 2026 18:07
d8bf744 to
3486d20
Compare
…lumnMeta() - each call queried the DB to know the name associated with the table's OID: cache the result between two calls - make pdo_pgsql_translate_oid_to_table higher-level, with the last parameter being the handle instead of the raw connection; thus the statement is cleaner, letting the handle do all memory handling on the table oid-to-name translation cache (which by the way is a driver feature more than a statement one)
outtersg
force-pushed
the
gh-15287-columnmeta
branch
2 times, most recently
from
September 24, 2026 21:47
b686801 to
14e94b7
Compare
outtersg
added a commit
to outtersg/guili
that referenced
this pull request
Sep 24, 2026
= Ajout des dernières corrections envoyées sur php/php-src#23892. darcs-hash:0639e883821678f8f19a4670d86874658e2ba925
This was referenced Sep 25, 2026
Member
|
there are mix of fixes and cache improvements (thus should target different branches) but I ll have a better look this week end. Cheers ! |
…ment we shall test if *the last statement* was lazy, not if the *new one* will
doing an (internal) query to fetch metadata from the server broke the currently-running (user) query
phpGH-23065 fixed running_stmt being only conditionally cleared in pgsql_stmt_finish(), by clearing it from the different callers of pgsql_stmt_finish(); put the clearing back into pgsql_stmt_finish(), albeit this time with the right condition to have all callers satisfied.
outtersg
force-pushed
the
gh-15287-columnmeta
branch
from
September 25, 2026 09:32
14e94b7 to
9e25189
Compare
Contributor
Author
|
@devnexen wrote:
Thanks for the look! Now we have:
Tell me your preferred way of handling each part, so that I'll refactor the PR before you can comfortably review them. |
Member
|
To summarize, the cleanup part (pt 4) and the cache (pt 1) -> master, the rest -> 8.5 |
This was referenced Sep 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As stated in the UPGRADING, using the passthrough ("single-row") mode of libpq (introduced in #15287) forbids passing a new query while the current one's results have not been entirely consumed.
… But I didn't notice that ext/pdo_pgsql internally used new queries to fetch metadata (example use case: a call to getColumnMeta() while fetch()ing row by row will interleave the getColumnMeta()-triggered internal query to the database, with the results fetching for the user-called query).
This PR:
getColumnMeta()from interfering with an unbuffered user queryby returning an empty value for every metadata that would emit an internal query, thus breaking
libpqinner workingsgetColumnMeta()won't call the database 30 timesThis is a second take to #16249; compared to it:
thanks to a rebasing on the latest master which includes fixes from ext/pdo_pgsql: Fix several lazy fetch defects #23065 (and maybe Introduce php_pdo_stmt_valid_db_obj_handle() #17567 too?)
getColumnMeta()only:This can be done on a call-by-call basis, as did in fact @KentarouTakeda for
COPYin the aforementioned PROf course I'd feel more comfortable if there was a way to run the full CI chain before merging: any hint from GH rgulars?