pgsql: Make FSM test portable.

2019-02-03 Thread Amit Kapila
Make FSM test portable. In b0eaa4c51b, we allow FSM to be created only after 4 pages. One of the tests check the FSM contents and to do that it populates many tuples in the relation. The FSM contents depend on the availability of freespace in the page and it could vary because of the alignment o

pgsql: Avoid creation of the free space map for small heap relations, t

2019-02-03 Thread Amit Kapila
Avoid creation of the free space map for small heap relations, take 2. Previously, all heaps had FSMs. For very small tables, this means that the FSM took up more space than the heap did. This is wasteful, so now we refrain from creating the FSM for heaps with 4 pages or fewer. If the last known t

Re: pgsql: Avoid creation of the free space map for small heap relations.

2019-02-03 Thread Michael Paquier
On Mon, Jan 28, 2019 at 07:20:29AM +0100, John Naylor wrote: > That particular test could be removed -- it's just verifying behavior > that's already been there for years and is a direct consquence of > normal truncation combined with the addressing scheme of the FSM > logic. Moved to next CF, ple

pgsql: Clarify behavior of initdb's --allow-group-access on Windows in

2019-02-03 Thread Michael Paquier
Clarify behavior of initdb's --allow-group-access on Windows in docs The option is ignored on Windows, and GUC data_directory_mode already mentioned that within its description in the documentation. Author: Michael Paquier Reported-by: Haribabu Kommi, David Steele Discussion: https://postgr.es/m

pgsql: Clarify behavior of initdb's --allow-group-access on Windows in

2019-02-03 Thread Michael Paquier
Clarify behavior of initdb's --allow-group-access on Windows in docs The option is ignored on Windows, and GUC data_directory_mode already mentioned that within its description in the documentation. Author: Michael Paquier Reported-by: Haribabu Kommi, David Steele Discussion: https://postgr.es/m

pgsql: Add shared_memory_type GUC.

2019-02-03 Thread Thomas Munro
Add shared_memory_type GUC. Since 9.3 we have used anonymous shared mmap for our main shared memory region, except in EXEC_BACKEND builds. Provide a GUC so that users can opt for System V shared memory once again, like in 9.2 and earlier. A later patch proposes to add huge/large page support for

pgsql: Move page initialization from RelationAddExtraBlocks() to use, t

2019-02-03 Thread Andres Freund
Move page initialization from RelationAddExtraBlocks() to use, take 2. Previously we initialized pages when bulk extending in RelationAddExtraBlocks(). That has a major disadvantage: It ties RelationAddExtraBlocks() to heap, as other types of storage are likely to need different amounts of special

pgsql: Add PG_CFLAGS, PG_CXXFLAGS, and PG_LDFLAGS variables to PGXS

2019-02-03 Thread Michael Paquier
Add PG_CFLAGS, PG_CXXFLAGS, and PG_LDFLAGS variables to PGXS Add PG_CFLAGS, PG_CXXFLAGS, and PG_LDFLAGS variables to pgxs.mk which will be appended or prepended to the corresponding make variables. Notably, there was previously no way to pass custom CXXFLAGS to third party extension module builds,

pgsql: Add PG_CFLAGS, PG_CXXFLAGS, and PG_LDFLAGS variables to PGXS

2019-02-03 Thread Michael Paquier
Add PG_CFLAGS, PG_CXXFLAGS, and PG_LDFLAGS variables to PGXS Add PG_CFLAGS, PG_CXXFLAGS, and PG_LDFLAGS variables to pgxs.mk which will be appended or prepended to the corresponding make variables. Notably, there was previously no way to pass custom CXXFLAGS to third party extension module builds,

pgsql: Add PG_CFLAGS, PG_CXXFLAGS, and PG_LDFLAGS variables to PGXS

2019-02-03 Thread Michael Paquier
Add PG_CFLAGS, PG_CXXFLAGS, and PG_LDFLAGS variables to PGXS Add PG_CFLAGS, PG_CXXFLAGS, and PG_LDFLAGS variables to pgxs.mk which will be appended or prepended to the corresponding make variables. Notably, there was previously no way to pass custom CXXFLAGS to third party extension module builds,

pgsql: Add PG_CFLAGS, PG_CXXFLAGS, and PG_LDFLAGS variables to PGXS

2019-02-03 Thread Michael Paquier
Add PG_CFLAGS, PG_CXXFLAGS, and PG_LDFLAGS variables to PGXS Add PG_CFLAGS, PG_CXXFLAGS, and PG_LDFLAGS variables to pgxs.mk which will be appended or prepended to the corresponding make variables. Notably, there was previously no way to pass custom CXXFLAGS to third party extension module builds,

pgsql: Add PG_CFLAGS, PG_CXXFLAGS, and PG_LDFLAGS variables to PGXS

2019-02-03 Thread Michael Paquier
Add PG_CFLAGS, PG_CXXFLAGS, and PG_LDFLAGS variables to PGXS Add PG_CFLAGS, PG_CXXFLAGS, and PG_LDFLAGS variables to pgxs.mk which will be appended or prepended to the corresponding make variables. Notably, there was previously no way to pass custom CXXFLAGS to third party extension module builds,

pgsql: Add PG_CFLAGS, PG_CXXFLAGS, and PG_LDFLAGS variables to PGXS

2019-02-03 Thread Michael Paquier
Add PG_CFLAGS, PG_CXXFLAGS, and PG_LDFLAGS variables to PGXS Add PG_CFLAGS, PG_CXXFLAGS, and PG_LDFLAGS variables to pgxs.mk which will be appended or prepended to the corresponding make variables. Notably, there was previously no way to pass custom CXXFLAGS to third party extension module builds,