Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd6baf4c

Browse files
committed
Merge branch 'REL9_5_STABLE' into PGPRO9_5
2 parents1d13184 +5b3cd1a commitd6baf4c

File tree

5 files changed

+23
-11
lines changed

5 files changed

+23
-11
lines changed

‎doc/src/sgml/ref/comment.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ COMMENT ON
135135
<term><replaceable class="parameter">domain_name</replaceable></term>
136136
<listitem>
137137
<para>
138-
When creating a comment on a constraint, atable, adomain or
138+
When creating a comment on a constraint, atrigger, arule or
139139
a policy these parameters specify the name of the table or domain on
140-
whichthe constraint is defined.
140+
whichthat object is defined.
141141
</para>
142142
</listitem>
143143
</varlistentry>

‎src/backend/commands/analyze.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -605,10 +605,13 @@ do_analyze_rel(Relation onerel, int options, VacuumParams *params,
605605
/*
606606
* Report ANALYZE to the stats collector, too. However, if doing
607607
* inherited stats we shouldn't report, because the stats collector only
608-
* tracks per-table stats.
608+
* tracks per-table stats. Reset the changes_since_analyze counter only
609+
* if we analyzed all columns; otherwise, there is still work for
610+
* auto-analyze to do.
609611
*/
610612
if (!inh)
611-
pgstat_report_analyze(onerel,totalrows,totaldeadrows);
613+
pgstat_report_analyze(onerel,totalrows,totaldeadrows,
614+
(va_cols==NIL));
612615

613616
/* If this isn't part of VACUUM ANALYZE, let index AMs do cleanup */
614617
if (!(options&VACOPT_VACUUM))

‎src/backend/postmaster/pgstat.c

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,11 +1346,15 @@ pgstat_report_vacuum(Oid tableoid, bool shared,
13461346
* pgstat_report_analyze() -
13471347
*
13481348
*Tell the collector about the table we just analyzed.
1349+
*
1350+
* Caller must provide new live- and dead-tuples estimates, as well as a
1351+
* flag indicating whether to reset the changes_since_analyze counter.
13491352
* --------
13501353
*/
13511354
void
13521355
pgstat_report_analyze(Relationrel,
1353-
PgStat_Counterlivetuples,PgStat_Counterdeadtuples)
1356+
PgStat_Counterlivetuples,PgStat_Counterdeadtuples,
1357+
boolresetcounter)
13541358
{
13551359
PgStat_MsgAnalyzemsg;
13561360

@@ -1387,6 +1391,7 @@ pgstat_report_analyze(Relation rel,
13871391
msg.m_databaseid=rel->rd_rel->relisshared ?InvalidOid :MyDatabaseId;
13881392
msg.m_tableoid=RelationGetRelid(rel);
13891393
msg.m_autovacuum=IsAutoVacuumWorkerProcess();
1394+
msg.m_resetcounter=resetcounter;
13901395
msg.m_analyzetime=GetCurrentTimestamp();
13911396
msg.m_live_tuples=livetuples;
13921397
msg.m_dead_tuples=deadtuples;
@@ -5110,10 +5115,12 @@ pgstat_recv_analyze(PgStat_MsgAnalyze *msg, int len)
51105115
tabentry->n_dead_tuples=msg->m_dead_tuples;
51115116

51125117
/*
5113-
* We reset changes_since_analyze to zero, forgetting any changes that
5114-
* occurred while the ANALYZE was in progress.
5118+
* If commanded, reset changes_since_analyze to zero. This forgets any
5119+
* changes that were committed while the ANALYZE was in progress, but we
5120+
* have no good way to estimate how many of those there were.
51155121
*/
5116-
tabentry->changes_since_analyze=0;
5122+
if (msg->m_resetcounter)
5123+
tabentry->changes_since_analyze=0;
51175124

51185125
if (msg->m_autovacuum)
51195126
{

‎src/include/pgstat.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,7 @@ typedef struct PgStat_MsgAnalyze
382382
Oidm_databaseid;
383383
Oidm_tableoid;
384384
boolm_autovacuum;
385+
boolm_resetcounter;
385386
TimestampTzm_analyzetime;
386387
PgStat_Counterm_live_tuples;
387388
PgStat_Counterm_dead_tuples;
@@ -932,7 +933,8 @@ extern void pgstat_report_autovac(Oid dboid);
932933
externvoidpgstat_report_vacuum(Oidtableoid,boolshared,
933934
PgStat_Counterlivetuples,PgStat_Counterdeadtuples);
934935
externvoidpgstat_report_analyze(Relationrel,
935-
PgStat_Counterlivetuples,PgStat_Counterdeadtuples);
936+
PgStat_Counterlivetuples,PgStat_Counterdeadtuples,
937+
boolresetcounter);
936938

937939
externvoidpgstat_report_recovery_conflict(intreason);
938940
externvoidpgstat_report_deadlock(void);

‎src/nls-global.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ all-po: $(MO_FILES)
7676
ifeq ($(word 1,$(GETTEXT_FILES)),+)
7777
po/$(CATALOG_NAME).pot:$(word 2,$(GETTEXT_FILES))$(MAKEFILE_LIST)
7878
ifdefXGETTEXT
79-
$(XGETTEXT) -D $(srcdir) -n $(addprefix -k, $(GETTEXT_TRIGGERS)) $(addprefix --flag=, $(GETTEXT_FLAGS)) -f $<
79+
$(XGETTEXT) -D $(srcdir) -D . -n $(addprefix -k, $(GETTEXT_TRIGGERS)) $(addprefix --flag=, $(GETTEXT_FLAGS)) -f $<
8080
else
8181
@echo "You don't have 'xgettext'."; exit 1
8282
endif
@@ -85,7 +85,7 @@ po/$(CATALOG_NAME).pot: $(GETTEXT_FILES) $(MAKEFILE_LIST)
8585
# Change to srcdir explicitly, don't rely on $^. That way we get
8686
# consistent #: file references in the po files.
8787
ifdefXGETTEXT
88-
$(XGETTEXT) -D $(srcdir) -n $(addprefix -k, $(GETTEXT_TRIGGERS)) $(addprefix --flag=, $(GETTEXT_FLAGS)) $(GETTEXT_FILES)
88+
$(XGETTEXT) -D $(srcdir) -D . -n $(addprefix -k, $(GETTEXT_TRIGGERS)) $(addprefix --flag=, $(GETTEXT_FLAGS)) $(GETTEXT_FILES)
8989
else
9090
@echo "You don't have 'xgettext'."; exit 1
9191
endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp