Re: [COMMITTERS] pgsql: Allow on-the-fly capture of DDL event details
On Wed, May 13, 2015 at 12:31 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Michael Paquier wrote: Mind share more details about that? How would you detect that a given test in serial_schedule needs to be considered by test_ddl_deparse automatically? WIth a new type of keyword in a schedule file? This looks like a different feature to me that's going to need more infrastructure... Well, I remembered that the list of tests to run can be passed as a variable to the make run, so the schedule file is not the best way to go about this anyway. Therefore I have pushed your patch (including the .gitignore file) I would find better the idea to add a new variable, let's say REGRESS_SCHEDULE to pass a list of schedule paths that will be taken into account by PGXS and declare them with --schedule (pg_regress can take multiple schedules), and add logic to parse it in the MSVC files. No need to add a special case in the MSVC scripts this way. -- Michael -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
Re: [COMMITTERS] pgsql: Allow on-the-fly capture of DDL event details
On 05/12/2015 12:05 AM, Alvaro Herrera wrote: Michael Paquier wrote: On Tue, May 12, 2015 at 11:43 AM, Michael Paquier michael.paqu...@gmail.com wrote: On Tue, May 12, 2015 at 11:37 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Michael Paquier wrote: On Tue, May 12, 2015 at 7:16 AM, Alvaro Herrera alvhe...@alvh.no-ip.org wrote: Not sure what's the real fix here .. I think that you should then use MODULE_big instead of MODULES, and set OBJS as test_dll_parser.o $(WIN32RES). Taking it back, listing explicitly the list of tests in the Makefile's REGRESS works just fine. Patch attached. Sure. I want to avoid doing that, though: we may want to generate a schedule based on src/test/regress/serial_schedule, so that newly added tests to the regular suite are automatically considered by this module. If you want to do that you will need to make some special adjustment in the MSVC build system. You can't use $(srcdir) in REGRESS and expect the MSVC builds not to break otherwise. We don't do that anywhere else AFAICT. cheers andrew -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
Re: [COMMITTERS] pgsql: Allow on-the-fly capture of DDL event details
On 05/12/2015 10:03 AM, Alvaro Herrera wrote: In any case, it is not good to keep the buildfarm machines broken for too long, and personally I would rather avoid adding one more hack in the MSVC build scripts. The MSVC build scripts *are* hacks themselves. Anyway, I'll look into it. Nobody has come up with a workable alternative. Nobody will be happier than me if they do. cheers andrew -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
Re: [COMMITTERS] pgsql: Allow on-the-fly capture of DDL event details
Michael Paquier wrote: On Tue, May 12, 2015 at 1:05 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Sure. I want to avoid doing that, though: we may want to generate a schedule based on src/test/regress/serial_schedule, so that newly added tests to the regular suite are automatically considered by this module. Mind share more details about that? How would you detect that a given test in serial_schedule needs to be considered by test_ddl_deparse automatically? WIth a new type of keyword in a schedule file? This looks like a different feature to me that's going to need more infrastructure... I was thinking in something simple such as cat $(srcdir)/src/test/regress/serial_schedule | grep -v tablespace the_schedule If you want to continue on this way though, I imagine that you will need to add a special case in fetchTests of vcregress.pl. Hrm. In any case, it is not good to keep the buildfarm machines broken for too long, and personally I would rather avoid adding one more hack in the MSVC build scripts. The MSVC build scripts *are* hacks themselves. Anyway, I'll look into it. -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training Services -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
Re: [COMMITTERS] pgsql: Allow on-the-fly capture of DDL event details
Michael Paquier wrote: Mind share more details about that? How would you detect that a given test in serial_schedule needs to be considered by test_ddl_deparse automatically? WIth a new type of keyword in a schedule file? This looks like a different feature to me that's going to need more infrastructure... Well, I remembered that the list of tests to run can be passed as a variable to the make run, so the schedule file is not the best way to go about this anyway. Therefore I have pushed your patch (including the .gitignore file) Thanks -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training Services -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
Re: [COMMITTERS] pgsql: Allow on-the-fly capture of DDL event details
On Tue, May 12, 2015 at 11:43 AM, Michael Paquier michael.paqu...@gmail.com wrote: On Tue, May 12, 2015 at 11:37 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Michael Paquier wrote: On Tue, May 12, 2015 at 7:16 AM, Alvaro Herrera alvhe...@alvh.no-ip.org wrote: Not sure what's the real fix here .. I think that you should then use MODULE_big instead of MODULES, and set OBJS as test_dll_parser.o $(WIN32RES). Taking it back, listing explicitly the list of tests in the Makefile's REGRESS works just fine. Patch attached. -- Michael From aeb75022ba2a8becaab78b55d31d9f54b44f1b80 Mon Sep 17 00:00:00 2001 From: Michael Paquier mich...@otacoo.com Date: Tue, 12 May 2015 12:50:03 +0900 Subject: [PATCH] Fix test_ddl_deparse for MSVC builds The list of regression tests should be passed explicitly with REGRESS instead of passing a regression schedule file path. --- src/test/modules/test_ddl_deparse/.gitignore | 2 ++ src/test/modules/test_ddl_deparse/Makefile | 25 +- src/test/modules/test_ddl_deparse/regress_schedule | 21 -- 3 files changed, 26 insertions(+), 22 deletions(-) create mode 100644 src/test/modules/test_ddl_deparse/.gitignore delete mode 100644 src/test/modules/test_ddl_deparse/regress_schedule diff --git a/src/test/modules/test_ddl_deparse/.gitignore b/src/test/modules/test_ddl_deparse/.gitignore new file mode 100644 index 000..19b6c5b --- /dev/null +++ b/src/test/modules/test_ddl_deparse/.gitignore @@ -0,0 +1,2 @@ +# Generated subdirectories +/results/ diff --git a/src/test/modules/test_ddl_deparse/Makefile b/src/test/modules/test_ddl_deparse/Makefile index a87b691..25ecedf 100644 --- a/src/test/modules/test_ddl_deparse/Makefile +++ b/src/test/modules/test_ddl_deparse/Makefile @@ -1,10 +1,33 @@ +# src/test/modules/test_ddl_deparse/Makefile + MODULES = test_ddl_deparse PGFILEDESC = test_ddl_deparse - regression testing for DDL deparsing EXTENSION = test_ddl_deparse DATA = test_ddl_deparse--1.0.sql -REGRESS = --schedule=$(srcdir)/regress_schedule +# test_ddl_deparse must be first +REGRESS = \ + test_ddl_deparse \ + create_extension \ + create_schema \ + create_type \ + create_conversion \ + create_domain \ + create_sequence_1 \ + create_table \ + alter_table \ + create_view \ + create_trigger \ + create_rule \ + comment_on \ + alter_function \ + alter_sequence \ + alter_type_enum \ + opfamily \ + defprivs \ + matviews + EXTRA_INSTALL = contrib/pg_stat_statements ifdef USE_PGXS diff --git a/src/test/modules/test_ddl_deparse/regress_schedule b/src/test/modules/test_ddl_deparse/regress_schedule deleted file mode 100644 index 1819ae5..000 --- a/src/test/modules/test_ddl_deparse/regress_schedule +++ /dev/null @@ -1,21 +0,0 @@ -# must be first -test: test_ddl_deparse - -test: create_extension -test: create_schema -test: create_type -test: create_conversion -test: create_domain -test: create_sequence_1 -test: create_table -test: alter_table -test: create_view -test: create_trigger -test: create_rule -test: comment_on -test: alter_function -test: alter_sequence -test: alter_type_enum -test: opfamily -test: defprivs -test: matviews -- 2.4.0 -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
Re: [COMMITTERS] pgsql: Allow on-the-fly capture of DDL event details
Michael Paquier wrote: On Tue, May 12, 2015 at 11:43 AM, Michael Paquier michael.paqu...@gmail.com wrote: On Tue, May 12, 2015 at 11:37 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Michael Paquier wrote: On Tue, May 12, 2015 at 7:16 AM, Alvaro Herrera alvhe...@alvh.no-ip.org wrote: Not sure what's the real fix here .. I think that you should then use MODULE_big instead of MODULES, and set OBJS as test_dll_parser.o $(WIN32RES). Taking it back, listing explicitly the list of tests in the Makefile's REGRESS works just fine. Patch attached. Sure. I want to avoid doing that, though: we may want to generate a schedule based on src/test/regress/serial_schedule, so that newly added tests to the regular suite are automatically considered by this module. -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training Services -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
Re: [COMMITTERS] pgsql: Allow on-the-fly capture of DDL event details
On Tue, May 12, 2015 at 1:05 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Michael Paquier wrote: On Tue, May 12, 2015 at 11:43 AM, Michael Paquier michael.paqu...@gmail.com wrote: On Tue, May 12, 2015 at 11:37 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Michael Paquier wrote: On Tue, May 12, 2015 at 7:16 AM, Alvaro Herrera alvhe...@alvh.no-ip.org wrote: Not sure what's the real fix here .. I think that you should then use MODULE_big instead of MODULES, and set OBJS as test_dll_parser.o $(WIN32RES). Taking it back, listing explicitly the list of tests in the Makefile's REGRESS works just fine. Patch attached. Sure. I want to avoid doing that, though: we may want to generate a schedule based on src/test/regress/serial_schedule, so that newly added tests to the regular suite are automatically considered by this module. Mind share more details about that? How would you detect that a given test in serial_schedule needs to be considered by test_ddl_deparse automatically? WIth a new type of keyword in a schedule file? This looks like a different feature to me that's going to need more infrastructure... If you want to continue on this way though, I imagine that you will need to add a special case in fetchTests of vcregress.pl. In any case, it is not good to keep the buildfarm machines broken for too long, and personally I would rather avoid adding one more hack in the MSVC build scripts. -- Michael -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
Re: [COMMITTERS] pgsql: Allow on-the-fly capture of DDL event details
On Tue, May 12, 2015 at 1:18 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Tue, May 12, 2015 at 1:05 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Michael Paquier wrote: On Tue, May 12, 2015 at 11:43 AM, Michael Paquier michael.paqu...@gmail.com wrote: On Tue, May 12, 2015 at 11:37 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Michael Paquier wrote: On Tue, May 12, 2015 at 7:16 AM, Alvaro Herrera alvhe...@alvh.no-ip.org wrote: Not sure what's the real fix here .. I think that you should then use MODULE_big instead of MODULES, and set OBJS as test_dll_parser.o $(WIN32RES). Taking it back, listing explicitly the list of tests in the Makefile's REGRESS works just fine. Patch attached. Sure. I want to avoid doing that, though: we may want to generate a schedule based on src/test/regress/serial_schedule, so that newly added tests to the regular suite are automatically considered by this module. Mind share more details about that? How would you detect that a given test in serial_schedule needs to be considered by test_ddl_deparse automatically? WIth a new type of keyword in a schedule file? This looks like a different feature to me that's going to need more infrastructure... If you want to continue on this way though, I imagine that you will need to add a special case in fetchTests of vcregress.pl. In any case, it is not good to keep the buildfarm machines broken for too long, and personally I would rather avoid adding one more hack in the MSVC build scripts. Btw, just adding that a .gitignore file with /results/ is missing in src/test/modules/test_ddl_deparse. -- Michael -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
Re: [COMMITTERS] pgsql: Allow on-the-fly capture of DDL event details
On Tue, May 12, 2015 at 7:16 AM, Alvaro Herrera alvhe...@alvh.no-ip.org wrote: Allow on-the-fly capture of DDL event details This feature lets user code inspect and take action on DDL events. Whenever a ddl_command_end event trigger is installed, DDL actions executed are saved to a list which can be inspected during execution of a function attached to ddl_command_end. Buildfarm machines on Windows are complaining: http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=mastodondt=2015-05-11%2023%3A00%3A01 Visibly REGRESS and REGRESS_OPTS are messed up in the Makefile of test_ddl_deparsing. The patch attached make tests pass correctly. -- Michael diff --git a/src/test/modules/test_ddl_deparse/Makefile b/src/test/modules/test_ddl_deparse/Makefile index a87b691..d025b49 100644 --- a/src/test/modules/test_ddl_deparse/Makefile +++ b/src/test/modules/test_ddl_deparse/Makefile @@ -1,10 +1,13 @@ +# src/test/modules/test_ddl_deparse/Makefile + MODULES = test_ddl_deparse PGFILEDESC = test_ddl_deparse - regression testing for DDL deparsing EXTENSION = test_ddl_deparse DATA = test_ddl_deparse--1.0.sql -REGRESS = --schedule=$(srcdir)/regress_schedule +REGRESS = test_ddl_deparse +REGRESS_OPTS = --schedule=$(srcdir)/regress_schedule EXTRA_INSTALL = contrib/pg_stat_statements ifdef USE_PGXS -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
Re: [COMMITTERS] pgsql: Allow on-the-fly capture of DDL event details
Michael Paquier wrote: On Tue, May 12, 2015 at 7:16 AM, Alvaro Herrera alvhe...@alvh.no-ip.org wrote: Allow on-the-fly capture of DDL event details This feature lets user code inspect and take action on DDL events. Whenever a ddl_command_end event trigger is installed, DDL actions executed are saved to a list which can be inspected during execution of a function attached to ddl_command_end. Buildfarm machines on Windows are complaining: http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=mastodondt=2015-05-11%2023%3A00%3A01 Visibly REGRESS and REGRESS_OPTS are messed up in the Makefile of test_ddl_deparsing. The patch attached make tests pass correctly. Um. In my system, if I set REGRESS to test_ddl_deparse per your patch, the test_ddl_deparse test is run twice, at the beginning (per the schedule file) and at the end, and it fails on the second run. I tried setting REGRESS to empty, and to leave it unset, but that only causes make to say nothing to be done for installcheck which isn't good either. I suppose I could delete the last line from the schedule file and put it in the REGRESS line in the Makefile, but that seems wrong too. Not sure what's the real fix here .. -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training Services -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
Re: [COMMITTERS] pgsql: Allow on-the-fly capture of DDL event details
On Tue, May 12, 2015 at 11:37 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Michael Paquier wrote: On Tue, May 12, 2015 at 7:16 AM, Alvaro Herrera alvhe...@alvh.no-ip.org wrote: Allow on-the-fly capture of DDL event details This feature lets user code inspect and take action on DDL events. Whenever a ddl_command_end event trigger is installed, DDL actions executed are saved to a list which can be inspected during execution of a function attached to ddl_command_end. Buildfarm machines on Windows are complaining: http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=mastodondt=2015-05-11%2023%3A00%3A01 Visibly REGRESS and REGRESS_OPTS are messed up in the Makefile of test_ddl_deparsing. The patch attached make tests pass correctly. Um. In my system, if I set REGRESS to test_ddl_deparse per your patch, the test_ddl_deparse test is run twice, at the beginning (per the schedule file) and at the end, and it fails on the second run. I tried setting REGRESS to empty, and to leave it unset, but that only causes make to say nothing to be done for installcheck which isn't good either. I suppose I could delete the last line from the schedule file and put it in the REGRESS line in the Makefile, but that seems wrong too. Not sure what's the real fix here .. I think that you should then use MODULE_big instead of MODULES, and set OBJS as test_dll_parser.o $(WIN32RES). -- Michael -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers