Page MenuHomePhabricator

Update.php fails with postgres due to ip_changes population
Closed, ResolvedPublic3 Story Points

Description

Running update.php I get "Error: 42P01 ERROR: relation "ip_changes" does not exist"

I don't see a /postgres patch for that table.

We should also make sure the code fails gracefully if the table doesn't exist.

Event Timeline

aaron created this task.Oct 2 2017, 9:58 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 2 2017, 9:58 PM
Reedy added subscribers: MusikAnimal, Reedy.

From T163562, CC @MusikAnimal

We should probably make the populateIpChanges.php script fail more gracefully if the table doesn't exist (as a safeguard).

But a patch for postgres should probably be made

This should go out with MW 1.30. I can make the script fail gracefully, but I do not have a lot of experience with Postgres and am not sure what the schema should look like.

Reedy added a comment.Nov 6 2017, 7:41 PM

This should go out with MW 1.30. I can make the script fail gracefully, but I do not have a lot of experience with Postgres and am not sure what the schema should look like.

Wanna make the patch for master to do this safeguard, and we'll get it backported as a minimum?

As for making a pg db patch... Look at the mysql schema, see what tables already in core have the same/similar type, and match the column in the pg schema file to make something similar :)

Sure, I'll get a patch out soon! Going to add this to our sprint

kaldari updated the task description. (Show Details)Nov 8 2017, 12:15 AM
kaldari set the point value for this task to 3.

Change 391058 had a related patch set uploaded (by MusikAnimal; owner: MusikAnimal):
[mediawiki/core@master] Add SQL for postgres, and fail gracefully in populateIpChanges

https://gerrit.wikimedia.org/r/391058

The postgres SQL is untested!

Change 392673 had a related patch set uploaded (by Reedy; owner: MusikAnimal):
[mediawiki/core@REL1_30] Add SQL for postgres, and fail gracefully in populateIpChanges

https://gerrit.wikimedia.org/r/392673

Change 392673 merged by jenkins-bot:
[mediawiki/core@REL1_30] Add SQL for postgres, and fail gracefully in populateIpChanges

https://gerrit.wikimedia.org/r/392673

Change 391058 merged by jenkins-bot:
[mediawiki/core@master] Add SQL for postgres, and fail gracefully in populateIpChanges

https://gerrit.wikimedia.org/r/391058

Reedy closed this task as Resolved.Nov 29 2017, 1:08 AM
Reedy assigned this task to MusikAnimal.
Reedy removed a project: Patch-For-Review.

Change 394145 had a related patch set uploaded (by Reedy; owner: Reedy):
[mediawiki/core@master] Add ip_changes to postgres/tables.sql

https://gerrit.wikimedia.org/r/394145

Change 394154 had a related patch set uploaded (by Reedy; owner: Reedy):
[mediawiki/core@REL1_30] Add ip_changes to postgres/tables.sql

https://gerrit.wikimedia.org/r/394154

Change 394145 merged by jenkins-bot:
[mediawiki/core@master] Add ip_changes to postgres/tables.sql

https://gerrit.wikimedia.org/r/394145

Change 394154 merged by jenkins-bot:
[mediawiki/core@REL1_30] Add ip_changes to postgres/tables.sql

https://gerrit.wikimedia.org/r/394154

DannyH moved this task from Untriaged to Archive on the Community-Tech board.Dec 19 2017, 1:12 AM