Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandra Pervushina committed Jul 19, 2023
1 parent 2166733 commit 1a4207d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion aqo.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,5 +388,5 @@ PG_FUNCTION_INFO_V1(invalidate_deactivated_queries_cache);
Datum
invalidate_deactivated_queries_cache(PG_FUNCTION_ARGS)
{
PG_RETURN_POINTER(NULL);
PG_RETURN_POINTER(NULL);
}
2 changes: 1 addition & 1 deletion preprocessing.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ aqo_planner(Query *parse, const char *query_string, int cursorOptions,
*/
if (!aqo_qtext_store(query_context.query_hash, query_string, &dsa_valid))
{
if (!dsa_valid)
if (!dsa_valid)
{
disable_aqo_for_query();
elog(WARNING, "[AQO] Not enough DSA. AQO was disabled for this query");
Expand Down
3 changes: 2 additions & 1 deletion storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,8 @@ check_dsa_file_size(void)
long qtext_size = aqo_get_file_size(PGAQO_TEXT_FILE);
long data_size = aqo_get_file_size(PGAQO_DATA_FILE);

if (qtext_size == -1 || data_size == -1 || qtext_size + data_size >= dsm_size_max * 1024 * 1024)
if (qtext_size == -1 || data_size == -1 ||
qtext_size + data_size >= dsm_size_max * 1024 * 1024)
{
elog(ERROR, "aqo.dsm_size_max is too small");
}
Expand Down
4 changes: 2 additions & 2 deletions t/004_dsm_size_max.pl
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
my ($stdout, $stderr);
for my $i (1 .. 20) {
$node->psql('postgres', "create table a as select s, md5(random()::text) from generate_Series(1,100) s;");
$node->psql('postgres',
"SELECT a.s FROM a CROSS JOIN ( SELECT '" . $long_string . "' as long_string) AS extra_rows;",
$node->psql('postgres',
"SELECT a.s FROM a CROSS JOIN ( SELECT '" . $long_string . "' as long_string) AS extra_rows;",
stdout => \$stdout, stderr => \$stderr);
$node->psql('postgres', "drop table a");
}
Expand Down

0 comments on commit 1a4207d

Please sign in to comment.