Skip to content

Commit

Permalink
Another place where refcnt in the COL_INFO object is unfortunately (#55)
Browse files Browse the repository at this point in the history
erased.

Signed-off-by: Alexandr Kuznetsov <[email protected]>
  • Loading branch information
progmachine authored Sep 28, 2024
1 parent 0777199 commit ab76a10
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions descriptor.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ void TI_ClearObject(TABLE_INFO *ti)
MYLOG(0, "!!!refcnt %p:%d -> %d\n", coli, coli->refcnt, coli->refcnt - 1);
coli->refcnt--;
if (coli->refcnt <= 1 && 0 == coli->acc_time) /* acc_time == 0 means the table is dropped */
{
Int2 tmp_refcnt = coli->refcnt; /* If refcnt is still above 0, we must save it. */
free_col_info_contents(coli); /* Now coli object is unused, and may be reused later. */
coli->refcnt = tmp_refcnt;
}
if (coli->refcnt <= 0)
{
/* Last reference to coli object disappeared. Now destroying it. */
Expand Down

1 comment on commit ab76a10

@progmachine
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still think we must make 16.0.7 bugfix release. At least one LTS distro, Ubuntu 2024.4 is using 16 release of postgresql and psqlodbc, and they will likely stick to 16 release branch of both of them.

Please sign in to comment.