pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Xiong He <iihero@qq.com>
To: Masahiko Sawada <sawada.mshk@gmail.com>
To: pgsql-docs <pgsql-docs@lists.postgresql.org>
Subject: Re: The sample FDW table: pglog not work in https://www.postgresql.org/docs/14/file-fdw.html
Date: Thu, 4 Aug 2022 23:14:53 +0800
Message-ID: <tencent_1A6434FB91D6490BD9EAC3D7C20B92C75009@qq.com> (raw)
In-Reply-To: <CAD21AoC1xqV2HhzZadMKg_PF0z_OXTSra7p5pgnh4ShdzPVLSQ@mail.gmail.com>
References: <165953339809.43641.11613668155724201455@wrigleys.postgresql.org>
	<CAD21AoC1xqV2HhzZadMKg_PF0z_OXTSra7p5pgnh4ShdzPVLSQ@mail.gmail.com>

Oh, I double checked.&nbsp; Looks like the content in 14 is correct.&nbsp; It has two more columns:
&nbsp;&nbsp; leader_pid integer,
&nbsp; query_id bigint
than the previous version.


I think I tested the content in:&nbsp; http://postgres.cn/docs/14/file-fdw.html&nbsp; 

Seems it's the content not updated in that site.



Thanks for your reminding.&nbsp; 



Regards,
Xiong He [iihero]&nbsp;




&nbsp;




------------------&nbsp;Original&nbsp;------------------
From:                                                                                                                        "Masahiko Sawada"                                                                                    <sawada.mshk@gmail.com&gt;;
Date:&nbsp;Thu, Aug 4, 2022 04:09 PM
To:&nbsp;"Xiong He"<iihero@qq.com&gt;;"pgsql-docs"<pgsql-docs@lists.postgresql.org&gt;;

Subject:&nbsp;Re: The sample FDW table: pglog not work in https://www.postgresql.org/docs/14/file-fdw.html



On Wed, Aug 3, 2022 at 10:48 PM PG Doc comments form
<noreply@postgresql.org&gt; wrote:
&gt;
&gt; The following documentation comment has been logged on the website:
&gt;
&gt; Page: https://www.postgresql.org/docs/14/appendixes.html
&gt; Description:
&gt;
&gt; Dear All,
&gt; CREATE FOREIGN TABLE pglog (
&gt;&nbsp;&nbsp; log_time timestamp(3) with time zone,
&gt;&nbsp;&nbsp; user_name text,
&gt;&nbsp;&nbsp; database_name text,
&gt;&nbsp;&nbsp; process_id integer,
&gt;&nbsp;&nbsp; connection_from text,
&gt;&nbsp;&nbsp; session_id text,
&gt;&nbsp;&nbsp; session_line_num bigint,
&gt;&nbsp;&nbsp; command_tag text,
&gt;&nbsp;&nbsp; session_start_time timestamp with time zone,
&gt;&nbsp;&nbsp; virtual_transaction_id text,
&gt;&nbsp;&nbsp; transaction_id bigint,
&gt;&nbsp;&nbsp; error_severity text,
&gt;&nbsp;&nbsp; sql_state_code text,
&gt;&nbsp;&nbsp; message text,
&gt;&nbsp;&nbsp; detail text,
&gt;&nbsp;&nbsp; hint text,
&gt;&nbsp;&nbsp; internal_query text,
&gt;&nbsp;&nbsp; internal_query_pos integer,
&gt;&nbsp;&nbsp; context text,
&gt;&nbsp;&nbsp; query text,
&gt;&nbsp;&nbsp; query_pos integer,
&gt;&nbsp;&nbsp; location text,
&gt;&nbsp;&nbsp; application_name text,
&gt;&nbsp;&nbsp; backend_type text,
&gt;&nbsp;&nbsp; leader_pid integer,
&gt;&nbsp;&nbsp; query_id bigint
&gt; ) SERVER pglog
&gt; OPTIONS ( filename 'log/pglog.csv', format 'csv' );
&gt;
&gt; If we use pg14 as the server,&nbsp; this example will not work.
&gt; I just tried adding 2 extra columns, finally it can work.
&gt; see below:
&gt;
&gt; CREATE FOREIGN TABLE pglog (
&gt;&nbsp;&nbsp; log_time timestamp(3) with time zone,
&gt;&nbsp;&nbsp; user_name text,
&gt;&nbsp;&nbsp; database_name text,
&gt;&nbsp;&nbsp; process_id integer,
&gt;&nbsp;&nbsp; connection_from text,
&gt;&nbsp;&nbsp; session_id text,
&gt;&nbsp;&nbsp; session_line_num bigint,
&gt;&nbsp;&nbsp; command_tag text,
&gt;&nbsp;&nbsp; session_start_time timestamp with time zone,
&gt;&nbsp;&nbsp; virtual_transaction_id text,
&gt;&nbsp;&nbsp; transaction_id bigint,
&gt;&nbsp;&nbsp; error_severity text,
&gt;&nbsp;&nbsp; sql_state_code text,
&gt;&nbsp;&nbsp; message text,
&gt;&nbsp;&nbsp; detail text,
&gt;&nbsp;&nbsp; hint text,
&gt;&nbsp;&nbsp; internal_query text,
&gt;&nbsp;&nbsp; internal_query_pos integer,
&gt;&nbsp;&nbsp; context text,
&gt;&nbsp;&nbsp; query text,
&gt;&nbsp;&nbsp; bbb text,
&gt;&nbsp;&nbsp; query_pos integer,
&gt;&nbsp;&nbsp; location text,
&gt;&nbsp;&nbsp; application_name text,
&gt;&nbsp;&nbsp; backend_type text,
&gt;&nbsp;&nbsp; ccc integer
&gt; ) SERVER pglog_server
&gt; OPTIONS ( filename 'log/pglog.csv', format 'csv' );
&gt;
&gt; There is a "bbb" and "ccc" to by pass the error.

You said you added 2 extra columns to the example in PG14 doc but both
pglog table definitions you mentioned above have the same number of
columns, 26. The first table definition worked with PG14 in my
environment. Could you try using the first example again and share the
error message if an error occurs?

Regards,

-- 
Masahiko Sawada
EDB:&nbsp; https://www.enterprisedb.com/

view thread (3+ messages)

Message-ID: <tencent_1A6434FB91D6490BD9EAC3D7C20B92C75009@qq.com>
Permalink:  ../tencent_1A6434FB91D6490BD9EAC3D7C20B92C75009@qq.com/
Also on:    postgresql.org/message-id/tencent_1A6434FB91D6490BD9EAC3D7C20B92C75009@qq.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: iihero@qq.com, sawada.mshk@gmail.com, pgsql-docs@lists.postgresql.org
  Subject: Re: The sample FDW table: pglog not work in https://www.postgresql.org/docs/14/file-fdw.html
  In-Reply-To: <tencent_1A6434FB91D6490BD9EAC3D7C20B92C75009@qq.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox