Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add assertion flag to assert-only variables #6813

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/chunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -3389,7 +3389,7 @@ ts_chunk_set_name(Chunk *chunk, const char *newname)
{
FormData_chunk form;
ItemPointerData tid;
bool found = lock_chunk_tuple(chunk->fd.id, &tid, &form);
bool found PG_USED_FOR_ASSERTS_ONLY = lock_chunk_tuple(chunk->fd.id, &tid, &form);
Assert(found);

namestrcpy(&form.table_name, newname);
Expand All @@ -3403,7 +3403,7 @@ ts_chunk_set_schema(Chunk *chunk, const char *newschema)
{
FormData_chunk form;
ItemPointerData tid;
bool found = lock_chunk_tuple(chunk->fd.id, &tid, &form);
bool found PG_USED_FOR_ASSERTS_ONLY = lock_chunk_tuple(chunk->fd.id, &tid, &form);
Assert(found);

namestrcpy(&form.schema_name, newschema);
Expand Down Expand Up @@ -3484,7 +3484,7 @@ ts_chunk_clear_status(Chunk *chunk, int32 status)

FormData_chunk form;
ItemPointerData tid;
bool found = lock_chunk_tuple(chunk->fd.id, &tid, &form);
bool found PG_USED_FOR_ASSERTS_ONLY = lock_chunk_tuple(chunk->fd.id, &tid, &form);
Assert(found);

/* applying the flags after locking the metadata tuple */
Expand Down Expand Up @@ -3515,7 +3515,7 @@ ts_chunk_add_status(Chunk *chunk, int32 status)
}
FormData_chunk form;
ItemPointerData tid;
bool found = lock_chunk_tuple(chunk->fd.id, &tid, &form);
bool found PG_USED_FOR_ASSERTS_ONLY = lock_chunk_tuple(chunk->fd.id, &tid, &form);
Assert(found);

/* Somebody could update the status before we are able to lock it so check again */
Expand Down Expand Up @@ -3563,7 +3563,7 @@ ts_chunk_set_compressed_chunk(Chunk *chunk, int32 compressed_chunk_id)

FormData_chunk form;
ItemPointerData tid;
bool found = lock_chunk_tuple(chunk->fd.id, &tid, &form);
bool found PG_USED_FOR_ASSERTS_ONLY = lock_chunk_tuple(chunk->fd.id, &tid, &form);
Assert(found);

/* Somebody could update the status before we are able to lock it so check again */
Expand Down Expand Up @@ -3611,7 +3611,7 @@ ts_chunk_clear_compressed_chunk(Chunk *chunk)

FormData_chunk form;
ItemPointerData tid;
bool found = lock_chunk_tuple(chunk->fd.id, &tid, &form);
bool found PG_USED_FOR_ASSERTS_ONLY = lock_chunk_tuple(chunk->fd.id, &tid, &form);
Assert(found);

/* Somebody could update the status before we are able to lock it so check again */
Expand Down
Loading