Defect #4259

Activity feed does not show all changeset activity

Added by Brad Langhorst about 13 years ago. Updated about 13 years ago.

Status:ClosedStart date:2009-11-20
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Resolution:Invalid Affected version:


I think it only shows the first commit from the first day in the time window

I think this may be a bug in postgres

Here's the relevant query:

SELECT "changesets"."id" AS t0_r0
LEFT OUTER JOIN "repositories" ON "repositories".id = "changesets".repository_id 
LEFT OUTER JOIN "projects" ON "projects".id = "repositories".project_id 
inner join enabled_modules em on = 'repository' and = em.project_id
(1=1 AND changesets.committed_on BETWEEN '2009-10-22' AND '2009-11-21')
AND (( = 1 OR (projects.lft > 1 AND projects.rgt < 2))) 
AND (projects.status=1 )
--AND in (SELECT em.project_id FROM enabled_modules em WHERE'repository')

I get the correct number of lines (146 in my database) if I use an inner join to limit the projects to those where the repository is enabled.

If however, I use the subquery that is written by the redmine code, I get only 1 line (commented out here)

I know that pg 8.4 did some optimizations with subqueries
I'm running postgresql-8.4 (8.4.0-2) from debian.

this is with a recent checkout of 0.9pre


#1 Updated by Jean-Philippe Lang about 13 years ago

Found this in the postgres 8.4.1 release notes:

Fix several errors in planning of semi-joins (Tom)
These led to wrong query results in some cases where IN or EXISTS was used together with another join.

It may be related to your problem with 8.4.0.

#2 Updated by Brad Langhorst about 13 years ago

I can confirm that this is fixed in 8.4.1, but I think you probably want to put something into the release notes or requirements docs before closing this bug out....

#3 Updated by Jean-Philippe Lang about 13 years ago

  • Status changed from New to Closed
  • Resolution set to Invalid

Note added on RedmineInstall. Thanks for the feedback.

Also available in: Atom PDF