| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| Add PostgreSQL support to HitCounters | mediawiki/extensions/HitCounters | master | +22 -8 |
Details
| Status | Subtype | Assigned | Task | |
|---|---|---|---|---|
| · · · | ||||
| Invalid | None | T2384 [REPLACED BY TAG] PostgreSQL/pgsql support (tracking) | ||
| Resolved | Jjanes | T110655 Extension HitCounters: Add PostgreSQL support | ||
| Resolved | Kghbln | T109180 HitCounters doesn't update new Page IDs | ||
| · · · |
Event Timeline
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?
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)
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 %
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
Affirmative. I think this issue is hidden somewhere in one of the other issues opened for this extension.
Change 288341 merged by jenkins-bot:
[mediawiki/extensions/HitCounters@master] Add PostgreSQL support to HitCounters
Oops. Well, thank you @Jjanes and everyone involved here. Great collaboration, I'd say!