pgsql: Add --min-xid-age and --min-mxid-age options to vacuumdb

2019-01-30 Thread Michael Paquier
Add --min-xid-age and --min-mxid-age options to vacuumdb These two new options can be used to improve the selectivity of relations to vacuum or analyze even further depending on the age of respectively their transaction ID or multixact ID, so as it is possible to prioritize tables to prevent wrapa

pgsql: Allow RECORD and RECORD[] to be specified in function coldeflist

2019-01-30 Thread Tom Lane
Allow RECORD and RECORD[] to be specified in function coldeflists. We can't allow these pseudo-types to be used as table column types, because storing an anonymous record value in a table would result in data that couldn't be understood by other sessions. However, it seems like there's no harm in

pgsql: Log PostgreSQL version number on startup

2019-01-30 Thread Peter Eisentraut
Log PostgreSQL version number on startup Logging the PostgreSQL version on startup is useful for two reasons: There is a clear marker in the log file that a new postmaster is beginning, and it's useful for tracking the server version across startup while upgrading. Author: Christoph Berg Discuss

pgsql: postmaster: Start syslogger earlier

2019-01-30 Thread Peter Eisentraut
postmaster: Start syslogger earlier When the syslogger was originally added (bdf8ef6925de6ea1a9330fa1ce32e1a315d07eb2), nothing was normally logged before the point where it was started. But since f9dfa5c9776649f769d537dd0923003b35f128de, the creation of sockets causes messages of level LOG to be

Re: pgsql: Change error handling of out of scope variables in ecpg.

2019-01-30 Thread Tom Lane
David Rowley writes: > I might be missing something here, but if you're changing the > signature of output_simple_statement(), wouldn't you also need to > change all calls to it too? ... including the ones in preproc.y? preproc.y is a generated file, not something that lives in git.

Re: pgsql: Change error handling of out of scope variables in ecpg.

2019-01-30 Thread David Rowley
On Thu, 31 Jan 2019 at 02:38, Michael Meskes wrote: > Change error handling of out of scope variables in ecpg. > > The function called can result in an out of memory error that subsequently was > disregarded. Instead it should set the appropriate SQL error variables and be > checked by whatever wh

Re: pgsql: Fix a crash in logical replication

2019-01-30 Thread Peter Eisentraut
On 30/01/2019 10:54, Alvaro Herrera wrote: > On 2019-Jan-30, Peter Eisentraut wrote: > >> Fix a crash in logical replication >> >> The bug was that determining which columns are part of the replica >> identity index using RelationGetIndexAttrBitmap() would run >> eval_const_expressions() on index

pgsql: Change error handling of out of scope variables in ecpg.

2019-01-30 Thread Michael Meskes
Change error handling of out of scope variables in ecpg. The function called can result in an out of memory error that subsequently was disregarded. Instead it should set the appropriate SQL error variables and be checked by whatever whenever statement is defined. Branch -- master Details --

pgsql: Fix a crash in logical replication

2019-01-30 Thread Peter Eisentraut
Fix a crash in logical replication The bug was that determining which columns are part of the replica identity index using RelationGetIndexAttrBitmap() would run eval_const_expressions() on index expressions and predicates across all indexes of the table, which in turn might require a snapshot, bu

pgsql: Fix a crash in logical replication

2019-01-30 Thread Peter Eisentraut
Fix a crash in logical replication The bug was that determining which columns are part of the replica identity index using RelationGetIndexAttrBitmap() would run eval_const_expressions() on index expressions and predicates across all indexes of the table, which in turn might require a snapshot, bu

pgsql: Fix a crash in logical replication

2019-01-30 Thread Peter Eisentraut
Fix a crash in logical replication The bug was that determining which columns are part of the replica identity index using RelationGetIndexAttrBitmap() would run eval_const_expressions() on index expressions and predicates across all indexes of the table, which in turn might require a snapshot, bu

pgsql: Fix a crash in logical replication

2019-01-30 Thread Peter Eisentraut
Fix a crash in logical replication The bug was that determining which columns are part of the replica identity index using RelationGetIndexAttrBitmap() would run eval_const_expressions() on index expressions and predicates across all indexes of the table, which in turn might require a snapshot, bu

pgsql: Fix a crash in logical replication

2019-01-30 Thread Peter Eisentraut
Fix a crash in logical replication The bug was that determining which columns are part of the replica identity index using RelationGetIndexAttrBitmap() would run eval_const_expressions() on index expressions and predicates across all indexes of the table, which in turn might require a snapshot, bu

Re: pgsql: Fix a crash in logical replication

2019-01-30 Thread Alvaro Herrera
On 2019-Jan-30, Peter Eisentraut wrote: > Fix a crash in logical replication > > The bug was that determining which columns are part of the replica > identity index using RelationGetIndexAttrBitmap() would run > eval_const_expressions() on index expressions and predicates across > all indexes of

pgsql: Make some ecpg test cases more robust against unexpected errors

2019-01-30 Thread Michael Meskes
Make some ecpg test cases more robust against unexpected errors that happen during development. Test cases themselves should not hang or segfault. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/e2f731cdba9b7a79cddc64325990a8f51818877b Modified Files --

pgsql: Make sure that ecpglib's statement variable has a defined value

2019-01-30 Thread Michael Meskes
Make sure that ecpglib's statement variable has a defined value no matter what. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/5c04630ad05e6e33bc18a6846b4086f9794d99e8 Modified Files -- src/interfaces/ecpg/ecpglib/execute.c | 2 +- 1 file changed, 1 inse

pgsql: Fix a crash in logical replication

2019-01-30 Thread Peter Eisentraut
Fix a crash in logical replication The bug was that determining which columns are part of the replica identity index using RelationGetIndexAttrBitmap() would run eval_const_expressions() on index expressions and predicates across all indexes of the table, which in turn might require a snapshot, bu