Problem/Motivation
As of September 2015 we have all tests passing the PostgreSQL CI bot (yay!). However, there are still some open issues around that should be fixed in terms of performance, security and for contrib land. As a first start here is the list of open issues copied over from #2157455: [Meta] Make Drupal 8 work with PostgreSQL or remove support from core before release.
Bugs:
- #2057693: PostgreSQL orderBy method adds fields it doesn't need to, leading to fatal errors when the result is used as an insert subquery
- #2238253: Add bindValue to a PDO::PARAM_* type in database query arguments
- #571548: Identifiers longer than 63 characters are truncated, causing Views to break on Postgres
- #3079534: Views JOIN condition fails in PostgreSQL when comparing entity identifiers of different datatypes
Performance issues:
- #2464481: PostgreSQL: deal with case insensitivity
- #2988018: [PP-1] Performance issues with path alias generated queries on PostgreSQL
- #3359406: Postgres: Sorting NULL values causes performance degradation
- #2491989: [PP-1] Use the 'uuid' database schema type (with native PostgreSQL implementation) for UUID fields
Security issues:
- none!
Feature request:
- #1326848: PostgreSQL: Add support for natural joins
- #2491989: [PP-1] Use the 'uuid' database schema type (with native PostgreSQL implementation) for UUID fields
- #710940: Support for BINARY and VARBINARY in Database Schema
Other issues:
- #2569365: Install fails with PostgreSQL if "bytea_output" value is equal to "hex"
- #1072322: Figure out what to do with string concats
- #2426579: Change method name for pgsql driver's ensureIdentifiersLength() to accurately describe what the method is doing
- #2920527: Postgres driver issue with nested savepoints mimic_implicit_commit duplicated
- #3222157: Database dump for Automated Update Tests compatible with PostgreSQL
Done:
- #2010368: Installer can't create new database on PostgreSQL
- #2472709: PostgreSQL: Support JSON data type
- #3358609: Fix PostgreSQL column name escaping in field constraints
- #1148856: Postgres schema doesn't support keylength on a unique index
- #1060476: Multiple issues when PostgreSQL is used with non-public schema
- #2552547: Migrate fails to build the map on PostgreSQL
- #2350791: Link, Boolean, Email field tests attempt to query integer entity id with strings such as "manage" or "structure"
- #2509296: PostgreSQL: Re-think current PDO::ATTR_EMULATE_PREPARES setting
- #2489672: Limit all DB drivers to executing single statements by checking for delimiter
- #2565529: Postgres standard_conforming_strings - should it be on or off?
- #2477853: PostgreSQL: Add support for reserved field/column names
- #1079762: DatabaseSchema_pgsql::queryTableInformation() is slow
- #2850684: Default Database Schema::fieldExists() is slow for PostgreSQL
- #2921665: PostgreSQL: Optimize getting maxIdentifierLength
- #2921855: Default Database Schema::findTables() is slow for PostgreSQL
Comments
Comment #2
bzrudi71 commentedComment #3
bzrudi71 commentedComment #4
bzrudi71 commentedComment #5
bzrudi71 commentedHousecleaning and some new issues.
Comment #7
daffie commented#2057693: PostgreSQL orderBy method adds fields it doesn't need to, leading to fatal errors when the result is used as an insert subquery is ready for a good review.
Comment #9
joelpittetComment #10
bzrudi71 commentedHousecleaning
Comment #11
bzrudi71 commentedRemoving #1349080: node_access filters out accessible nodes when node is left joined from list as it's not really PostgreSQL specific...
Comment #12
daffie commentedComment #14
daffie commentedAdded issue #2850684: Default Database Schema::fieldExists() is slow for PostgreSQL. The testbot finishes with this patch a lot faster:
Comment #16
rosk0Added #2921665: PostgreSQL: Optimize getting maxIdentifierLength.
Comment #17
daffie commentedAdded #2921855: Default Database Schema::findTables() is slow for PostgreSQL.
Comment #18
rosk0Comment #21
bzrudi71 commentedAdded #2988018: [PP-1] Performance issues with path alias generated queries on PostgreSQL and some housekeeping...
Comment #22
bzrudi71 commented#2921665: PostgreSQL: Optimize getting maxIdentifierLength is is committed - moved out of todo :)
Comment #23
bzrudi71 commented#2921855: Default Database Schema::findTables() is slow for PostgreSQL was committed.
Comment #24
qproIs this issue related to any of the listed here?
#3018025: Views aggregation functions SUM, AVERAGE and STDDEV_POP causes "Undefined function error" when are used in some fields in postgresql
Comment #25
rosk0Added #3018025: Views aggregation functions SUM, AVERAGE and STDDEV_POP causes "Undefined function error" when are used in some fields in postgresql.
Comment #27
cilefen commentedComment #28
rosk0Adding #2920527: Postgres driver issue with nested savepoints mimic_implicit_commit duplicated into "Other issues".
Comment #29
andypostI bet nobody has
??operator cos this will be issue with php 7.4 https://wiki.php.net/rfc/pdo_escape_placeholdersComment #32
andypostPostgresql 13 released https://www.postgresql.org/about/news/2077/
Comment #33
badrange commentedShould we rename this issue to "Remaining Drupal 9 issues"? It will make the issue seem more up to date than referencing Drupal 8.
Comment #35
andypostComment #36
m.stenta+1 to @badrange's suggestion. Renaming to "[meta] Remaining Drupal 8/9 PostgreSQL issues".
Comment #38
penyaskitoAside of case insensitivity, handled in #2464481: PostgreSQL: deal with case insensitivity, is there any issue created for handling with "unaccent" for parity with MySQL?
Comment #39
guignonvComment #40
rosk0Adding #571548: Identifiers longer than 63 characters are truncated, causing Views to break on Postgres to the bug list.
Comment #42
orkutmuratyilmazComment #43
orkutmuratyilmazComment #44
orkutmuratyilmazSorry for the notifications you have received since last Friday. I've thought that I've found a bug, but after checking later, I understood that I haven't.
Thanks a lot for the contributions you've been doing.
Comment #47
andypostCore 8 no longer supported, also filed #3315265: Improve support of native MERGE with RETURNING merge_action()
Comment #48
m.stentaI just opened this issue - curious if it should be added to the list, or closed as "works as designed"... still understanding it... if anyone here has experience or knowledge it would be welcome!
#3318915: PostgreSQL errors: duplicate key value violates unique constraint (key_value____pkey and semaphore____pkey)
Comment #49
xurizaemonFor Postgres-backed sites, I see an SQL error triggered when accessing a path with entity IDs in the range
2147483648to9223372036854776832(eg/node/{id},/user/{id},/taxonomy/term/{id}...). A 404 should be returned when the entity ID does not exist, and is correctly returned when the ID is not in that range OR the site is not postgres-backed.#3327520: Postgres error 500 on paths when supplied entity ID gte 2147483647 and lte 9223372036854776832 has details and a test which I believe shows the incorrect behaviour; test has failed (as expected) on pgsql and passed on mysql (tested postgres, mysql and sqlite locally).
Comment #50
daffie commentedRemoved #1148856: Postgres schema doesn't support keylength on a unique index from the list.
Comment #51
daffie commentedI wanted to remove #3327520: Postgres error 500 on paths when supplied entity ID gte 2147483647 and lte 9223372036854776832 from the list.
Comment #52
daffie commentedRemoved #3018025: Views aggregation functions SUM, AVERAGE and STDDEV_POP causes "Undefined function error" when are used in some fields in postgresql from the list as it is not related to PostgreSQL. They are trying to SUM on a string field. It is a views bug.
Comment #53
chi commentedAdded a couple relevant issues
Comment #54
user654 commented.
Comment #56
daffie commented@pinkonomy: Any help with getting the PostgreSQL issues fixed will be greatly appreciated. So, please help. I will help by reviewing the patches/MR.
Comment #57
andypostComment #58
orkutmuratyilmaz@pinkonomy, I've seen this in #ai channel.
By the way, there is no #postgresql channel on https://drupal.org/slack and I think that we need one:)
Comment #59
orkutmuratyilmazCan we add this issue to the list?
Comment #60
liam morlandAdd #3079534: Views JOIN condition fails in PostgreSQL when comparing entity identifiers of different datatypes.
Comment #61
liam morlandComment #62
quietone commentedMove completed items to "done' section.
Comment #63
andypostI gonna upgrade CI docker images to latest 15.6/16.2 follow #3421217: Upgrade Postgresql 15.6/16/2
Comment #65
steinmb commentedAdding #2491989: [PP-1] Use the 'uuid' database schema type (with native PostgreSQL implementation) for UUID fields