Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
Tried to run drupal 8.7 on Postgresql 12beta1.
It does not run, is version 12 supported ?
Regards,
Comments
Comment #2
cilefen CreditAttribution: cilefen at Institute for Advanced Study 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 CreditAttribution: 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 CreditAttribution: cilefen at Institute for Advanced Study commentedComment #5
jhmnieuwenhuis CreditAttribution: 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 CreditAttribution: jhmnieuwenhuis commentedhttps://www.postgresql.org/docs/devel/release-12.html
Comment #8
x0r1x CreditAttribution: x0r1x as a volunteer and 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 CreditAttribution: daffie commentedAdded #3007424: Multiple usages of FieldPluginBase::getEntity do not check for NULL, leading to WSOD.
Comment #10
cilefen CreditAttribution: cilefen commentedI duplicated #3094738: Drupal 8 & Postgresql 12 on to this.
Comment #11
andypostThere's docs to replace
adsrc
http://www.postgresql.cn/docs/11/catalog-pg-attrdef.htmlThe problem is that this field used to detect sequences for columns
Comment #12
hubaishan CreditAttribution: hubaishan commentedComment #13
hubaishan CreditAttribution: hubaishan as a volunteer 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 CreditAttribution: daffie commentedCan somebody other then the patch author confirm that the patch fixes the problem?
Comment #16
qdelance CreditAttribution: 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 CreditAttribution: 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.adsrc
has 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 CreditAttribution: 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 CreditAttribution: lamigo as a volunteer commentedI upgraded to PG12 and all worked fine after applying patch. Thank you!
Comment #21
cilefen CreditAttribution: 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 CreditAttribution: xekon commentednone
Comment #24
xekon CreditAttribution: 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!