Skip to content

Fix build due to changes in PostgreSQL 16 #64

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 23, 2022
Merged

Conversation

MarinaPolyakova
Copy link
Contributor

  1. See the commit 3057465acfbea2f3dd7a914a1478064022c6eecd (Replace the sorted
    array of GUC variables with a hash table.) in PostgreSQL 16.

  2. See the commit 0fe954c28584169938e5c0738cfaa9930ce77577 (Add
    -Wshadow=compatible-local to the standard compilation flags) in PostgreSQL 16.

pg_wait_sampling.c: In function ‘pg_wait_sampling_get_current’:
pg_wait_sampling.c:454:42: warning: declaration of ‘params’ shadows a previous
local [-Wshadow=compatible-local]
  454 |                 WaitCurrentContext      *params;
      |                                          ^~~~~~
pg_wait_sampling.c:446:34: note: shadowed declaration is here
  446 |         WaitCurrentContext      *params;
      |                                  ^~~~~~

Marina Polyakova added 2 commits November 21, 2022 17:38
See the commit 3057465acfbea2f3dd7a914a1478064022c6eecd (Replace the sorted
array of GUC variables with a hash table.) in PostgreSQL 16.
See the commit 0fe954c28584169938e5c0738cfaa9930ce77577 (Add
-Wshadow=compatible-local to the standard compilation flags) in PostgreSQL 16.

pg_wait_sampling.c: In function ‘pg_wait_sampling_get_current’:
pg_wait_sampling.c:454:42: warning: declaration of ‘params’ shadows a previous
local [-Wshadow=compatible-local]
  454 |                 WaitCurrentContext      *params;
      |                                          ^~~~~~
pg_wait_sampling.c:446:34: note: shadowed declaration is here
  446 |         WaitCurrentContext      *params;
      |                                  ^~~~~~
AssertArg and AssertState were removed in PostgreSQL by commit #b1099eca8f.
Copy link
Contributor

@rzharkov rzharkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks well.
While I'm at it I have replace AssertState with Assert.
Please take a look on my commit.

@MarinaPolyakova
Copy link
Contributor Author

MarinaPolyakova commented Nov 23, 2022

pg_wait_sampling is PostgreSQL extension which requires PostgreSQL 9.6 or higher.

I checked that:

  1. AssertState is almost the same as Assert in REL9_6_STABLE (c.h):
#ifndef USE_ASSERT_CHECKING

#define Assert(condition)	((void)true)
#define AssertState(condition)	((void)true)

#elif defined(FRONTEND)

#define Assert(p) assert(p)
#define AssertState(condition) assert(condition)

#else							/* USE_ASSERT_CHECKING && !FRONTEND */

#define Assert(condition) \
		Trap(!(condition), "FailedAssertion")

#define AssertState(condition) \
		Trap(!(condition), "BadState")
		
#endif   /* USE_ASSERT_CHECKING && !FRONTEND */
  1. Build and tests (= make installcheck after adding conf.add to $PGDATA/postgresql.conf) passed with USE_PGXS=1 with REL9_6_STABLE and master.

Thank you!

@MarinaPolyakova MarinaPolyakova merged commit 544a4ee into master Nov 23, 2022
@MarinaPolyakova MarinaPolyakova deleted the PGPRO-7444 branch November 23, 2022 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants