@@ -892,25 +892,25 @@ tsl_create_compressed_chunk(PG_FUNCTION_ARGS)
892892Datum
893893tsl_compress_chunk (PG_FUNCTION_ARGS )
894894{
895- Oid uncompressed_chunk_id = PG_ARGISNULL (0 ) ? InvalidOid : PG_GETARG_OID (0 );
895+ Oid uncompressed_relid = PG_ARGISNULL (0 ) ? InvalidOid : PG_GETARG_OID (0 );
896896 bool if_not_compressed = PG_ARGISNULL (1 ) ? true : PG_GETARG_BOOL (1 );
897897 bool recompress = PG_ARGISNULL (2 ) ? false : PG_GETARG_BOOL (2 );
898898
899899 ts_feature_flag_check (FEATURE_HYPERTABLE_COMPRESSION );
900900
901901 TS_PREVENT_FUNC_IF_READ_ONLY ();
902- Chunk * chunk = ts_chunk_get_by_relid (uncompressed_chunk_id , true);
902+ Chunk * chunk = ts_chunk_get_by_relid (uncompressed_relid , true);
903903 ts_hypertable_permissions_check (chunk -> hypertable_relid , GetUserId ());
904904
905- uncompressed_chunk_id = tsl_compress_chunk_wrapper (chunk , if_not_compressed , recompress );
905+ uncompressed_relid = tsl_compress_chunk_wrapper (chunk , if_not_compressed , recompress );
906906
907- PG_RETURN_OID (uncompressed_chunk_id );
907+ PG_RETURN_OID (uncompressed_relid );
908908}
909909
910910Oid
911911tsl_compress_chunk_wrapper (Chunk * chunk , bool if_not_compressed , bool recompress )
912912{
913- Oid uncompressed_chunk_id = chunk -> table_id ;
913+ Oid uncompressed_relid = chunk -> table_id ;
914914
915915 if (ts_chunk_is_frozen (chunk ))
916916 {
@@ -920,14 +920,14 @@ tsl_compress_chunk_wrapper(Chunk *chunk, bool if_not_compressed, bool recompress
920920 NameStr (chunk -> fd .schema_name ),
921921 NameStr (chunk -> fd .table_name )),
922922 errhint ("Use _timescaledb_functions.unfreeze_chunk to unfreeze." )));
923- return uncompressed_chunk_id ;
923+ return uncompressed_relid ;
924924 }
925925
926926 write_logical_replication_msg_compression_start ();
927927
928928 if (ts_chunk_needs_compression (chunk ))
929929 {
930- uncompressed_chunk_id = compress_chunk_impl (chunk -> hypertable_relid , chunk -> table_id );
930+ uncompressed_relid = compress_chunk_impl (chunk -> hypertable_relid , chunk -> table_id );
931931 }
932932 else if (recompress || ts_chunk_needs_recompression (chunk ))
933933 {
@@ -954,21 +954,21 @@ tsl_compress_chunk_wrapper(Chunk *chunk, bool if_not_compressed, bool recompress
954954 }
955955
956956 write_logical_replication_msg_compression_end ();
957- return uncompressed_chunk_id ;
957+ return uncompressed_relid ;
958958}
959959
960960Datum
961961tsl_decompress_chunk (PG_FUNCTION_ARGS )
962962{
963- Oid uncompressed_chunk_id = PG_ARGISNULL (0 ) ? InvalidOid : PG_GETARG_OID (0 );
963+ Oid uncompressed_relid = PG_ARGISNULL (0 ) ? InvalidOid : PG_GETARG_OID (0 );
964964 bool if_compressed = PG_ARGISNULL (1 ) ? true : PG_GETARG_BOOL (1 );
965965 int32 chunk_id ;
966966
967967 ts_feature_flag_check (FEATURE_HYPERTABLE_COMPRESSION );
968968
969969 TS_PREVENT_FUNC_IF_READ_ONLY ();
970970
971- Chunk * uncompressed_chunk = ts_chunk_get_by_relid (uncompressed_chunk_id , true);
971+ Chunk * uncompressed_chunk = ts_chunk_get_by_relid (uncompressed_relid , true);
972972 chunk_id = uncompressed_chunk -> fd .id ;
973973
974974 Hypertable * ht = ts_hypertable_get_by_id (uncompressed_chunk -> fd .hypertable_id );
@@ -986,7 +986,7 @@ tsl_decompress_chunk(PG_FUNCTION_ARGS)
986986 ereport ((if_compressed ? NOTICE : ERROR ),
987987 (errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
988988 errmsg ("chunk \"%s\" is not converted to columnstore" ,
989- get_rel_name (uncompressed_chunk_id ))));
989+ get_rel_name (uncompressed_relid ))));
990990
991991 PG_RETURN_NULL ();
992992 }
@@ -1001,7 +1001,7 @@ tsl_decompress_chunk(PG_FUNCTION_ARGS)
10011001 */
10021002 ts_chunk_column_stats_reset_by_chunk_id (chunk_id );
10031003
1004- PG_RETURN_OID (uncompressed_chunk_id );
1004+ PG_RETURN_OID (uncompressed_relid );
10051005}
10061006
10071007static bool
@@ -1079,9 +1079,9 @@ extern Datum
10791079tsl_get_compressed_chunk_index_for_recompression (PG_FUNCTION_ARGS )
10801080{
10811081 ts_feature_flag_check (FEATURE_HYPERTABLE_COMPRESSION );
1082- Oid uncompressed_chunk_id = PG_ARGISNULL (0 ) ? InvalidOid : PG_GETARG_OID (0 );
1082+ Oid uncompressed_relid = PG_ARGISNULL (0 ) ? InvalidOid : PG_GETARG_OID (0 );
10831083
1084- Chunk * uncompressed_chunk = ts_chunk_get_by_relid (uncompressed_chunk_id , true);
1084+ Chunk * uncompressed_chunk = ts_chunk_get_by_relid (uncompressed_relid , true);
10851085
10861086 Oid index_oid = get_compressed_chunk_index_for_recompression (uncompressed_chunk );
10871087
0 commit comments