Invalid remote sampling test in postgres_fdw. - Mailing list pgsql-hackers

From Corey Huinker
Subject Invalid remote sampling test in postgres_fdw.
Date
Msg-id CADkLM=cpUiJ3QF7aUthTvaVMmgQcm7QqZBRMDLhBRTR+gJX-Og@mail.gmail.com
Whole thread Raw
Responses Re: Invalid remote sampling test in postgres_fdw.
List pgsql-hackers

Patch 0001 concerns what appears to be a bug in the postgres_fdw regression tests.

As it was, the tests set the sampling method for the foreign server, but rather than analyzing a table on that foreign server, the local table analyze_table was analyzed instead.

The analyze commands now analyze a remote table, and the remote table definition links it to the local table that was previously being analyzed repeatedly.



Patch 0002 isn't a bug, just an annoyance.

It creates two psql variables which can then be interpolated into SQL commands as string literals, eliminating the need to wrap commands in a DO block. This makes the queries a bit more readable, and allows for any errors (however unlikely) in those commands to be reported individually, rather than grouped and potentially obfuscated by the DO block.

Attachment

pgsql-hackers by date:

Previous
From: Antonin Houska
Date:
Subject: Re: Adding REPACK [concurrently]
Next
From: Nikita Malakhov
Date:
Subject: Re: Support for 8-byte TOAST values (aka the TOAST infinite loop problem)