diff --git a/src/backend/lib/dshash.c b/src/backend/lib/dshash.c
index 5dbd0c4..fd1763e 100644
--- a/src/backend/lib/dshash.c
+++ b/src/backend/lib/dshash.c
@@ -315,7 +315,7 @@ dshash_destroy(dshash_table *hash_table)
 	ensure_valid_bucket_pointers(hash_table);
 
 	/* Free all the entries. */
-	size = 1 << hash_table->size_log2;
+	size = UINT64CONST(1) << hash_table->size_log2;
 	for (i = 0; i < size; ++i)
 	{
 		dsa_pointer item_pointer = hash_table->buckets[i];
@@ -676,7 +676,7 @@ resize(dshash_table *hash_table, size_t new_size_log2)
 	dsa_pointer new_buckets_shared;
 	dsa_pointer *new_buckets;
 	size_t		size;
-	size_t		new_size = 1 << new_size_log2;
+	size_t		new_size = UINT64CONST(1) << new_size_log2;
 	size_t		i;
 
 	/*
@@ -710,7 +710,7 @@ resize(dshash_table *hash_table, size_t new_size_log2)
 	 * We've allocate the new bucket array; all that remains to do now is to
 	 * reinsert all items, which amounts to adjusting all the pointers.
 	 */
-	size = 1 << hash_table->control->size_log2;
+	size = UINT64CONST(1) << hash_table->control->size_log2;
 	for (i = 0; i < size; ++i)
 	{
 		dsa_pointer item_pointer = hash_table->buckets[i];
