public inbox for [email protected]
help / color / mirror / Atom feed[PATCH] Rename whitelist/blacklist in pgindent to additional/excluded
2+ messages / 2 participants
[nested] [flat]
* [PATCH] Rename whitelist/blacklist in pgindent to additional/excluded
@ 2021-01-05 00:10 Dagfinn Ilmari Mannsåker <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Dagfinn Ilmari Mannsåker @ 2021-01-05 00:10 UTC (permalink / raw)
---
src/tools/pgindent/pgindent | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/tools/pgindent/pgindent b/src/tools/pgindent/pgindent
index 4124d27dea..feb02067c5 100755
--- a/src/tools/pgindent/pgindent
+++ b/src/tools/pgindent/pgindent
@@ -54,12 +54,12 @@ $excludes ||= "$code_base/src/tools/pgindent/exclude_file_patterns"
# some names we want to treat like typedefs, e.g. "bool" (which is a macro
# according to <stdbool.h>), and may include some names we don't want
# treated as typedefs, although various headers that some builds include
-# might make them so. For the moment we just hardwire a whitelist of names
-# to add and a blacklist of names to remove; eventually this may need to be
+# might make them so. For the moment we just hardwire a list of names
+# to add and a list of names to exclude; eventually this may need to be
# easier to configure. Note that the typedefs need trailing newlines.
-my @whitelist = ("bool\n");
+my @additional = ("bool\n");
-my %blacklist = map { +"$_\n" => 1 } qw(
+my %excluded = map { +"$_\n" => 1 } qw(
ANY FD_SET U abs allocfunc boolean date digit ilist interval iterator other
pointer printfunc reference string timestamp type wrap
);
@@ -134,11 +134,11 @@ sub load_typedefs
}
}
- # add whitelisted entries
- push(@typedefs, @whitelist);
+ # add additional entries
+ push(@typedefs, @additional);
- # remove blacklisted entries
- @typedefs = grep { !$blacklist{$_} } @typedefs;
+ # remove excluded entries
+ @typedefs = grep { !$excluded{$_} } @typedefs;
# write filtered typedefs
my $filter_typedefs_fh = new File::Temp(TEMPLATE => "pgtypedefXXXXX");
--
2.29.2
--=-=-=--
^ permalink raw reply [nested|flat] 2+ messages in thread
* Why does exec_simple_query requires 2 snapshots
@ 2025-02-18 11:48 Andy Fan <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Andy Fan @ 2025-02-18 11:48 UTC (permalink / raw)
To: [email protected] <[email protected]>
Hi,
When I run "SELECT * FROM pg_class LIMIT 1"; then postgresql
run GetSnapshotData twice, one is
/*
* Set up a snapshot if parse analysis/planning will need one.
*/
if (analyze_requires_snapshot(parsetree))
{
PushActiveSnapshot(GetTransactionSnapshot());
snapshot_set = true;
}
the other one is in PortalStart.
My question is why can't we share the same snapshot for the 2 cases?
parser & planner requires Catalog Snapshot which should be the
latest one, but in the above case, looks the executor can reuse it as
well. Is there anything I missed?
Thanks
--
Best Regards
Andy Fan
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-02-18 11:48 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-01-05 00:10 [PATCH] Rename whitelist/blacklist in pgindent to additional/excluded Dagfinn Ilmari Mannsåker <[email protected]>
2025-02-18 11:48 Why does exec_simple_query requires 2 snapshots Andy Fan <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox