Skip to content

Bump PG versions to 17.6, 16.10, 15.14#8142

Merged
naisila merged 4 commits intomainfrom
naisila/bump-pg
Aug 25, 2025
Merged

Bump PG versions to 17.6, 16.10, 15.14#8142
naisila merged 4 commits intomainfrom
naisila/bump-pg

Conversation

@naisila
Copy link
Copy Markdown
Contributor

@naisila naisila commented Aug 20, 2025

@onurctirtir onurctirtir self-requested a review August 21, 2025 07:44
naisila added a commit to citusdata/the-process that referenced this pull request Aug 21, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Aug 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.93%. Comparing base (aaa3137) to head (c6c80de).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8142      +/-   ##
==========================================
+ Coverage   88.90%   88.93%   +0.03%     
==========================================
  Files         287      287              
  Lines       63083    63088       +5     
  Branches     7930     7930              
==========================================
+ Hits        56083    56107      +24     
+ Misses       4693     4673      -20     
- Partials     2307     2308       +1     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@naisila naisila marked this pull request as draft August 22, 2025 11:28
@naisila
Copy link
Copy Markdown
Contributor Author

naisila commented Aug 25, 2025

Ran local tests with PG15 & PG17. No more assertion crashes.

insert_select_into_local_table test
at SELECT alter_table_set_access_method('non_dist_default', 'columnar');
@naisila naisila marked this pull request as ready for review August 25, 2025 12:02
@naisila naisila requested a review from m3hm3t August 25, 2025 12:02
HeapTuple heapTuple = heap_form_tuple(tupleDescriptor, values, isNulls);

CATALOG_INSERT_WITH_SNAPSHOT(pgDistNode, heapTuple);
PushActiveSnapshot(GetTransactionSnapshot());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nitpick:

we may reduce code duplication by similar like

/* maybe under a utils file */
static inline void
CatalogInsertWithTxnSnapshot(Relation rel, HeapTuple tup)
{
    PushActiveSnapshot(GetTransactionSnapshot());
    CatalogTupleInsert(rel, tup);
    PopActiveSnapshot();
}

or more complex but more generic and can be used later as well

#define WITH_TXN_SNAPSHOT(...)                        \
    do {                                              \
        PushActiveSnapshot(GetTransactionSnapshot()); \
        __VA_ARGS__;                                  \
        PopActiveSnapshot();                          \
    } while (0)

WITH_TXN_SNAPSHOT(
    InsertTupleAndEnforceConstraints(modifyState, values, nulls)
);

WITH_TXN_SNAPSHOT(
    CatalogTupleInsert(pgDistTransaction, heapTuple)
);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

@m3hm3t m3hm3t left a comment

Choose a reason for hiding this comment

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

nothing other than a nitpick, thanks

@naisila naisila merged commit ce7ddc0 into main Aug 25, 2025
121 checks passed
@naisila naisila deleted the naisila/bump-pg branch August 25, 2025 12:34
naisila added a commit that referenced this pull request Aug 25, 2025
nulls[Anum_columnar_chunk_maximum_value - 1] = true;
}

PushActiveSnapshot(GetTransactionSnapshot());
Copy link
Copy Markdown
Contributor

@ivan-v-kush ivan-v-kush Oct 14, 2025

Choose a reason for hiding this comment

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

@naisila could you please tell why PushActiveSnapshot/PopActiveSnapshot are inside the loop rather than outside
Is it possible to do it this way to save resources?

	PushActiveSnapshot(GetTransactionSnapshot());
	for (columnIndex = 0; columnIndex < columnCount; columnIndex++)
	{
		for (chunkIndex = 0; chunkIndex < chunkList->chunkCount; chunkIndex++)
		{
			....
			InsertTupleAndEnforceConstraints(modifyState, values, nulls);
			...
		}
		...
	}
	PopActiveSnapshot();

your code:

	for (columnIndex = 0; columnIndex < columnCount; columnIndex++)
	{
		for (chunkIndex = 0; chunkIndex < chunkList->chunkCount; chunkIndex++)
		{
			...
			PushActiveSnapshot(GetTransactionSnapshot());

			InsertTupleAndEnforceConstraints(modifyState, values, nulls);

			PopActiveSnapshot();
			...
		}
		...
	}

Thank you!

naisila pushed a commit that referenced this pull request Oct 31, 2025
In the PR [8142](#8142) was added
`PushActiveSnapshot`.

This commit places it outside a for loop as taking a snapshot is a resource
heavy operation.
colm-mchugh pushed a commit that referenced this pull request Nov 3, 2025
In the PR [8142](#8142) was added
`PushActiveSnapshot`.

This commit places it outside a for loop as taking a snapshot is a resource
heavy operation.
colm-mchugh pushed a commit that referenced this pull request Nov 4, 2025
In the PR [8142](#8142) was added
`PushActiveSnapshot`.

This commit places it outside a for loop as taking a snapshot is a resource
heavy operation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assertion failures on older branches after backpatch of postgres/postgres@706054b — fix needed beyond PG18

4 participants