pgsql: postgres_fdw: Allow application_name of remote connection to be

2021-09-06 Thread Fujii Masao
postgres_fdw: Allow application_name of remote connection to be set via GUC. This commit adds postgres_fdw.application_name GUC which specifies a value for application_name configuration parameter used when postgres_fdw establishes a connection to a foreign server. This GUC setting always override

pgsql: Log new catalog xmin candidate in LogicalIncreaseXminForSlot().

2021-09-06 Thread Amit Kapila
Log new catalog xmin candidate in LogicalIncreaseXminForSlot(). Similar to LogicalIncreaseRestartDecodingForSlot() add a debug message to LogicalIncreaseXminForSlot() reporting a new catalog_xmin candidate. This just adds additional diagnostic information during logical decoding that can aid debu

pgsql: Further fix psql query-cancel test.

2021-09-06 Thread Tom Lane
Further fix psql query-cancel test. The query to wait for pg_sleep to be running did no such thing, because the regex pattern it used could match itself. Report: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=conchuela&dt=2021-09-06%2018%3A00%3A20 Branch -- master Details ---

pgsql: AIX: Fix missing libpq symbols by respecting SHLIB_EXPORTS.

2021-09-06 Thread Noah Misch
AIX: Fix missing libpq symbols by respecting SHLIB_EXPORTS. We make each AIX shared library export all globals found in .o files that originate in the library. That doesn't include symbols acquired by -lpgcommon_shlib. That is good on average, but it became a problem for libpq when commit e6afa8

pgsql: AIX: Fix missing libpq symbols by respecting SHLIB_EXPORTS.

2021-09-06 Thread Noah Misch
AIX: Fix missing libpq symbols by respecting SHLIB_EXPORTS. We make each AIX shared library export all globals found in .o files that originate in the library. That doesn't include symbols acquired by -lpgcommon_shlib. That is good on average, but it became a problem for libpq when commit e6afa8

pgsql: AIX: Fix missing libpq symbols by respecting SHLIB_EXPORTS.

2021-09-06 Thread Noah Misch
AIX: Fix missing libpq symbols by respecting SHLIB_EXPORTS. We make each AIX shared library export all globals found in .o files that originate in the library. That doesn't include symbols acquired by -lpgcommon_shlib. That is good on average, but it became a problem for libpq when commit e6afa8

pgsql: Add PublicationTable and PublicationRelInfo structs

2021-09-06 Thread Alvaro Herrera
Add PublicationTable and PublicationRelInfo structs These encapsulate a relation when referred from replication DDL. Currently they don't do anything useful (they're just wrappers around RangeVar and Relation respectively) but in the future they'll be used to carry column lists. Extracted from a

pgsql: Fix actively-misleading comments about the contents of struct pg

2021-09-06 Thread Tom Lane
Fix actively-misleading comments about the contents of struct pg_tm. pgtime.h documented the PG interpretation of tm_mon right alongside the POSIX interpretation of tm_year, with no hint that neither comment was correct throughout our code. Perhaps someday we ought to switch to using two separate

pgsql: Fix bogus timetz_zone() results for DYNTZ abbreviations.

2021-09-06 Thread Tom Lane
Fix bogus timetz_zone() results for DYNTZ abbreviations. timetz_zone() delivered completely wrong answers if the zone was specified by a dynamic TZ abbreviation, because it failed to account for the difference between the POSIX conventions for field values in struct pg_tm and the conventions used

pgsql: Fix bogus timetz_zone() results for DYNTZ abbreviations.

2021-09-06 Thread Tom Lane
Fix bogus timetz_zone() results for DYNTZ abbreviations. timetz_zone() delivered completely wrong answers if the zone was specified by a dynamic TZ abbreviation, because it failed to account for the difference between the POSIX conventions for field values in struct pg_tm and the conventions used

pgsql: Fix bogus timetz_zone() results for DYNTZ abbreviations.

2021-09-06 Thread Tom Lane
Fix bogus timetz_zone() results for DYNTZ abbreviations. timetz_zone() delivered completely wrong answers if the zone was specified by a dynamic TZ abbreviation, because it failed to account for the difference between the POSIX conventions for field values in struct pg_tm and the conventions used

pgsql: Fix bogus timetz_zone() results for DYNTZ abbreviations.

2021-09-06 Thread Tom Lane
Fix bogus timetz_zone() results for DYNTZ abbreviations. timetz_zone() delivered completely wrong answers if the zone was specified by a dynamic TZ abbreviation, because it failed to account for the difference between the POSIX conventions for field values in struct pg_tm and the conventions used

pgsql: Fix bogus timetz_zone() results for DYNTZ abbreviations.

2021-09-06 Thread Tom Lane
Fix bogus timetz_zone() results for DYNTZ abbreviations. timetz_zone() delivered completely wrong answers if the zone was specified by a dynamic TZ abbreviation, because it failed to account for the difference between the POSIX conventions for field values in struct pg_tm and the conventions used

pgsql: Fix bogus timetz_zone() results for DYNTZ abbreviations.

2021-09-06 Thread Tom Lane
Fix bogus timetz_zone() results for DYNTZ abbreviations. timetz_zone() delivered completely wrong answers if the zone was specified by a dynamic TZ abbreviation, because it failed to account for the difference between the POSIX conventions for field values in struct pg_tm and the conventions used

pgsql: Make timetz_zone() stable, and correct a bug for DYNTZ abbreviat

2021-09-06 Thread Tom Lane
Make timetz_zone() stable, and correct a bug for DYNTZ abbreviations. Historically, timetz_zone() has used time(NULL) as the reference point for deciding whether DST is active. That means its result can change intra-statement, requiring it to be marked VOLATILE (cf. 35979e6c3). But that definitio

Re: pgsql: Fix segfault during EvalPlanQual with mix of local and foreign p

2021-09-06 Thread Amit Langote
On Thu, Aug 12, 2021 at 5:39 PM Heikki Linnakangas wrote: > Fix segfault during EvalPlanQual with mix of local and foreign partitions. > > It's not sensible to re-evaluate a direct-modify Foreign Update or Delete > during EvalPlanQual. However, ExecInitForeignScan() can still get called > if a tab

pgsql: Fix typo in comments.

2021-09-06 Thread Fujii Masao
Fix typo in comments. Author: Hou Zhijie Discussion: https://postgr.es/m/os0pr01mb5716e6a6535fdfdc5a1b004194...@os0pr01mb5716.jpnprd01.prod.outlook.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/78aa616be74a13156f4fc8db3a131f1fdc2cce47 Modified Files

pgsql: Fix pkg-config files for static linking

2021-09-06 Thread Peter Eisentraut
Fix pkg-config files for static linking Since ea53100d5 (PostgreSQL 12), the shipped pkg-config files have been broken for statically linking libpq because libpgcommon and libpgport are missing. This patch adds those two missing private dependencies (in a non-hardcoded way). Reported-by: Filip G

pgsql: Fix pkg-config files for static linking

2021-09-06 Thread Peter Eisentraut
Fix pkg-config files for static linking Since ea53100d5 (PostgreSQL 12), the shipped pkg-config files have been broken for statically linking libpq because libpgcommon and libpgport are missing. This patch adds those two missing private dependencies (in a non-hardcoded way). Reported-by: Filip G

pgsql: Fix pkg-config files for static linking

2021-09-06 Thread Peter Eisentraut
Fix pkg-config files for static linking Since ea53100d5 (PostgreSQL 12), the shipped pkg-config files have been broken for statically linking libpq because libpgcommon and libpgport are missing. This patch adds those two missing private dependencies (in a non-hardcoded way). Reported-by: Filip G

pgsql: Improve fix pkg-config files for static linking

2021-09-06 Thread Peter Eisentraut
Improve fix pkg-config files for static linking Amend 4c2eab3a0dec2eae40892fb525830a5947a398c7 to link against the libraries without the "_shlib" suffix, since this is meant for static linking. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/55392bc5b0e0c1a8045627bb