Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhmnieuwenhuis created an issue. See original summary.

cilefen’s picture

“It does not run” is not very descriptive. The subsystem maintainers will like more detail. See #2564307: [meta] Remaining Drupal 10/11 PostgreSQL issues

jhmnieuwenhuis’s picture

FileSize
13.65 KB

Hi, 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.

cilefen’s picture

Component: database system » postgresql db driver
jhmnieuwenhuis’s picture

In 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)

jhmnieuwenhuis’s picture

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

x0r1x’s picture

Priority: Normal » Major
FileSize
67.74 KB

After 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%')

cilefen’s picture

Title: Drupal 8.8 on Postgresql 12beta1 » Drupal 8.8 on Postgresql 12

I duplicated #3094738: Drupal 8 & Postgresql 12 on to this.

andypost’s picture

There's docs to replace adsrc http://www.postgresql.cn/docs/11/catalog-pg-attrdef.html

The adsrc field is historical, and is best not used, because it does not track outside changes that might affect the representation of the default value. Reverse-compiling the adbin field (with pg_get_expr for example) is a better way to display the default value.

The problem is that this field used to detect sequences for columns

hubaishan’s picture

Title: Drupal 8.8 on Postgresql 12 » Drupal 8.7.x on Postgresql 12
Version: 8.9.x-dev » 8.7.10
Issue tags: +Installation error

The bug is in all 8.7.x not a new bug in 8.8.x or 8.9.x

andypost’s picture

Title: Drupal 8.7.x on Postgresql 12 » Drupal 8.x on Postgresql 12
Version: 8.7.10 » 8.9.x-dev
daffie’s picture

Can somebody other then the patch author confirm that the patch fixes the problem?

qdelance’s picture

I 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.

daffie’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs manual testing

I 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.

puddyglum’s picture

We ran into this issue after upgrading to PostgreSQL 12.1, and the patch worked for us. Thank you!

rayfun’s picture

So 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.

lamigo’s picture

I upgraded to PG12 and all worked fine after applying patch. Thank you!

cilefen’s picture

@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.

catch’s picture

xekon’s picture

none

xekon’s picture

none

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

I'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!

  • alexpott committed 2dfe5f5 on 9.0.x
    Issue #3058853 by hubaishan, jhmnieuwenhuis, x0r1x, daffie, xekon,...

  • alexpott committed 027a83b on 8.9.x
    Issue #3058853 by hubaishan, jhmnieuwenhuis, x0r1x, daffie, xekon,...

  • alexpott committed 0c42728 on 8.8.x
    Issue #3058853 by hubaishan, jhmnieuwenhuis, x0r1x, daffie, xekon,...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.