pgsql: Disable installcheck tests for test_session_hooks

Started by Andrew Dunstanover 8 years ago7 messageshackers
Jump to latest
#1Andrew Dunstan
andrew@dunslane.net

Disable installcheck tests for test_session_hooks

The module requires a preloaded library and the defect can't be cured by
a LOAD instruction in the test script. To achieve this we override the
installcheck target in the module's Makefile, and exclude ithe module in
vcregress.pl.

Along the way, revert commit 9989f92aabd.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/745948422c799c1b9f976ee30f21a7aac050e0f3

Modified Files
--------------
src/test/modules/Makefile | 1 +
src/test/modules/test_session_hooks/Makefile | 4 ++++
src/tools/msvc/vcregress.pl | 2 ++
3 files changed, 7 insertions(+)

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andrew Dunstan (#1)
Re: pgsql: Disable installcheck tests for test_session_hooks

Andrew Dunstan <andrew@dunslane.net> writes:

Disable installcheck tests for test_session_hooks

This seems not quite right; it's causing warnings like this:

$ make -s clean
Makefile:25: warning: overriding commands for target `installcheck'
../../../../src/makefiles/pgxs.mk:275: warning: ignoring old commands for target `installcheck'

regards, tom lane

#3Michael Paquier
michael@paquier.xyz
In reply to: Tom Lane (#2)
Re: pgsql: Disable installcheck tests for test_session_hooks

On Thu, Nov 16, 2017 at 11:41 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Andrew Dunstan <andrew@dunslane.net> writes:

Disable installcheck tests for test_session_hooks

This seems not quite right; it's causing warnings like this:

$ make -s clean
Makefile:25: warning: overriding commands for target `installcheck'
../../../../src/makefiles/pgxs.mk:275: warning: ignoring old commands for target `installcheck'

This is caused by the fact that installcheck gets defined because of
REGRESS. This stuff should do something similar to what is done in
contrib/test_decoding/Makefile, and I think that it would be useful to
have the option to force installcheck on an installation that has all
the needed parameters set. With this last point, I think that the
test_session_hooks.sql should drop the roles it created. Attached is a
cleanup patch (includes fixes for compilation warnings).
--
Michael

Attachments:

session_hook_makefile_clean.patchapplication/octet-stream; name=session_hook_makefile_clean.patchDownload+42-11
#4Michael Paquier
michael@paquier.xyz
In reply to: Michael Paquier (#3)
Re: pgsql: Disable installcheck tests for test_session_hooks

On Thu, Nov 16, 2017 at 3:45 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:

On Thu, Nov 16, 2017 at 11:41 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Andrew Dunstan <andrew@dunslane.net> writes:

Disable installcheck tests for test_session_hooks

This seems not quite right; it's causing warnings like this:

$ make -s clean
Makefile:25: warning: overriding commands for target `installcheck'
../../../../src/makefiles/pgxs.mk:275: warning: ignoring old commands for target `installcheck'

This is caused by the fact that installcheck gets defined because of
REGRESS. This stuff should do something similar to what is done in
contrib/test_decoding/Makefile, and I think that it would be useful to
have the option to force installcheck on an installation that has all
the needed parameters set. With this last point, I think that the
test_session_hooks.sql should drop the roles it created. Attached is a
cleanup patch (includes fixes for compilation warnings).

Just sending an updated patch to cope with the fact that this module
does not need to define the EXTENSION and DATA fields, and does not
need a sql and a control file..
--
Michael

Attachments:

session_hook_makefile_clean_v2.patchapplication/octet-stream; name=session_hook_makefile_clean_v2.patchDownload+41-20
#5Ashutosh Sharma
ashu.coek88@gmail.com
In reply to: Michael Paquier (#4)
Re: pgsql: Disable installcheck tests for test_session_hooks

Hi Michael,

On Thu, Nov 16, 2017 at 6:44 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:

On Thu, Nov 16, 2017 at 3:45 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:

On Thu, Nov 16, 2017 at 11:41 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Andrew Dunstan <andrew@dunslane.net> writes:

Disable installcheck tests for test_session_hooks

This seems not quite right; it's causing warnings like this:

$ make -s clean
Makefile:25: warning: overriding commands for target `installcheck'
../../../../src/makefiles/pgxs.mk:275: warning: ignoring old commands for target `installcheck'

This is caused by the fact that installcheck gets defined because of
REGRESS. This stuff should do something similar to what is done in
contrib/test_decoding/Makefile, and I think that it would be useful to
have the option to force installcheck on an installation that has all
the needed parameters set. With this last point, I think that the
test_session_hooks.sql should drop the roles it created. Attached is a
cleanup patch (includes fixes for compilation warnings).

Just sending an updated patch to cope with the fact that this module
does not need to define the EXTENSION and DATA fields, and does not
need a sql and a control file..

While running make check with 'session_hook_makefile_v2.patch'
applied, i could see the background worker (logical replication
process) getting aborted due to assertion failure. Here are the logs
observed in 'logs/postmaster.log' file.

2017-11-16 19:06:21.748 IST [65382] LOG: checkpoint complete: wrote 3
buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled;
write=0.000 s, sync=0.000 s, total=0.001 s; sync files=0,
longest=0.000 s, average=0.000 s; distance=1 kB, estimate=1 kB
2017-11-16 19:06:21.869 IST [65382] LOG: checkpoint starting:
immediate force wait
2017-11-16 19:06:21.870 IST [65382] LOG: checkpoint complete: wrote 0
buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled;
write=0.000 s, sync=0.000 s, total=0.000 s; sync files=0,
longest=0.000 s, average=0.000 s; distance=0 kB, estimate=1 kB
2017-11-16 19:06:22.059 IST [65378] LOG: received fast shutdown request
2017-11-16 19:06:22.059 IST [65378] LOG: aborting any active transactions
TRAP: BadState("!(((bool) ((CurrentUserId) != ((Oid) 0))))", File:
"miscinit.c", Line: 286)
2017-11-16 19:06:22.090 IST [65378] LOG: background worker "logical
replication launcher" (PID 65387) exited with exit code 1
2017-11-16 19:06:22.337 IST [65378] LOG: autovacuum launcher process
(PID 65385) was terminated by signal 6: Aborted
2017-11-16 19:06:22.337 IST [65378] LOG: terminating any other active
server processes

--
With Regards,
Ashutosh Sharma
EnterpriseDB:http://www.enterprisedb.com

#6Andrew Dunstan
andrew@dunslane.net
In reply to: Ashutosh Sharma (#5)
Re: pgsql: Disable installcheck tests for test_session_hooks

On 11/16/2017 09:14 AM, Ashutosh Sharma wrote:

Just sending an updated patch to cope with the fact that this module
does not need to define the EXTENSION and DATA fields, and does not
need a sql and a control file..

While running make check with 'session_hook_makefile_v2.patch'
applied, i could see the background worker (logical replication
process) getting aborted due to assertion failure. Here are the logs
observed in 'logs/postmaster.log' file.

2017-11-16 19:06:21.748 IST [65382] LOG: checkpoint complete: wrote 3
buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled;
write=0.000 s, sync=0.000 s, total=0.001 s; sync files=0,
longest=0.000 s, average=0.000 s; distance=1 kB, estimate=1 kB
2017-11-16 19:06:21.869 IST [65382] LOG: checkpoint starting:
immediate force wait
2017-11-16 19:06:21.870 IST [65382] LOG: checkpoint complete: wrote 0
buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled;
write=0.000 s, sync=0.000 s, total=0.000 s; sync files=0,
longest=0.000 s, average=0.000 s; distance=0 kB, estimate=1 kB
2017-11-16 19:06:22.059 IST [65378] LOG: received fast shutdown request
2017-11-16 19:06:22.059 IST [65378] LOG: aborting any active transactions
TRAP: BadState("!(((bool) ((CurrentUserId) != ((Oid) 0))))", File:
"miscinit.c", Line: 286)
2017-11-16 19:06:22.090 IST [65378] LOG: background worker "logical
replication launcher" (PID 65387) exited with exit code 1
2017-11-16 19:06:22.337 IST [65378] LOG: autovacuum launcher process
(PID 65385) was terminated by signal 6: Aborted
2017-11-16 19:06:22.337 IST [65378] LOG: terminating any other active
server processes

Ugh. I'm just going to revert the whole thing for now until we sort out
all the issues. 

cheers

andrew

--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#7Fabrízio de Royes Mello
fabriziomello@gmail.com
In reply to: Andrew Dunstan (#6)
Re: pgsql: Disable installcheck tests for test_session_hooks

On Thu, Nov 16, 2017 at 2:21 PM, Andrew Dunstan <
andrew.dunstan@2ndquadrant.com> wrote:

On 11/16/2017 09:14 AM, Ashutosh Sharma wrote:

Just sending an updated patch to cope with the fact that this module
does not need to define the EXTENSION and DATA fields, and does not
need a sql and a control file..

While running make check with 'session_hook_makefile_v2.patch'
applied, i could see the background worker (logical replication
process) getting aborted due to assertion failure. Here are the logs
observed in 'logs/postmaster.log' file.

2017-11-16 19:06:21.748 IST [65382] LOG: checkpoint complete: wrote 3
buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled;
write=0.000 s, sync=0.000 s, total=0.001 s; sync files=0,
longest=0.000 s, average=0.000 s; distance=1 kB, estimate=1 kB
2017-11-16 19:06:21.869 IST [65382] LOG: checkpoint starting:
immediate force wait
2017-11-16 19:06:21.870 IST [65382] LOG: checkpoint complete: wrote 0
buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled;
write=0.000 s, sync=0.000 s, total=0.000 s; sync files=0,
longest=0.000 s, average=0.000 s; distance=0 kB, estimate=1 kB
2017-11-16 19:06:22.059 IST [65378] LOG: received fast shutdown request
2017-11-16 19:06:22.059 IST [65378] LOG: aborting any active

transactions

TRAP: BadState("!(((bool) ((CurrentUserId) != ((Oid) 0))))", File:
"miscinit.c", Line: 286)
2017-11-16 19:06:22.090 IST [65378] LOG: background worker "logical
replication launcher" (PID 65387) exited with exit code 1
2017-11-16 19:06:22.337 IST [65378] LOG: autovacuum launcher process
(PID 65385) was terminated by signal 6: Aborted
2017-11-16 19:06:22.337 IST [65378] LOG: terminating any other active
server processes

Ugh. I'm just going to revert the whole thing for now until we sort out
all the issues.

I'm looking into it.

Regards,

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL

Show quoted text

Timbira: http://www.timbira.com.br
Blog: http://fabriziomello.github.io
Linkedin: http://br.linkedin.com/in/fabriziomello
Twitter: http://twitter.com/fabriziomello
Github: http://github.com/fabriziomello