Page MenuHomePhabricator

Extension HitCounters: Add PostgreSQL support
Open, Needs TriagePublic

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

Kghbln created this task.Aug 28 2015, 8:55 AM
Kghbln updated the task description. (Show Details)
Kghbln raised the priority of this task from to Needs Triage.
Kghbln added a subscriber: Kghbln.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 28 2015, 8:55 AM
Jjanes added a subscriber: Jjanes.Aug 28 2015, 11:14 PM

It seems like every extension has implemented database-depend table creation in a different way.

Is there some exemplar extension showing the preferred/best way to do it?

saper renamed this task from Add PostgreSQL support to Extension HitCounters: Add PostgreSQL support.Aug 31 2015, 7:57 PM
saper set Security to None.

You can have a look at my change https://gerrit.wikimedia.org/r/#/c/98353/ to VoteNY.

I've had a brief look at HitCounters and I think it tries to overcomplicate things in order to avoid
some MySQL issues. For PostgreSQL it could be probably much simpler.

To create a proper table for this extension one needs to understand this: http://git.wikimedia.org/blob/mediawiki%2Fextensions%2FHitCounters.git/f29d4e370dfb25844fc320c3f20712f07b0efa1e/ViewCountUpdate.php;jsessionid=dgzex25xwojg197eydhgpym98#L50 and this: http://git.wikimedia.org/blob/mediawiki%2Fextensions%2FHitCounters.git/f29d4e370dfb25844fc320c3f20712f07b0efa1e/ViewCountUpdate.php;jsessionid=dgzex25xwojg197eydhgpym98#L104

I think this code can be actually simplified for PostgreSQL so such elaborate dancing is not really necessary.

Maybe @MarkAHershberger can tune in and shed some light onto this? (I know this was extracted from core in T34789 and T74420)

Is there some exemplar extension showing the preferred/best way to do it?

I don't know of one, but this would be a very good thing to address.

Looking at saper's code, I would recommend that .sql be the extension for mysql (since MySQL and SQLite tend to share it and MySQL is WMF's default target.

Otherwise, I think this would be a great topic for discussion at this week's stakeholders' meeting.

I guess T109180 should be done first to make sure that MySQL is at least working 100 %

Restricted Application added a subscriber: StudiesWorld. · View Herald TranscriptNov 7 2015, 12:51 PM

The dropping of column page.page_counter was added to all the database updater scripts for 1.25, but then the dropping was taken out just for MySQL and put back in for 1.26.

It seems to me that that makes it impossible to update a pre 1.25 installation without losing the hit count values for any database other than MySQL. Does that sound correct?

Even for MySQL, it seems like you can't go from one LTS to another (1.23 to 1.27) without stopping at an EOL'ed version in between.

Change 288341 had a related patch set uploaded (by Jjanes):
Add PostgreSQL support to HitCounters

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

Even for MySQL, it seems like you can't go from one LTS to another (1.23 to 1.27) without stopping at an EOL'ed version in between.

Affirmative. I think this issue is hidden somewhere in one of the other issues opened for this extension.

Jdforrester-WMF added a subscriber: Jdforrester-WMF.

Migrating from the old tracking task to a tag for PostgreSQL-related tasks.