pgsql: Simplify main waiting loop of the archiver process

2023-01-31 Thread Michael Paquier
Simplify main waiting loop of the archiver process As coded, the timeout given to WaitLatch() was always equal to PGARCH_AUTOWAKE_INTERVAL, as time() was called two times repeatedly. This simplification could have been done in d75288f. While on it, this adjusts a comment in pgarch.c to describe t

pgsql: dblink: Fix variable confusion introduced in e4602483e95

2023-01-31 Thread Andres Freund
dblink: Fix variable confusion introduced in e4602483e95 Thanks to Robins to find the issue and Nathan for promptly writing a test case to prevent future problems like this. Reported-by: Nathan Bossart Reported-by: Robins Tharakan Author: Nathan Bossart Discussion: https://postgr.es/m/20230130

pgsql: Try to fix pg_upgrade test on Windows, again.

2023-01-31 Thread Thomas Munro
Try to fix pg_upgrade test on Windows, again. Further to commit 54e72b66e, if rmtree() fails while cleaning up in pg_upgrade, try again. This gives our Windows unlink() wrapper a chance to reach its wait-for-the-other-process-to-go-away logic, if the first go around initiated the unlink of a file

pgsql: Update time zone data files to tzdata release 2022g.

2023-01-31 Thread Tom Lane
Update time zone data files to tzdata release 2022g. DST law changes in Greenland and Mexico. Notably, a new timezone America/Ciudad_Juarez has been split off from America/Ojinaga. Historical corrections for northern Canada, Colombia, and Singapore. Branch -- REL_15_STABLE Details ---

pgsql: Update time zone data files to tzdata release 2022g.

2023-01-31 Thread Tom Lane
Update time zone data files to tzdata release 2022g. DST law changes in Greenland and Mexico. Notably, a new timezone America/Ciudad_Juarez has been split off from America/Ojinaga. Historical corrections for northern Canada, Colombia, and Singapore. Branch -- REL_11_STABLE Details ---

pgsql: Update time zone data files to tzdata release 2022g.

2023-01-31 Thread Tom Lane
Update time zone data files to tzdata release 2022g. DST law changes in Greenland and Mexico. Notably, a new timezone America/Ciudad_Juarez has been split off from America/Ojinaga. Historical corrections for northern Canada, Colombia, and Singapore. Branch -- REL_13_STABLE Details ---

pgsql: Update time zone data files to tzdata release 2022g.

2023-01-31 Thread Tom Lane
Update time zone data files to tzdata release 2022g. DST law changes in Greenland and Mexico. Notably, a new timezone America/Ciudad_Juarez has been split off from America/Ojinaga. Historical corrections for northern Canada, Colombia, and Singapore. Branch -- REL_14_STABLE Details ---

pgsql: Update time zone data files to tzdata release 2022g.

2023-01-31 Thread Tom Lane
Update time zone data files to tzdata release 2022g. DST law changes in Greenland and Mexico. Notably, a new timezone America/Ciudad_Juarez has been split off from America/Ojinaga. Historical corrections for northern Canada, Colombia, and Singapore. Branch -- master Details --- https:/

pgsql: Update time zone data files to tzdata release 2022g.

2023-01-31 Thread Tom Lane
Update time zone data files to tzdata release 2022g. DST law changes in Greenland and Mexico. Notably, a new timezone America/Ciudad_Juarez has been split off from America/Ojinaga. Historical corrections for northern Canada, Colombia, and Singapore. Branch -- REL_12_STABLE Details ---

pgsql: Remove dead NoMovementScanDirection code

2023-01-31 Thread David Rowley
Remove dead NoMovementScanDirection code Here remove some dead code from heapgettup() and heapgettup_pagemode() which was trying to support NoMovementScanDirection scans. This code can never be reached as standard_ExecutorRun() never calls ExecutePlan with NoMovementScanDirection. Additionally,

pgsql: Doc: clarify use of NULL to drop comments and security labels.

2023-01-31 Thread Tom Lane
Doc: clarify use of NULL to drop comments and security labels. This was only mentioned in the description of the text/label, which are marked as being in quotes in the synopsis, which can cause confusion (as witnessed on IRC). Also separate the literal and NULL cases in the parameter list, per su

pgsql: Doc: clarify use of NULL to drop comments and security labels.

2023-01-31 Thread Tom Lane
Doc: clarify use of NULL to drop comments and security labels. This was only mentioned in the description of the text/label, which are marked as being in quotes in the synopsis, which can cause confusion (as witnessed on IRC). Also separate the literal and NULL cases in the parameter list, per su

pgsql: Doc: clarify use of NULL to drop comments and security labels.

2023-01-31 Thread Tom Lane
Doc: clarify use of NULL to drop comments and security labels. This was only mentioned in the description of the text/label, which are marked as being in quotes in the synopsis, which can cause confusion (as witnessed on IRC). Also separate the literal and NULL cases in the parameter list, per su

pgsql: Doc: clarify use of NULL to drop comments and security labels.

2023-01-31 Thread Tom Lane
Doc: clarify use of NULL to drop comments and security labels. This was only mentioned in the description of the text/label, which are marked as being in quotes in the synopsis, which can cause confusion (as witnessed on IRC). Also separate the literal and NULL cases in the parameter list, per su

pgsql: Doc: clarify use of NULL to drop comments and security labels.

2023-01-31 Thread Tom Lane
Doc: clarify use of NULL to drop comments and security labels. This was only mentioned in the description of the text/label, which are marked as being in quotes in the synopsis, which can cause confusion (as witnessed on IRC). Also separate the literal and NULL cases in the parameter list, per su

pgsql: Doc: clarify use of NULL to drop comments and security labels.

2023-01-31 Thread Tom Lane
Doc: clarify use of NULL to drop comments and security labels. This was only mentioned in the description of the text/label, which are marked as being in quotes in the synopsis, which can cause confusion (as witnessed on IRC). Also separate the literal and NULL cases in the parameter list, per su

Re: pgsql: Make Vars be outer-join-aware.

2023-01-31 Thread Tom Lane
Robins Tharakan writes: > Since this commit, my test setup is triggering asserts every few minutes. I concluded that assert was just wrong, and removed it. Maybe there is some weaker assertion we could make, but it'd require passing down more context than fix_scan_expr gets now, and it doesn't s

pgsql: Remove over-optimistic Assert.

2023-01-31 Thread Tom Lane
Remove over-optimistic Assert. In commit 2489d76c4, I'd thought it'd be safe to assert that a PlaceHolderVar appearing in a scan-level expression has empty nullingrels. However this is not so, as when we determine that a join relation is certainly empty we'll put its targetlist into a Result-with

Re: pgsql: Make Vars be outer-join-aware.

2023-01-31 Thread Tom Lane
Robins Tharakan writes: > Since this commit, my test setup is triggering asserts every few minutes. > The repro SQL itself doesn't make much sense, but it's the smallest I could > narrow it down to: > create table t1(a int); > create table t2(a int); > SELECT table_catalog AS c2 > FROM public.t1