On Thu, Jun 27, 2019 at 10:17 AM Dent John <de...@qqdd.eu> wrote: > > On 3 Apr 2019, at 20:54, Nikolay Shaplov <dh...@nataraj.su> wrote: > > В письме от вторник, 19 марта 2019 г. 16:09:13 MSK пользователь Michael > > Paquier написал: > > > >> Thanks for doing the effort to split that stuff. This looks like an > >> interesting base template for anybody willing to look after some > >> basics with index AMs, like what's done for FDWs with blackhole_fdw. > > I am not sure it is good template. Most methods are empty, and does not show > > any example of how it should work. > > [review]
Hi Nikolay, While moving this to the September CF, I noticed this failure: test reloptions ... FAILED 32 ms --- /home/travis/build/postgresql-cfbot/postgresql/src/test/modules/dummy_index_am/expected/reloptions.out 2019-08-01 08:06:16.580197980 +0000 +++ /home/travis/build/postgresql-cfbot/postgresql/src/test/modules/dummy_index_am/results/reloptions.out 2019-08-01 08:11:57.817493999 +0000 @@ -13,12 +13,14 @@ CREATE INDEX test_idx ON tst USING dummy_index_am (i) WITH (int_option = 5); WARNING: int_option = 5 ALTER INDEX test_idx SET (int_option = 3); +ERROR: unrecognized lock mode: 2139062143 INSERT INTO tst VALUES(1); -WARNING: int_option = 3 +WARNING: int_option = 5 ALTER INDEX test_idx SET (bool_option = false); ALTER INDEX test_idx RESET (int_option); +ERROR: unrecognized lock mode: 2139062143 INSERT INTO tst VALUES(1); -WARNING: int_option = 10 +WARNING: int_option = 5 DROP INDEX test_idx; SET dummy_index.do_test_reloption_int to false; -- Test behavior of real option (default and non default values) @@ -48,9 +50,10 @@ INSERT INTO tst VALUES(1); WARNING: bool_option = 1 ALTER INDEX test_idx SET (int_option = 5, bool_option = false); +ERROR: unrecognized lock mode: 2139062143 ALTER INDEX test_idx RESET (bool_option); INSERT INTO tst VALUES(1); -WARNING: bool_option = 1 +WARNING: No reloptions is set, default values will be chosen in module runtime DROP INDEX test_idx; SET dummy_index.do_test_reloption_bool to false; -- Test behavior of string option (default and non default values + validate @@ -68,12 +71,12 @@ WARNING: Validating string option 'Valid_value' WARNING: string_option = 'Valid_value' ALTER INDEX test_idx SET (string_option = "Valid_value_2", int_option = 5); -WARNING: Validating string option 'Valid_value_2' +ERROR: unrecognized lock mode: 2139062143 INSERT INTO tst VALUES(1); -WARNING: string_option = 'Valid_value_2' +WARNING: string_option = 'Valid_value' ALTER INDEX test_idx RESET (string_option); INSERT INTO tst VALUES(1); -WARNING: string_option = 'DefaultValue' +WARNING: No reloptions is set, default values will be chosen in module runtime DROP INDEX test_idx; SET dummy_index.do_test_reloption_string to false; -- Test behavior of second string option @@ -87,11 +90,12 @@ "Some_value"); WARNING: string_option2 = 'Some_value' ALTER INDEX test_idx SET (string_option2 = "Valid_value_2", int_option = 5); +ERROR: unrecognized lock mode: 2139062143 INSERT INTO tst VALUES(1); -WARNING: string_option2 = 'Valid_value_2' +WARNING: string_option2 = 'Some_value' ALTER INDEX test_idx RESET (string_option2); INSERT INTO tst VALUES(1); -WARNING: string_option2 = 'SecondDefaultValue' +WARNING: No reloptions is set, default values will be chosen in module runtime DROP INDEX test_idx; SET dummy_index.do_test_reloption_string2 to false; SET dummy_index.do_test_reloptions to false; -- Thomas Munro https://enterprisedb.com