Re: Verbosity of genbki.pl

2018-04-30 Thread Peter Eisentraut
On 4/29/18 06:50, Michael Paquier wrote:
> On Sat, Apr 28, 2018 at 01:02:10PM -0400, Stephen Frost wrote:
>> +1 for making them not output anything if all is well.
> 
> +1.

done

-- 
Peter Eisentraut  http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Re: Verbosity of genbki.pl

2018-04-29 Thread Michael Paquier
On Sat, Apr 28, 2018 at 01:02:10PM -0400, Stephen Frost wrote:
> +1 for making them not output anything if all is well.

+1.
--
Michael


signature.asc
Description: PGP signature


Re: Verbosity of genbki.pl

2018-04-28 Thread Stephen Frost
Greetings,

* Tom Lane (t...@sss.pgh.pa.us) wrote:
> Peter Eisentraut  writes:
> > Maybe we can take another look at this.  Right now, make -s world
> > produces *only* the following output:
> 
> > $ make -s world
> > Generating BKI files and symbol definition headers...
> > Generating fmgrtab.c, fmgroids.h, and fmgrprotos.h...
> > PostgreSQL, contrib, and documentation successfully made. Ready to install.
> 
> > That seems kind of inconsistent and silly.  I suggest we remove the
> > output from these scripts.
> 
> FWIW, that'd be fine with me.  Teodor spoke against removing that output
> entirely, but perhaps he's the only one who thinks that way.  For myself,
> I've gotten mighty used to running "make -s" and expecting no output
> if all is well.  If I wanted to see what was getting rebuilt, I wouldn't
> use -s.

+1 for making them not output anything if all is well.

Thanks!

Stephen


signature.asc
Description: PGP signature


Re: Verbosity of genbki.pl

2018-04-28 Thread Tom Lane
Peter Eisentraut  writes:
> Maybe we can take another look at this.  Right now, make -s world
> produces *only* the following output:

> $ make -s world
> Generating BKI files and symbol definition headers...
> Generating fmgrtab.c, fmgroids.h, and fmgrprotos.h...
> PostgreSQL, contrib, and documentation successfully made. Ready to install.

> That seems kind of inconsistent and silly.  I suggest we remove the
> output from these scripts.

FWIW, that'd be fine with me.  Teodor spoke against removing that output
entirely, but perhaps he's the only one who thinks that way.  For myself,
I've gotten mighty used to running "make -s" and expecting no output
if all is well.  If I wanted to see what was getting rebuilt, I wouldn't
use -s.

regards, tom lane



Re: Verbosity of genbki.pl

2018-04-28 Thread Peter Eisentraut
On 4/9/18 15:02, Tom Lane wrote:
> Andres Freund  writes:
>> On 2018-04-08 13:33:42 -0400, Tom Lane wrote:
>>> Traditionally genbki.pl has printed "Writing foo" for every file
>>> it writes out.
> 
>>> 2. Print just one message like "Generating postgres.bki and related
>>> files", and I guess a second one for fmgroids.h and related files.
> 
>> +0.5.
> 
> Hearing no votes against, done that way.

Maybe we can take another look at this.  Right now, make -s world
produces *only* the following output:

$ make -s world
Generating BKI files and symbol definition headers...
Generating fmgrtab.c, fmgroids.h, and fmgrprotos.h...
PostgreSQL, contrib, and documentation successfully made. Ready to install.

That seems kind of inconsistent and silly.  I suggest we remove the
output from these scripts.

-- 
Peter Eisentraut  http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Re: Verbosity of genbki.pl

2018-04-09 Thread Tom Lane
Andres Freund  writes:
> On 2018-04-08 13:33:42 -0400, Tom Lane wrote:
>> Traditionally genbki.pl has printed "Writing foo" for every file
>> it writes out.

>> 2. Print just one message like "Generating postgres.bki and related
>> files", and I guess a second one for fmgroids.h and related files.

> +0.5.

Hearing no votes against, done that way.

regards, tom lane



Re: Verbosity of genbki.pl

2018-04-09 Thread Andres Freund
Hi,

On 2018-04-08 13:33:42 -0400, Tom Lane wrote:
> Traditionally genbki.pl has printed "Writing foo" for every file
> it writes out.

> 2. Print just one message like "Generating postgres.bki and related
> files", and I guess a second one for fmgroids.h and related files.

+0.5.

- Andres



Re: Verbosity of genbki.pl

2018-04-09 Thread John Naylor
On 4/9/18, Teodor Sigaev  wrote:
>> 1. Print nothing at all.  That's more in keeping with our modern
>> build practices, but maybe it's too big a change?
>>
>> 2. Print just one message like "Generating postgres.bki and related
>> files", and I guess a second one for fmgroids.h and related files.
>>
>> I don't have a strong preference.  Opinions?
>
> Second point, pls. I'd like to see some stage done

The attached patch does #2.

-John Naylor
diff --git a/src/backend/catalog/Catalog.pm b/src/backend/catalog/Catalog.pm
index 3b3bb6b..02bd6d4 100644
--- a/src/backend/catalog/Catalog.pm
+++ b/src/backend/catalog/Catalog.pm
@@ -340,7 +340,6 @@ sub RenameTempFile
 	my $final_name = shift;
 	my $extension  = shift;
 	my $temp_name  = $final_name . $extension;
-	print "Writing $final_name\n";
 	rename($temp_name, $final_name) || die "rename: $temp_name: $!";
 }
 
diff --git a/src/backend/catalog/genbki.pl b/src/backend/catalog/genbki.pl
index d0afcc7..2689f73 100644
--- a/src/backend/catalog/genbki.pl
+++ b/src/backend/catalog/genbki.pl
@@ -217,6 +217,7 @@ my %lookup_kind = (
 
 # Generate postgres.bki, postgres.description, postgres.shdescription,
 # and pg_*_d.h headers.
+print "Generating BKI files and symbol definition headers...\n";
 
 # version marker for .bki file
 print $bki "# PostgreSQL $major_version\n";
diff --git a/src/backend/utils/Gen_fmgrtab.pl b/src/backend/utils/Gen_fmgrtab.pl
index 3b112c6..4f5af79 100644
--- a/src/backend/utils/Gen_fmgrtab.pl
+++ b/src/backend/utils/Gen_fmgrtab.pl
@@ -84,6 +84,8 @@ my $FirstBootstrapObjectId = Catalog::FindDefinedSymbol(
 my $INTERNALlanguageId = Catalog::FindDefinedSymbolFromData(
 	$catalog_data{pg_language}, 'INTERNALlanguageId');
 
+print "Generating fmgrtab.c, fmgroids.h, and fmgrprotos.h...\n";
+
 # Collect certain fields from pg_proc.dat.
 my @fmgr = ();
 
diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm
index b267c19..f953460 100644
--- a/src/tools/msvc/Solution.pm
+++ b/src/tools/msvc/Solution.pm
@@ -275,7 +275,6 @@ s{PG_VERSION_STR "[^"]+"}{PG_VERSION_STR "PostgreSQL $self->{strver}$extraver, c
 			'fmgrtab.c', '../../../src/include/access/transam.h')
 		)
 	{
-		print "Generating fmgrtab.c, fmgroids.h, fmgrprotos.h...\n";
 		system(
 "perl -I ../catalog Gen_fmgrtab.pl -I../../../src/include/ $pg_language_dat $pg_proc_dat");
 	}
@@ -479,7 +478,6 @@ EOF
 'src/backend/catalog/postgres.bki',
 "src/include/catalog/$bki"))
 		{
-			print "Generating BKI files and symbol definition headers...\n";
 			chdir('src/backend/catalog');
 			my $bki_srcs = join(' ../../../src/include/catalog/', @bki_srcs);
 			system("perl genbki.pl --set-version=$self->{majorver} $bki_srcs");


Re: Verbosity of genbki.pl

2018-04-08 Thread Teodor Sigaev

1. Print nothing at all.  That's more in keeping with our modern
build practices, but maybe it's too big a change?

2. Print just one message like "Generating postgres.bki and related
files", and I guess a second one for fmgroids.h and related files.

I don't have a strong preference.  Opinions?


Second point, pls. I'd like to see some stage done

--
Teodor Sigaev  E-mail: teo...@sigaev.ru
  WWW: http://www.sigaev.ru/



Verbosity of genbki.pl

2018-04-08 Thread Tom Lane
(This was discussed in the "way forward on bootstrap data" thread,
but we didn't do anything about it.)

Traditionally genbki.pl has printed "Writing foo" for every file
it writes out.  As of 372728b0d that is a heck of a lot more files
than it once was, so you get this:

$ make -j8 -s
Writing fmgroids.h
Writing fmgrprotos.h
Writing fmgrtab.c
Writing pg_proc_d.h
Writing pg_type_d.h
Writing pg_attribute_d.h
Writing pg_class_d.h
Writing pg_attrdef_d.h
Writing pg_constraint_d.h
Writing pg_inherits_d.h
Writing pg_index_d.h
Writing pg_operator_d.h
Writing pg_opfamily_d.h
Writing pg_opclass_d.h
Writing pg_am_d.h
Writing pg_amop_d.h
Writing pg_amproc_d.h
Writing pg_language_d.h
Writing pg_largeobject_metadata_d.h
Writing pg_largeobject_d.h
Writing pg_aggregate_d.h
Writing pg_statistic_ext_d.h
Writing pg_statistic_d.h
Writing pg_rewrite_d.h
Writing pg_trigger_d.h
Writing pg_event_trigger_d.h
Writing pg_description_d.h
Writing pg_cast_d.h
Writing pg_enum_d.h
Writing pg_namespace_d.h
Writing pg_conversion_d.h
Writing pg_depend_d.h
Writing pg_database_d.h
Writing pg_db_role_setting_d.h
Writing pg_tablespace_d.h
Writing pg_pltemplate_d.h
Writing pg_authid_d.h
Writing pg_auth_members_d.h
Writing pg_shdepend_d.h
Writing pg_shdescription_d.h
Writing pg_ts_config_d.h
Writing pg_ts_config_map_d.h
Writing pg_ts_dict_d.h
Writing pg_ts_parser_d.h
Writing pg_ts_template_d.h
Writing pg_extension_d.h
Writing pg_foreign_data_wrapper_d.h
Writing pg_foreign_server_d.h
Writing pg_user_mapping_d.h
Writing pg_foreign_table_d.h
Writing pg_policy_d.h
Writing pg_replication_origin_d.h
Writing pg_default_acl_d.h
Writing pg_init_privs_d.h
Writing pg_seclabel_d.h
Writing pg_shseclabel_d.h
Writing pg_collation_d.h
Writing pg_partitioned_table_d.h
Writing pg_range_d.h
Writing pg_transform_d.h
Writing pg_sequence_d.h
Writing pg_publication_d.h
Writing pg_publication_rel_d.h
Writing pg_subscription_d.h
Writing pg_subscription_rel_d.h
Writing postgres.bki
Writing schemapg.h
Writing postgres.description
Writing postgres.shdescription
All of PostgreSQL successfully made. Ready to install.

which seems a tad excessive, especially in a -s run.

I think we should drop the per-file notices.  But there are a couple
of alternatives as to what to do exactly:

1. Print nothing at all.  That's more in keeping with our modern
build practices, but maybe it's too big a change?

2. Print just one message like "Generating postgres.bki and related
files", and I guess a second one for fmgroids.h and related files.

I don't have a strong preference.  Opinions?

regards, tom lane