postgres-xl.git
9 years agoLook at hash joinable operator instead of type-equality while deciding on xl_dbt3_expt
Pavan Deolasee [Thu, 20 Aug 2015 05:13:37 +0000 (10:43 +0530)]
Look at hash joinable operator instead of type-equality while deciding on
restriction for remote subplan

This should help multiple cases such as a simple SELECT query on a INT2 or INT8
distribution column and an integer constant or a join between two tables on
columns of mixed types such as INT2/INT4/INT8 or FLOAT4/FLOAT8

9 years agoUse ErrorContext to save error messages in ResponseCombiner.
Pavan Deolasee [Wed, 19 Aug 2015 03:13:23 +0000 (08:43 +0530)]
Use ErrorContext to save error messages in ResponseCombiner.

This should avoid any references to memory which gets otherwise freed during
error handling. Also make sure that remote transactions are properly aborted
upon failure to send commands

9 years agoCommit a patch submitted by [email protected] to fix a race condition in
Pavan Deolasee [Wed, 19 Aug 2015 03:10:34 +0000 (08:40 +0530)]
Commit a patch submitted by [email protected] to fix a race condition in
SharedQueueUnBind

We found it was caused by SQueuesLock race condition between SharedQueueUnBind
and SharedQueueBind. In rare situation, for example, when cluster memory is
low, processes running much slower, when producer process timeout and wait on
SQueuesLock, some consumers just enter SharedQueueBind and successfully attach
to the shared queue. After SharedQueueBind release SQueuesLock
SharedQueueUnBind just remove the shared queue from SharedQueues, and set
sq_sync to NULL.When SharedQueueRead, the consumer coredump for SEGV.
The fix is when SharedQueueUnBind got SQueuesLock, recheck whether there are
still consumers running on the shared queue, if so, SharedQueueUnBind need to
wait until no more consumers running or timeout. The patch also fix the
SharedQueues search failure elog in SharedQueueBind to ERROR to avoid
unnecessary cluster reinitialize.

9 years agoRevert changes made to join pushdown for materialised views.
Pavan Deolasee [Wed, 19 Aug 2015 03:08:27 +0000 (08:38 +0530)]
Revert changes made to join pushdown for materialised views.

Its not clear at the moment, but some of them might be hurting DBT3 query
performance

9 years agoWait for 10 seconds for consumers to finish before destroying shared q.
Pavan Deolasee [Tue, 18 Aug 2015 11:59:20 +0000 (17:29 +0530)]
Wait for 10 seconds for consumers to finish before destroying shared q.

This matches with the comments and timeout in SharedQueueUnBind()

9 years agoChange several messages from LOG to DEBUG1/DEBUG2
Pavan Deolasee [Tue, 18 Aug 2015 11:43:49 +0000 (17:13 +0530)]
Change several messages from LOG to DEBUG1/DEBUG2

9 years agoFree queryDesc while dropping a portal.
Pavan Deolasee [Tue, 18 Aug 2015 11:36:23 +0000 (17:06 +0530)]
Free queryDesc while dropping a portal.

Once we decide that the portal is no longer an active producing portal, we
decide to release all resources. But before that we must free the queryDesc and
unregister any snapshots to avoid snapshot-leak warnings later on

9 years agoRemember the restrictInfo clauses which were pushed down to inner parameterised
Pavan Deolasee [Tue, 18 Aug 2015 11:33:53 +0000 (17:03 +0530)]
Remember the restrictInfo clauses which were pushed down to inner parameterised
scans

We later use them to decide the actual subset of nodes where joins must be
pushed down. Without that we may push the plan to more nodes than necessary
because we would never look at the restrictInfo clauses which were removed
because of parameterised scans

9 years agoAvoid referencing a NULL pointer when GTM fails to create a socket
Pavan Deolasee [Thu, 13 Aug 2015 06:18:15 +0000 (11:48 +0530)]
Avoid referencing a NULL pointer when GTM fails to create a socket

9 years agoMake sequence_range GUC to be part of COORDINATORS group.
Pavan Deolasee [Thu, 13 Aug 2015 04:39:26 +0000 (10:09 +0530)]
Make sequence_range GUC to be part of COORDINATORS group.

We were oddly tryin to add it to two groups, COORDINATORS and DATA_NODES which
clearly does not work.

9 years agoFix issues with ANALYZE command
Pavan Deolasee [Wed, 5 Aug 2015 05:04:02 +0000 (10:34 +0530)]
Fix issues with ANALYZE command

ANALYZE command was failing to fetch the relation statistics such as relpages
and reltuples from the datanodes. This could result gross planner errors and
generation of very bad plans, as seen in DBT3 benchmark. We now pull relation
stats from the datanodes at ANALYZE time, just the way we do at VACUUM time.
There was also a lingering bug where the results of ANALYZE command on a
datanode won't be available to the coordinator. This turned out to be because
of using a stale snapshot and hence coordinator fails to see the new data
generated by previous ANALYZE command. We fix that by taking a fresh snapshot
at the coordinator and sending that down to the datanodes

9 years agoTurn a message about buffering connection to DEBUG2 from LOG
Pavan Deolasee [Wed, 5 Aug 2015 05:03:07 +0000 (10:33 +0530)]
Turn a message about buffering connection to DEBUG2 from LOG

It was unnecessarily cluttering the logs

9 years agoFix markup in docs.
Pavan Deolasee [Thu, 23 Jul 2015 10:39:51 +0000 (16:09 +0530)]
Fix markup in docs.

Patch by Mark Wong

9 years agoAdd a facility to track waited-for XIDs for a transaction
Pavan Deolasee [Mon, 20 Jul 2015 11:54:49 +0000 (17:24 +0530)]
Add a facility to track waited-for XIDs for a transaction

A transaction may wait for one or more transactions to finish before proceeding
with its operation. For example, an UPDATEing transaction may wait for other
transaction if it has already updated/deleted the tuple and decide the next
action based on other transaction's outcome as well as its own isolation level.
Sometimes it may happen a transaction is marked as committed on a datanode, but
GTM has not yet received a message to this effect. We have seen that this can
lead to breakage in MVCC properties when more than one tuple version may
satisfy MVCC checks. For specifically, when a transaction which is already
committed on the datanode is still seen as in-progress, but a later transaction
which again updated the same tuple is seen as committed as per a snapshot
obtained from GTM. Such snapshots can see both, most old and most recent
versions of a tuple as visible.

This patch adds an ability to track XIDs on which a transaction may have waited
and later sends that list to GTM. GTM must not commit a transaction unless all
such transactions on which it has waited for are also finished. Till such time,
GTM will send back STATUS_DELAYED response to the client. The client must retry
commit until its done. We believe the window is extremely small and its a
corner case. So such retries should not add much overhead to the system.

9 years agoForce XID assignment before a snapshot is obtained on a local coordinator
Pavan Deolasee [Fri, 17 Jul 2015 07:16:38 +0000 (12:46 +0530)]
Force XID assignment before a snapshot is obtained on a local coordinator

Without an XID, GTM does not have a way to track xmin of every open snapshot
and that can lead to early advancing of RecentGlobalXmin.

We need a mechanism to track such snapshots over their lifetime. But till that
infrastructure is added, we force XID assignment at the local coordinator. We
are still being a bit lax about doing it on a datanode when a snapshot is
directly requested by a datanode. Keeping watch for any side-effects of that
until a proper infrastructure is added

9 years agoUser GXID instead of Transaction Handle while sending backup actions to the GTM
Pavan Deolasee [Fri, 17 Jul 2015 06:06:54 +0000 (11:36 +0530)]
User GXID instead of Transaction Handle while sending backup actions to the GTM
standby

Transaction handles are indexes into a global array of GTM_TransactionInfo
structures. So they are very local to the GTM master. While there was an idea
to send them back to the client as identifiers for quick look-up in further
communications, we never traded that path. So it does not makes sense to back
them up on the standbys.

9 years agoReduce timeout for poll() from 1000ms to 10ms in GTM proxy.
Pavan Deolasee [Thu, 9 Jul 2015 06:04:58 +0000 (11:34 +0530)]
Reduce timeout for poll() from 1000ms to 10ms in GTM proxy.

This was a source of significant slow down for regression tests when tested in
a setup with GTM proxies. When there are not many concurrent clients connecting
to a GTM proxy, poll() may not return until timeout occurs, thus slowing
requests coming after the poll was started

make installcheck now runs at least 3 times faster with GTM proxies

9 years agoFix broken protocol between clients and GTM for snapshot messages
Pavan Deolasee [Thu, 9 Jul 2015 05:27:47 +0000 (10:57 +0530)]
Fix broken protocol between clients and GTM for snapshot messages

We'd recently changed handling of MSG_SNAPSHOT_GET and MSG_SNAPSHOT_MULTI_GET
messages on GTM and GTM proxy. But that broke the case when the setup does not
include any proxies. This patch fixes that case.

Report by Stas Kelvich. Patch by me

9 years agoHandle deferred triggers and close portals before starting 2 phase commit
Pavan Deolasee [Fri, 3 Jul 2015 10:07:46 +0000 (15:37 +0530)]
Handle deferred triggers and close portals before starting 2 phase commit

At the end of the 2PC, coordinator closes connections to the remote nodes. So a
subsequent attempt to close open Remote Subplans throw an error "Failed to
synchronize data node".

9 years agoFix expected output for testcase 'collate' now that error HINTs are sent
Pavan Deolasee [Thu, 2 Jul 2015 07:29:35 +0000 (12:59 +0530)]
Fix expected output for testcase 'collate' now that error HINTs are sent
back to clients correctly

9 years agoAdd support to receive error HINTs from remote nodes and send it back to the
Pavan Deolasee [Thu, 2 Jul 2015 06:31:15 +0000 (12:01 +0530)]
Add support to receive error HINTs from remote nodes and send it back to the
client along with the error message

While we were collecting error and detail messages, the hints were lost during
coordinator-datanode communucation. So clients would not see these hints. Fix
that by tracking the hints received in the response combiner and sending them
back to the client along with the error message

9 years agoChange expected output for testcase 'tablesample'
Pavan Deolasee [Wed, 1 Jul 2015 09:52:49 +0000 (15:22 +0530)]
Change expected output for testcase 'tablesample'

Since table gets hash distributed to all datanodes, the sampling results vary
in XL. For a sufficiently large and well distributed table, sample count should
look fairly similar as compared to vanilla PostgreSQL. But since the test works
with a very small table, results look skewed in XL.

(The test still does not pass because the HINT returned by the datanode is not
returned to the frontend client and hence that shows up in the diff. But this
is a different bug and will be fixed separately)

9 years agoAdd necessary machinery to support for TABLESAMPLE clause
Pavan Deolasee [Wed, 1 Jul 2015 09:33:45 +0000 (15:03 +0530)]
Add necessary machinery to support for TABLESAMPLE clause

The required infrastructure to distribute SampleScan to the remote node was
missing. Also, necessary _read function was missing to convert a string
representation of SampleScan node to its binary equivalent. This patch adds all
of that

9 years agoDo not error out if transaction type is INTERNALOID for aggregates
Pavan Deolasee [Wed, 1 Jul 2015 07:36:00 +0000 (13:06 +0530)]
Do not error out if transaction type is INTERNALOID for aggregates

Its not clear why this was added in the original commit. Neither the commit
message nor the code has any comment explaining this. Moreover as clear from
the regression tests, we do support transaction types as INTERNALOID. Sure
aggregates can't support 2-step aggregation for internal types because the
transition function result needs to be sent to the coordinator for collection.
But that's a separate patch, if at all needed

9 years agoDo not include pgxc.h when relpath.c is compiled in FRONTEND mode
Pavan Deolasee [Tue, 30 Jun 2015 07:49:07 +0000 (13:19 +0530)]
Do not include pgxc.h when relpath.c is compiled in FRONTEND mode

Its not necessary or even appropriate to include a server-side file while
compiling in the FRONTEND mode. And there are other side-effects. For example,
errcodes.h gets auto-generated during the compilation and early inclusion of
that file leads to compilation failure

9 years agoChange COPYRIGHT notice to include 2ndQuadrant Limited as a stake holder.
Pavan Deolasee [Tue, 30 Jun 2015 05:32:37 +0000 (11:02 +0530)]
Change COPYRIGHT notice to include 2ndQuadrant Limited as a stake holder.

The notice also includes a brief history of Postgres-XL development and
commitment from 2ndQuandrant Limited to change the licensing terms to
PostgreSQL License once all other stake holders agree to do the same

9 years agoMerge from upstream master branch of PostgreSQL repository
Pavan Deolasee [Tue, 30 Jun 2015 02:48:49 +0000 (08:18 +0530)]
Merge from upstream master branch of PostgreSQL repository

9 years agoInitialize GIN metapage correctly when replaying metapage-update WAL record.
Heikki Linnakangas [Mon, 29 Jun 2015 21:06:00 +0000 (00:06 +0300)]
Initialize GIN metapage correctly when replaying metapage-update WAL record.

I broke this with my WAL format refactoring patch. Before that, the metapage
was read from disk, and modified in-place regardless of the LSN. That was
always a bit silly, as there's no need to read the old page version from
disk disk when we're overwriting it anyway. So that was changed in 9.5, but
I failed to add a GinInitPage call to initialize the page-headers correctly.
Usually you wouldn't notice, because the metapage is already in the page
cache and is not zeroed.

One way to reproduce this is to perform a VACUUM on an already vacuumed
table (so that the vacuum has no real work to do), immediately after a
checkpoint, and then perform an immediate shutdown. After recovery, the
page headers of the metapage will be incorrectly all-zeroes.

Reported by Jeff Janes

9 years agoStamp 9.5alpha1.
Tom Lane [Mon, 29 Jun 2015 19:42:18 +0000 (15:42 -0400)]
Stamp 9.5alpha1.

9 years agoDesultory review of 9.5 release notes.
Tom Lane [Mon, 29 Jun 2015 19:38:46 +0000 (15:38 -0400)]
Desultory review of 9.5 release notes.

Minor corrections and clarifications.  Notably, for stuff that got moved
out of contrib, make sure it's documented somewhere other than "Additional
Modules".

I'm sure these need more work, but that's all I have time for today.

9 years agoCode + docs review for escaping of option values (commit 11a020eb6).
Tom Lane [Mon, 29 Jun 2015 16:42:52 +0000 (12:42 -0400)]
Code + docs review for escaping of option values (commit 11a020eb6).

Avoid memory leak from incorrect choice of how to free a StringInfo
(resetStringInfo doesn't do it).  Now that pg_split_opts doesn't scribble
on the optstr, mark that as "const" for clarity.  Attach the commentary in
protocol.sgml to the right place, and add documentation about the
user-visible effects of this change on postgres' -o option and libpq's
PGOPTIONS option.

9 years agoReplace ia64 S_UNLOCK compiler barrier with a full memory barrier.
Andres Freund [Mon, 29 Jun 2015 12:53:32 +0000 (14:53 +0200)]
Replace ia64 S_UNLOCK compiler barrier with a full memory barrier.

_Asm_sched_fence() is just a compiler barrier, not a memory barrier. But
spinlock release on IA64 needs, at the very least, release
semantics. Use a full barrier instead.

This might be the cause for the occasional failures on buildfarm member
anole.

Discussion: 20150629101108[email protected]

9 years agoFix some expected output diffs in the alternate expected output for testcase
Pavan Deolasee [Mon, 29 Jun 2015 12:40:19 +0000 (18:10 +0530)]
Fix some expected output diffs in the alternate expected output for testcase
'plpgsql'

9 years agoMerge new output from privileges.out into the alternate expected output file
Pavan Deolasee [Mon, 29 Jun 2015 12:36:04 +0000 (18:06 +0530)]
Merge new output from privileges.out into the alternate expected output file

9 years agoTurn tables in updatable_views testcase to replicated tables
Pavan Deolasee [Mon, 29 Jun 2015 07:34:11 +0000 (13:04 +0530)]
Turn tables in updatable_views testcase to replicated tables

This test contains many INSERT/UPDATE/DELETE on the first column, also a
primary key, of the table. Since XL by default distributes a table on its
primary key and it does not support INSERT/UPDATE/DELETE on the distribution
column, the test case fails with many errors. So we instead use replicated
tables in the test case. There are still a few failures that need to be
investigated.

9 years agoTranslation updates
Peter Eisentraut [Mon, 29 Jun 2015 03:56:55 +0000 (23:56 -0400)]
Translation updates

Source-Git-URL: git://git.postgresql.org/git/pgtranslation/messages.git
Source-Git-Hash: fb7e72f46cfafa1b5bfe4564d9686d63a1e6383f

9 years agoRun the C portions of guc-file.l through pgindent.
Tom Lane [Mon, 29 Jun 2015 00:49:35 +0000 (20:49 -0400)]
Run the C portions of guc-file.l through pgindent.

Yeah, I know, pretty anal-retentive of me.  But we oughta find some
way to automate this for the .y and .l files.

9 years agoImprove design and implementation of pg_file_settings view.
Tom Lane [Sun, 28 Jun 2015 22:06:14 +0000 (18:06 -0400)]
Improve design and implementation of pg_file_settings view.

As first committed, this view reported on the file contents as they were
at the last SIGHUP event.  That's not as useful as reporting on the current
contents, and what's more, it didn't work right on Windows unless the
current session had serviced at least one SIGHUP.  Therefore, arrange to
re-read the files when pg_show_all_settings() is called.  This requires
only minor refactoring so that we can pass changeVal = false to
set_config_option() so that it won't actually apply any changes locally.

In addition, add error reporting so that errors that would prevent the
configuration files from being loaded, or would prevent individual settings
from being applied, are visible directly in the view.  This makes the view
usable for pre-testing whether edits made in the config files will have the
desired effect, before one actually issues a SIGHUP.

I also added an "applied" column so that it's easy to identify entries that
are superseded by later entries; this was the main use-case for the original
design, but it seemed unnecessarily hard to use for that.

Also fix a 9.4.1 regression that allowed multiple entries for a
PGC_POSTMASTER variable to cause bogus complaints in the postmaster log.
(The issue here was that commit bf007a27acd7b2fb unintentionally reverted
3e3f65973a3c94a6, which suppressed any duplicate entries within
ParseConfigFp.  However, since the original coding of the pg_file_settings
view depended on such suppression *not* happening, we couldn't have fixed
this issue now without first doing something with pg_file_settings.
Now we suppress duplicates by marking them "ignored" within
ProcessConfigFileInternal, which doesn't hide them in the view.)

Lesser changes include:

Drive the view directly off the ConfigVariable list, instead of making a
basically-equivalent second copy of the data.  There's no longer any need
to hang onto the data permanently, anyway.

Convert show_all_file_settings() to do its work in one call and return a
tuplestore; this avoids risks associated with assuming that the GUC state
will hold still over the course of query execution.  (I think there were
probably latent bugs here, though you might need something like a cursor
on the view to expose them.)

Arrange to run SIGHUP processing in a short-lived memory context, to
forestall process-lifespan memory leaks.  (There is one known leak in this
code, in ProcessConfigDirectory; it seems minor enough to not be worth
back-patching a specific fix for.)

Remove mistaken assignment to ConfigFileLineno that caused line counting
after an include_dir directive to be completely wrong.

Add missed failure check in AlterSystemSetConfigFile().  We don't really
expect ParseConfigFp() to fail, but that's not an excuse for not checking.

9 years agoAlso trigger restartpoints based on max_wal_size on standby.
Heikki Linnakangas [Sun, 28 Jun 2015 21:09:10 +0000 (00:09 +0300)]
Also trigger restartpoints based on max_wal_size on standby.

When archive recovery and restartpoints were initially introduced,
checkpoint_segments was ignored on the grounds that the files restored from
archive don't consume any space in the recovery server. That was changed in
later releases, but even then it was arguably a feature rather than a bug,
as performing restartpoints as often as checkpoints during normal operation
might be excessive, but you might nevertheless not want to waste a lot of
space for pre-allocated WAL by setting checkpoint_segments to a high value.
But now that we have separate min_wal_size and max_wal_size settings, you
can bound WAL usage with max_wal_size, and still avoid consuming excessive
space usage by setting min_wal_size to a lower value, so that argument is
moot.

There are still some issues with actually limiting the space usage to
max_wal_size: restartpoints in recovery can only start after seeing the
checkpoint record, while a checkpoint starts flushing buffers as soon as
the redo-pointer is set. Restartpoint is paced to happen at the same
leisurily speed, determined by checkpoint_completion_target, as checkpoints,
but because they are started later, max_wal_size can be exceeded by upto
one checkpoint cycle's worth of WAL, depending on
checkpoint_completion_target. But that seems better than not trying at all,
and max_wal_size is a soft limit anyway.

The documentation already claimed that max_wal_size is obeyed in recovery,
so this just fixes the behaviour to match the docs. However, add some
weasel-words there to mention that max_wal_size may well be exceeded by
some amount in recovery.

9 years agoFix markup in docs.
Heikki Linnakangas [Sun, 28 Jun 2015 21:01:26 +0000 (00:01 +0300)]
Fix markup in docs.

Oops. I could swear I built the docs before pushing, but I guess not..

9 years agoPromote the assertion that XLogBeginInsert() is not called twice into ERROR.
Heikki Linnakangas [Sun, 28 Jun 2015 19:25:55 +0000 (22:25 +0300)]
Promote the assertion that XLogBeginInsert() is not called twice into ERROR.

Seems like cheap insurance for WAL bugs. A spurious call to
XLogBeginInsert() in itself would be fairly harmless, but if there is any
data registered and the insertion is not completed/cancelled properly, there
is a risk that the data ends up in a wrong WAL record.

Per Jeff Janes's suggestion.

9 years agoFix double-XLogBeginInsert call in GIN page splits.
Heikki Linnakangas [Sun, 28 Jun 2015 18:59:29 +0000 (21:59 +0300)]
Fix double-XLogBeginInsert call in GIN page splits.

If data checksums or wal_log_hints is on, and a GIN page is split, the code
to find a new, empty, block was called after having already called
XLogBeginInsert(). That causes an assertion failure or PANIC, if finding the
new block involves updating a FSM page that had not been modified since last
checkpoint, because that update is WAL-logged, which calls XLogBeginInsert
again. Nested XLogBeginInsert calls are not supported.

To fix, rearrange GIN code so that XLogBeginInsert is called later, after
finding the victim buffers.

Reported by Jeff Janes.

9 years agoDon't choke on files that are removed while pg_rewind runs.
Heikki Linnakangas [Sun, 28 Jun 2015 18:35:51 +0000 (21:35 +0300)]
Don't choke on files that are removed while pg_rewind runs.

If a file is removed from the source server, while pg_rewind is running, the
invocation of pg_read_binary_file() will fail. Use the just-added missing_ok
option to that function, to have it return NULL instead, and handle that
gracefully. And similarly for pg_ls_dir and pg_stat_file.

Reported by Fujii Masao, fix by Michael Paquier.

9 years agoAdd missing_ok option to the SQL functions for reading files.
Heikki Linnakangas [Sun, 28 Jun 2015 18:35:46 +0000 (21:35 +0300)]
Add missing_ok option to the SQL functions for reading files.

This makes it possible to use the functions without getting errors, if there
is a chance that the file might be removed or renamed concurrently.
pg_rewind needs to do just that, although this could be useful for other
purposes too. (The changes to pg_rewind to use these functions will come in
a separate commit.)

The read_binary_file() function isn't very well-suited for extensions.c's
purposes anymore, if it ever was. So bite the bullet and make a copy of it
in extension.c, tailored for that use case. This seems better than the
accidental code reuse, even if it's a some more lines of code.

Michael Paquier, with plenty of kibitzing by me.

9 years agoFix comment for GetCurrentIntegerTimestamp().
Kevin Grittner [Sun, 28 Jun 2015 17:43:59 +0000 (12:43 -0500)]
Fix comment for GetCurrentIntegerTimestamp().

The unit of measure is microseconds, not milliseconds.

Backpatch to 9.3 where the function and its comment were added.

9 years agoFix function declaration style to respect the coding standard.
Tatsuo Ishii [Sun, 28 Jun 2015 09:54:27 +0000 (18:54 +0900)]
Fix function declaration style to respect the coding standard.

9 years agoAvoid passing NULL to memcmp() in lookups of zero-argument functions.
Tom Lane [Sat, 27 Jun 2015 21:47:39 +0000 (17:47 -0400)]
Avoid passing NULL to memcmp() in lookups of zero-argument functions.

A few places assumed they could pass NULL for the argtypes array when
looking up functions known to have zero arguments.  At first glance
it seems that this should be safe enough, since memcmp() is surely not
allowed to fetch any bytes if its count argument is zero.  However,
close reading of the C standard says that such calls have undefined
behavior, so we'd probably best avoid it.

Since the number of places doing this is quite small, and some other
places looking up zero-argument functions were already passing dummy
arrays, let's standardize on the latter solution rather than hacking
the function lookup code to avoid calling memcmp() in these cases.
I also added Asserts to catch any future violations of the new rule.

Given the utter lack of any evidence that this actually causes any
problems in the field, I don't feel a need to back-patch this change.

Per report from Piotr Stefaniak, though this is not his patch.

9 years agoFix test_decoding's handling of nonexistant columns in old tuple versions.
Andres Freund [Sat, 27 Jun 2015 16:49:00 +0000 (18:49 +0200)]
Fix test_decoding's handling of nonexistant columns in old tuple versions.

test_decoding used fastgetattr() to extract column values. That's wrong
when decoding updates and deletes if a table's replica identity is set
to FULL and new columns have been added since the old version of the
tuple was created. Due to the lack of a crosscheck with the datum's
natts values an invalid value will be output, leading to errors or
worse.

Bug: #13470
Reported-By: Krzysztof Kotlarski
Discussion: 20150626100333[email protected]

Backpatch to 9.4, where the feature, including the bug, was added.

9 years agoAdd opaque declaration of HTAB to tqual.h.
Kevin Grittner [Sat, 27 Jun 2015 14:55:06 +0000 (09:55 -0500)]
Add opaque declaration of HTAB to tqual.h.

Commit b89e151054a05f0f6d356ca52e3b725dd0505e53 added the
ResolveCminCmaxDuringDecoding declaration to tqual.h, which uses an
HTAB parameter, without declaring HTAB.  It accidentally fails to
fail to build with current sources because a declaration happens to
be included, directly or indirectly, in all source files that
currently use tqual.h before tqual.h is first included, but we
shouldn't count on that.  Since an opaque declaration is enough
here, just use that, as was done in snapmgr.h.

Backpatch to 9.4, where the HTAB reference was added to tqual.h.

9 years agoFix typo in comment
Heikki Linnakangas [Sat, 27 Jun 2015 07:17:42 +0000 (10:17 +0300)]
Fix typo in comment

Etsuro Fujita

9 years agoAvoid hot standby cancels from VAC FREEZE
Simon Riggs [Fri, 26 Jun 2015 23:41:47 +0000 (00:41 +0100)]
Avoid hot standby cancels from VAC FREEZE

VACUUM FREEZE generated false cancelations of standby queries on an
otherwise idle master. Caused by an off-by-one error on cutoff_xid
which goes back to original commit.

Backpatch to all versions 9.0+

Analysis and report by Marco Nenciarini

Bug fix by Simon Riggs

9 years agoFix DDL command collection for TRANSFORM
Alvaro Herrera [Fri, 26 Jun 2015 21:17:54 +0000 (18:17 -0300)]
Fix DDL command collection for TRANSFORM

Commit b488c580ae, which added the DDL command collection feature,
neglected to update the code that commit cac76582053e had previously
added two weeks earlier for the TRANSFORM feature.

Reported by Michael Paquier.

9 years agoFix BRIN xlog replay
Alvaro Herrera [Fri, 26 Jun 2015 21:13:05 +0000 (18:13 -0300)]
Fix BRIN xlog replay

There was a confusion about which block number to use when storing an
item's pointer in the revmap -- the revmap page's blkno was being used,
not the data page's blkno.

Spotted-by: Jeff Janes
9 years agoFix grammar.
Robert Haas [Fri, 26 Jun 2015 20:04:46 +0000 (16:04 -0400)]
Fix grammar.

Reported by Peter Geoghegan.

9 years agoBe more conservative about removing tablespace "symlinks".
Robert Haas [Fri, 26 Jun 2015 19:53:13 +0000 (15:53 -0400)]
Be more conservative about removing tablespace "symlinks".

Don't apply rmtree(), which will gleefully remove an entire subtree,
and don't even apply unlink() unless it's symlink or a directory,
the only things that we expect to find.

Amit Kapila, with minor tweaks by me, per extensive discussions
involving Andrew Dunstan, Fujii Masao, and Heikki Linnakangas,
at least some of whom also reviewed the code.

9 years agorelease notes: Add entry for commit 5ea86e6e6.
Robert Haas [Fri, 26 Jun 2015 18:48:52 +0000 (14:48 -0400)]
release notes: Add entry for commit 5ea86e6e6.

Peter Geoghegan and Robert Haas

9 years agoRemove unnecessary NULL test.
Robert Haas [Fri, 26 Jun 2015 18:45:32 +0000 (14:45 -0400)]
Remove unnecessary NULL test.

Spotted by Coverity and reported by Michael Paquier.  Per discussion,
we don't necessarily care about making Coverity happy in all such
instances, but we can go ahead and change them where it otherwise
seems to improve the code.

9 years agorelease notes: Combine items for pg_upgrade and pg_upgrade_support moves.
Robert Haas [Fri, 26 Jun 2015 18:20:29 +0000 (14:20 -0400)]
release notes: Combine items for pg_upgrade and pg_upgrade_support moves.

Per suggestions from Amit Langote and Álvaro Herrera.

9 years agoDon't warn about creating temporary or unlogged hash indexes.
Robert Haas [Fri, 26 Jun 2015 15:37:32 +0000 (11:37 -0400)]
Don't warn about creating temporary or unlogged hash indexes.

Warning people that no WAL-logging will be done doesn't make sense
in this case.

Michael Paquier

9 years agoReduce log level for background worker events from LOG to DEBUG1.
Robert Haas [Fri, 26 Jun 2015 15:23:32 +0000 (11:23 -0400)]
Reduce log level for background worker events from LOG to DEBUG1.

Per discussion, LOG is just too chatty for something that will happen
as routinely as this.

Pavel Stehule

9 years agoFix the fallback memory barrier implementation to be reentrant.
Andres Freund [Fri, 26 Jun 2015 15:00:01 +0000 (17:00 +0200)]
Fix the fallback memory barrier implementation to be reentrant.

This was essentially "broken" since 0c8eda62; but until more
recently (14e8803f) barriers usage in signal handlers was infrequent.

The failure to be reentrant was noticed because the test_shm_mq, which
uses memory barriers at a high frequency, occasionally got stuck on some
solaris buildfarm animals. Turns out, those machines use sun studio
12.1, which doesn't yet have efficient memory barrier support. A machine
with a newer sun studio did not fail.  Forcing the barrier fallback to
be used on x86 allows to reproduce the problem.

The new fallback is to use kill(PostmasterPid, 0) based on the theory
that that'll always imply a barrier due to checking the liveliness of
PostmasterPid on systems old enough to need fallback support. It's hard
to come up with a good and performant fallback.

I'm not backpatching this for now - the problem isn't active in the back
branches, and we haven't backpatched barrier changes for
now. Additionally master looks entirely different than the back branches
due to the new atomics abstraction. It seems better to let this rest in
master, where the non-reentrancy actively causes a problem, and then
consider backpatching.

Found-By: Robert Haas
Discussion: 55626265.3060800@dunslane.net

9 years agoImprove handling of CustomPath/CustomPlan(State) children.
Robert Haas [Fri, 26 Jun 2015 13:40:47 +0000 (09:40 -0400)]
Improve handling of CustomPath/CustomPlan(State) children.

Allow CustomPath to have a list of paths, CustomPlan a list of plans,
and CustomPlanState a list of planstates known to the core system, so
that custom path/plan providers can more reasonably use this
infrastructure for nodes with multiple children.

KaiGai Kohei, per a design suggestion from Tom Lane, with some
further kibitzing by me.

9 years agoFix a couple of bugs with wal_log_hints.
Heikki Linnakangas [Fri, 26 Jun 2015 09:38:24 +0000 (12:38 +0300)]
Fix a couple of bugs with wal_log_hints.

1. Replay of the WAL record for setting a bit in the visibility map
contained an assertion that a full-page image of that record type can only
occur with checksums enabled. But it can also happen with wal_log_hints, so
remove the assertion. Unlike checksums, wal_log_hints can be changed on the
fly, so it would be complicated to figure out if it was enabled at the time
that the WAL record was generated.

2. wal_log_hints has the same effect on the locking needed to read the LSN
of a page as data checksums. BufferGetLSNAtomic() didn't get the memo.

Backpatch to 9.4, where wal_log_hints was added.

9 years agoAllow background workers to connect to no particular database.
Robert Haas [Thu, 25 Jun 2015 19:52:13 +0000 (15:52 -0400)]
Allow background workers to connect to no particular database.

The documentation claims that this is supported, but it didn't
actually work.  Fix that.

Reported by Pavel Stehule; patch by me.

9 years agoFix the logic for putting relations into the relcache init file.
Tom Lane [Thu, 25 Jun 2015 18:39:05 +0000 (14:39 -0400)]
Fix the logic for putting relations into the relcache init file.

Commit f3b5565dd4e59576be4c772da364704863e6a835 was a couple of bricks shy
of a load; specifically, it missed putting pg_trigger_tgrelid_tgname_index
into the relcache init file, because that index is not used by any
syscache.  However, we have historically nailed that index into cache for
performance reasons.  The upshot was that load_relcache_init_file always
decided that the init file was busted and silently ignored it, resulting
in a significant hit to backend startup speed.

To fix, reinstantiate RelationIdIsInInitFile() as a wrapper around
RelationSupportsSysCache(), which can know about additional relations
that should be in the init file despite being unknown to syscache.c.

Also install some guards against future mistakes of this type: make
write_relcache_init_file Assert that all nailed relations get written to
the init file, and make load_relcache_init_file emit a WARNING if it takes
the "wrong number of nailed relations" exit path.  Now that we remove the
init files during postmaster startup, that case should never occur in the
field, even if we are starting a minor-version update that added or removed
rels from the nailed set.  So the warning shouldn't ever be seen by end
users, but it will show up in the regression tests if somebody breaks this
logic.

Back-patch to all supported branches, like the previous commit.

9 years agoDocs: fix claim that to_char('FM') removes trailing zeroes.
Tom Lane [Thu, 25 Jun 2015 14:44:03 +0000 (10:44 -0400)]
Docs: fix claim that to_char('FM') removes trailing zeroes.

Of course, what it removes is leading zeroes.  Seems to have been a thinko
in commit ffe92d15d53625d5ae0c23f4e1984ed43614a33d.  Noted by Hubert Depesz
Lubaczewski.

9 years agoChange expected output for the test case 'tablespace'
Pavan Deolasee [Thu, 25 Jun 2015 06:36:20 +0000 (12:06 +0530)]
Change expected output for the test case 'tablespace'

We don't yet support CREATE TABLE AS EXECUTE. So the expected output is changed
to have the corresponding error message and side effects of the same

9 years agoPropogate ALTER TABLE ALL IN correctly to all nodes
Pavan Deolasee [Thu, 25 Jun 2015 06:35:51 +0000 (12:05 +0530)]
Propogate ALTER TABLE ALL IN correctly to all nodes

9 years agoFix expected output for the test case 'xc_sequence'
Pavan Deolasee [Thu, 25 Jun 2015 02:50:21 +0000 (08:20 +0530)]
Fix expected output for the test case 'xc_sequence'

We no longer display NOTICEs about implicit sequence creation

9 years agoAdd missing chunk to xc_FQS.out
Pavan Deolasee [Wed, 24 Jun 2015 16:36:32 +0000 (22:06 +0530)]
Add missing chunk to xc_FQS.out

We mistakenly left this out in the previous commit

9 years agoFix 'xc_FQS' and 'xc_FQS_join' test cases
Pavan Deolasee [Wed, 24 Jun 2015 16:11:53 +0000 (21:41 +0530)]
Fix 'xc_FQS' and 'xc_FQS_join' test cases

These cases were broken for a while so make necessary adjustments to the SQL as
well as expected outputs

9 years agoAdd index terms for functions jsonb_set and jsonb_pretty.
Fujii Masao [Wed, 24 Jun 2015 13:30:19 +0000 (22:30 +0900)]
Add index terms for functions jsonb_set and jsonb_pretty.

9 years agoChange expected output for test cases 'alter_generic' and 'rolenames'.
Pavan Deolasee [Wed, 24 Jun 2015 09:35:59 +0000 (15:05 +0530)]
Change expected output for test cases 'alter_generic' and 'rolenames'.

FDWs are currently not supported in XL and we throw an error for its usage.
Change expected output files for these test cases to accomodate that fact

9 years agoDo not show node information in the test case 'union'.
Pavan Deolasee [Wed, 24 Jun 2015 09:32:36 +0000 (15:02 +0530)]
Do not show node information in the test case 'union'.

Change the sql and the expected output accordingly

9 years agoMake adjustments to 'join' test case as well as its expected output
Pavan Deolasee [Wed, 24 Jun 2015 09:00:31 +0000 (14:30 +0530)]
Make adjustments to 'join' test case as well as its expected output

Remove a foreign key constraint from some tables because XL can't support
foreign key references on non-distribution column. Also turn off node
information from explain output because execution nodes get chosen randomly
(for some cases) and may change across regression tests

9 years agoDo not use storm_catalog
Pavan Deolasee [Wed, 24 Jun 2015 07:43:30 +0000 (13:13 +0530)]
Do not use storm_catalog

Based on available information, it seems this was added to support multi-tenant
feature of StormDB. This is no longer relevant in XL's context. So just #ifdef
out that code for now.

9 years agoCorrect proargtypes and prorettype for numeric_collect function
Pavan Deolasee [Wed, 24 Jun 2015 06:58:21 +0000 (12:28 +0530)]
Correct proargtypes and prorettype for numeric_collect function

We'd to change the OID for numeric_agg_state type because it conflicted with
another OID post-merge. But we forgot to change the same for this pg_proc
entry. This patch corrects that

9 years agoCorrect various mistakes in defining numeric_agg_state type and many aggregate
Pavan Deolasee [Wed, 24 Jun 2015 06:47:48 +0000 (12:17 +0530)]
Correct various mistakes in defining numeric_agg_state type and many aggregate
transition/finalisation functions using this type

opr_sanity and type_sanity tests now pass OK after the change

9 years agoUpdate get_relation_info comment.
Robert Haas [Tue, 23 Jun 2015 14:08:30 +0000 (10:08 -0400)]
Update get_relation_info comment.

Thomas Munro

9 years agoAdd missing newline to debug-message.
Heikki Linnakangas [Tue, 23 Jun 2015 12:49:28 +0000 (15:49 +0300)]
Add missing newline to debug-message.

Michael Paquier

9 years agoFind and remember node id of the remote node as set via SET global_session
Pavan Deolasee [Tue, 23 Jun 2015 11:12:06 +0000 (16:42 +0530)]
Find and remember node id of the remote node as set via SET global_session
command during shared queue acquire/bind time

Current code had calls to find this out during shared queue release. Given that
shared queue release may be called during transaction abort and the fact that
we can no longer make any sys cache lookup in abort call path, it seems much
safer to note and remember this value when its used for the first time in the
session

(We could have remembered this value when SET global_session command is
processed. But that happens during backend startup time and we haven't yet
setup the datanode and coordinator node handles at that time. So we can't
really determine the node id, which an index into the array of these handles,
at that time)

9 years agoAlways pass InvalidBackendId to relpath()
Pavan Deolasee [Tue, 23 Jun 2015 07:54:00 +0000 (13:24 +0530)]
Always pass InvalidBackendId to relpath()

While its not entirely clear if this is a safe change, it restores pre-merge
behaviour and also fixes errors during buffer sync belonging to temporary
tables. Since buffer header tag does not track BackendId, without this change,
we arrive at different relation file path, while creation and then later at
sync. (This is a non-issue for vanilla Postgres because temp tables are never
written or fsynced in vanilla Postgres)

9 years agopg_rewind: Improve message wording
Peter Eisentraut [Tue, 23 Jun 2015 00:40:01 +0000 (20:40 -0400)]
pg_rewind: Improve message wording

9 years agopg_basebackup: Remove redundant newline in error message
Peter Eisentraut [Tue, 23 Jun 2015 00:39:41 +0000 (20:39 -0400)]
pg_basebackup: Remove redundant newline in error message

9 years agoImprove inheritance_planner()'s performance for large inheritance sets.
Tom Lane [Mon, 22 Jun 2015 22:53:27 +0000 (18:53 -0400)]
Improve inheritance_planner()'s performance for large inheritance sets.

Commit c03ad5602f529787968fa3201b35c119bbc6d782 introduced a planner
performance regression for UPDATE/DELETE on large inheritance sets.
It required copying the append_rel_list (which is of size proportional to
the number of inherited tables) once for each inherited table, thus
resulting in O(N^2) time and memory consumption.  While it's difficult to
avoid that in general, the extra work only has to be done for
append_rel_list entries that actually reference subquery RTEs, which
inheritance-set entries will not.  So we can buy back essentially all of
the loss in cases without subqueries in FROM; and even for those, the added
work is mainly proportional to the number of UNION ALL subqueries.

Back-patch to 9.2, like the previous commit.

Tom Lane and Dean Rasheed, per a complaint from Thomas Munro.

9 years agopsql: Add some tab completion for TABLESAMPLE.
Robert Haas [Mon, 22 Jun 2015 18:13:56 +0000 (14:13 -0400)]
psql: Add some tab completion for TABLESAMPLE.

Petr Jelinek, reviewed by Brendan Jurd

9 years agoMark a table in rowsecurity test case to be replicated
Pavan Deolasee [Mon, 22 Jun 2015 10:09:24 +0000 (15:39 +0530)]
Mark a table in rowsecurity test case to be replicated

The table is referenced by another table on a non-distribution key. So mark the
table as replicated

9 years agoAdjust out and read functions for TableSampleClause to honor portable out/read
Pavan Deolasee [Mon, 22 Jun 2015 10:07:36 +0000 (15:37 +0530)]
Adjust out and read functions for TableSampleClause to honor portable out/read

Instead of sending the OIDs, we need to send qualified names for various
objects in the structure

9 years agoFire remote DDLs correctly even if utility.c decides to route the statement via
Pavan Deolasee [Mon, 22 Jun 2015 05:06:27 +0000 (10:36 +0530)]
Fire remote DDLs correctly even if utility.c decides to route the statement via
ProcessUtilitySlow.

Even though bug existed only for GrantStmt, also refactor couple of the other
invocation points for code consistency

9 years agoTruncate strings in tarCreateHeader() with strlcpy(), not sprintf().
Noah Misch [Mon, 22 Jun 2015 00:04:36 +0000 (20:04 -0400)]
Truncate strings in tarCreateHeader() with strlcpy(), not sprintf().

This supplements the GNU libc bug #6530 workarounds introduced in commit
54cd4f04576833abc394e131288bf3dd7dcf4806.  On affected systems, a
tar-format pg_basebackup failed when some filename beneath the data
directory was not valid character data in the postmaster/walsender
locale.  Back-patch to 9.1, where pg_basebackup was introduced.  Extant,
bug-prone conversion specifications receive only ASCII bytes or involve
low-importance messages.

9 years agoAdd transforms to pg_get_object_address and friends
Alvaro Herrera [Sun, 21 Jun 2015 19:08:49 +0000 (16:08 -0300)]
Add transforms to pg_get_object_address and friends

This was missed when transforms were added by commit cac76582053ef8e.

Extracted from a larger patch
Author: Michael Paquier

9 years agoImprove multixact emergency autovacuum logic.
Andres Freund [Sun, 21 Jun 2015 16:57:28 +0000 (18:57 +0200)]
Improve multixact emergency autovacuum logic.

Previously autovacuum was not necessarily triggered if space in the
members slru got tight. The first problem was that the signalling was
tied to values in the offsets slru, but members can advance much
faster. Thats especially a problem if old sessions had been around that
previously prevented the multixact horizon to increase. Secondly the
skipping logic doesn't work if the database was restarted after
autovacuum was triggered - that knowledge is not preserved across
restart. This is especially a problem because it's a common
panic-reaction to restart the database if it gets slow to
anti-wraparound vacuums.

Fix the first problem by separating the logic for members from
offsets. Trigger autovacuum whenever a multixact crosses a segment
boundary, as the current member offset increases in irregular values, so
we can't use a simple modulo logic as for offsets.  Add a stopgap for
the second problem, by signalling autovacuum whenver ERRORing out
because of boundaries.

Discussion: 20150608163707[email protected]

Backpatch into 9.3, where it became more likely that multixacts wrap
around.

9 years agoAdd missing check for wal_debug GUC.
Andres Freund [Sun, 21 Jun 2015 16:35:59 +0000 (18:35 +0200)]
Add missing check for wal_debug GUC.

9a20a9b2 added a new elog(), enabled when WAL_DEBUG is defined. The
other WAL_DEBUG dependant messages check for the wal_debug GUC, but this
one did not. While at it replace 'upto' with 'up to'.

Discussion: 20150610110253[email protected]

Backpatch to 9.4, the first release containing 9a20a9b2.

9 years agoPL/Perl: Add alternative expected file for Perl 5.22
Peter Eisentraut [Sun, 21 Jun 2015 14:37:24 +0000 (10:37 -0400)]
PL/Perl: Add alternative expected file for Perl 5.22

9 years agoFix failure to copy setlocale() return value.
Noah Misch [Sat, 20 Jun 2015 16:09:29 +0000 (12:09 -0400)]
Fix failure to copy setlocale() return value.

POSIX permits setlocale() calls to invalidate any previous setlocale()
return values, but commit 5f538ad004aa00cf0881f179f0cde789aad4f47e
neglected to account for setlocale(LC_CTYPE, NULL) doing so.  The effect
was to set the LC_CTYPE environment variable to an unintended value.
pg_perm_setlocale() sets this variable to assist PL/Perl; without it,
Perl would undo PostgreSQL's locale settings.  The known-affected
configurations are 32-bit, release builds using Visual Studio 2012 or
Visual Studio 2013.  Visual Studio 2010 is unaffected, as were all
buildfarm-attested configurations.  In principle, this bug could leave
the wrong LC_CTYPE in effect after PL/Perl use, which could in turn
facilitate problems like corrupt tsvector datums.  No known platform
experiences that consequence, because PL/Perl on Windows does not use
this environment variable.

The bug has been user-visible, as early postmaster failure, on systems
with Windows ANSI code page set to CP936 for "Chinese (Simplified, PRC)"
and probably on systems using other multibyte code pages.
(SetEnvironmentVariable() rejects values containing character data not
valid under the Windows ANSI code page.)  Back-patch to 9.4, where the
faulty commit first appeared.

Reported by Didi Hu and 林鹏程.  Reviewed by Tom Lane, though this fix
strategy was not his first choice.

9 years agoRevert "Detect setlocale(LC_CTYPE, NULL) clobbering previous return values."
Noah Misch [Sat, 20 Jun 2015 16:08:48 +0000 (12:08 -0400)]
Revert "Detect setlocale(LC_CTYPE, NULL) clobbering previous return values."

This reverts commit b76e76be460a240e99c33f6fb470dd1d5fe01a2a.  The
buildfarm yielded no related failures.

9 years agoFix BRIN supported operators table
Alvaro Herrera [Sat, 20 Jun 2015 15:26:36 +0000 (12:26 -0300)]
Fix BRIN supported operators table

Some of the entries in the inclusion opclasses where missing operators,
and we had an entry for inet_inclusion_ops instead of
network_inclusion_ops.  Sort the operators within each opclass by
strategy number, just to make it easier to spot mistakes.

Also sort the rows by data type name, rather than OID.

9 years agoFix thinko in comment (launcher -> worker)
Alvaro Herrera [Sat, 20 Jun 2015 14:45:59 +0000 (11:45 -0300)]
Fix thinko in comment (launcher -> worker)

9 years agoIn immediate shutdown, postmaster should not exit till children are gone.
Tom Lane [Fri, 19 Jun 2015 18:23:39 +0000 (14:23 -0400)]
In immediate shutdown, postmaster should not exit till children are gone.

This adjusts commit 82233ce7ea42d6ba519aaec63008aff49da6c7af so that the
postmaster does not exit until all its child processes have exited, even
if the 5-second timeout elapses and we have to send SIGKILL.  There is no
great value in having the postmaster process quit sooner, and doing so can
mislead onlookers into thinking that the cluster is fully terminated when
actually some child processes still survive.

This effect might explain recent test failures on buildfarm member hamster,
wherein we failed to restart a cluster just after shutting it down with
"pg_ctl stop -m immediate".

I also did a bit of code review/beautification, including fixing a faulty
use of the Max() macro on a volatile expression.

Back-patch to 9.4.  In older branches, the postmaster never waited for
children to exit during immediate shutdowns, and changing that would be
too much of a behavioral change.

9 years agoClamp autovacuum launcher sleep time to 5 minutes
Alvaro Herrera [Fri, 19 Jun 2015 15:44:36 +0000 (12:44 -0300)]
Clamp autovacuum launcher sleep time to 5 minutes

This avoids the problem that it might go to sleep for an unreasonable
amount of time in unusual conditions like the server clock moving
backwards an unreasonable amount of time.

(Simply moving the server clock forward again doesn't solve the problem
unless you wake up the autovacuum launcher manually, say by sending it
SIGHUP).

Per trouble report from Prakash Itnal in
https://www.postgresql.org/message-id/CAHC5u79-UqbapAABH2t4Rh2eYdyge0Zid-X=Xz-ZWZCBK42S0Q@mail.gmail.com

Analyzed independently by Haribabu Kommi and Tom Lane.