Hi,
Tried to run drupal 8.7 on Postgresql 12beta1.
It does not run, is version 12 supported ?
Regards,

| Comment | File | Size | Author |
|---|---|---|---|
| #12 | issue3094738.patch | 698 bytes | hubaishan |
Hi,
Tried to run drupal 8.7 on Postgresql 12beta1.
It does not run, is version 12 supported ?
Regards,

| Comment | File | Size | Author |
|---|---|---|---|
| #12 | issue3094738.patch | 698 bytes | hubaishan |
Comments
Comment #2
cilefen commented“It does not run” is not very descriptive. The subsystem maintainers will like more detail. See #2564307: [meta] Remaining Drupal 10/11 PostgreSQL issues
Comment #3
jhmnieuwenhuis commentedHi, You are right.
Some more info. :
First of all when I open a 12beta1 database in pgadmin4 ( 4.7 ) i get a warning :
Error retrieving data from the server : Internal Server Error
string indices must be integers
This is a known error in the error list of pgadmin4
Then when I create a new drupal site using the script I always use :
#!/bin/bash
psqluser="hn"
psqlpass="Bumper&"
psqldb="prrls-tst"
pgserver=prrls-mstr-pgsql
accountname=drupaluserone
accountpass=ArnoldRieki1928\&
accountmail=jhmnieuwenhuis@gmail.com
sitemail=jhmnplok@gmail.com
sitename=prrlstst
syncdir="/var/www/html/prrls-tst/baseconfigdr8.8.x"
./vendor/bin/drush site-install config_installer \
--db-url=pgsql://${psqluser}:${psqlpass}@${pgserver}/${psqldb} \
--account-name="${accountname}" \
--account-pass="${accountpass}" \
--account-mail="${accountmail}" \
--site-mail="${sitemail}" \
--site-name="${sitename}" \
--debug \
--yes \
config_installer_sync_configure_form.sync_directory=${syncdir} \
install_configure_form.date_default_timezone="Europe/Amsterdam" \
install_configure_form.site_default_country="NL"
The installation fails.
See attached file for debug info from drush.
Comment #4
cilefen commentedComment #5
jhmnieuwenhuis commentedIn the postgresql 12 release note's the removal of column pg_attrdef.adsrc is mentioned ( among others )
==> Remove obsolete pg_attrdef.adsrc column (Peter Eisentraut)
Comment #6
jhmnieuwenhuis commentedhttps://www.postgresql.org/docs/devel/release-12.html
Comment #8
x0r1x commentedAfter PG upgrade to v12.0 I have got error with Drupal 8.7.9
In PG-12 pg_attrdef.adsrc was removed and Drupal only partially implemented code change
In /core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php line 29 should be:
OR /*pg_attrdef.adsrc*/ pg_get_expr(pg_attrdef.adbin, pg_attribute.attrelid) LIKE 'nextval%')Comment #9
daffie commentedAdded #3007424: Multiple usages of FieldPluginBase::getEntity do not check for NULL, leading to WSOD.
Comment #10
cilefen commentedI duplicated #3094738: Drupal 8 & Postgresql 12 on to this.
Comment #11
andypostThere's docs to replace
adsrchttp://www.postgresql.cn/docs/11/catalog-pg-attrdef.htmlThe problem is that this field used to detect sequences for columns
Comment #12
hubaishan commentedComment #13
hubaishan commentedThe bug is in all 8.7.x not a new bug in 8.8.x or 8.9.x
Comment #14
andypostComment #15
daffie commentedCan somebody other then the patch author confirm that the patch fixes the problem?
Comment #16
qdelance commentedI just installed Drupal 8.8.0 using composer (drupal/recommended-project template) in a Docker environment using a postgres:12 container and got errors during the installer.
Applying the patch fixes the problem.
Comment #17
daffie commentedI have not tested the patch myself. However the patch has been manual tested by @qdelance. Thanks for that.
The testbot for PostgreSQL 9.1 is green.
The table column
pg_attrdef.adsrchas been removed by PostgreSQL in version 12. See: https://www.postgresql.org/docs/current/catalog-pg-attrdef.html.In the manual for that table is solution given how to use an other column. That solution has been used.
To me the patch is RTBC.
Comment #18
puddyglumWe ran into this issue after upgrading to PostgreSQL 12.1, and the patch worked for us. Thank you!
Comment #19
rayfun commentedSo what's going to happen here now? If I understand correctly Drupal core does not work with the latest, stable release of PostgreSQL 12.
Of course I can apply that working patch from above after each update of core but that's going to be quite a pain.
Comment #20
lamigo commentedI upgraded to PG12 and all worked fine after applying patch. Thank you!
Comment #21
cilefen commented@rayfun This is an open issue that is neither yet committed nor released. Yes, you must apply the patch to use PG12 with Drupal 8. I advise using a patching system.
Comment #22
catchI've opened #3104007: Postgresql 12 DrupalCI environment needed for core testing.
Comment #23
xekon commentednone
Comment #24
xekon commentednone
Comment #25
alexpottI've credited everyone who tested this patch and reported success. Whilst I don't think we can declare postgres12 compatibility till we have DrupalCI testing on Postgres12 if we don't commit this bugfix then we can't run the tests at all. So committing and hopefully any other bugs will be reported to the issue queues. Thanks everyone.
Backporting to 8.8.x since this is a low risk bugfix.
Committed and pushed 2dfe5f52c2 to 9.0.x and 027a83b882 to 8.9.x and 0c427287be to 8.8.x. Thanks!