From: | Xiong He <iihero(at)qq(dot)com> |
---|---|
To: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, pgsql-docs <pgsql-docs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: The sample FDW table: pglog not work in https://www.postgresql.org/docs/14/file-fdw.html |
Date: | 2022-08-04 15:14:53 |
Message-ID: | tencent_1A6434FB91D6490BD9EAC3D7C20B92C75009@qq.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
Oh, I double checked. Looks like the content in 14 is correct. It has two more columns:
leader_pid integer,
query_id bigint
than the previous version.
I think I tested the content in: http://postgres.cn/docs/14/file-fdw.html
Seems it's the content not updated in that site.
Thanks for your reminding.
Regards,
Xiong He [iihero]
------------------ Original ------------------
From: "Masahiko Sawada" <sawada(dot)mshk(at)gmail(dot)com>;
Date: Thu, Aug 4, 2022 04:09 PM
To: "Xiong He"<iihero(at)qq(dot)com>;"pgsql-docs"<pgsql-docs(at)lists(dot)postgresql(dot)org>;
Subject: 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(at)postgresql(dot)org> wrote:
>
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/14/appendixes.html
> Description:
>
> Dear All,
> CREATE FOREIGN TABLE pglog (
> log_time timestamp(3) with time zone,
> user_name text,
> database_name text,
> process_id integer,
> connection_from text,
> session_id text,
> session_line_num bigint,
> command_tag text,
> session_start_time timestamp with time zone,
> virtual_transaction_id text,
> transaction_id bigint,
> error_severity text,
> sql_state_code text,
> message text,
> detail text,
> hint text,
> internal_query text,
> internal_query_pos integer,
> context text,
> query text,
> query_pos integer,
> location text,
> application_name text,
> backend_type text,
> leader_pid integer,
> query_id bigint
> ) SERVER pglog
> OPTIONS ( filename 'log/pglog.csv', format 'csv' );
>
> If we use pg14 as the server, this example will not work.
> I just tried adding 2 extra columns, finally it can work.
> see below:
>
> CREATE FOREIGN TABLE pglog (
> log_time timestamp(3) with time zone,
> user_name text,
> database_name text,
> process_id integer,
> connection_from text,
> session_id text,
> session_line_num bigint,
> command_tag text,
> session_start_time timestamp with time zone,
> virtual_transaction_id text,
> transaction_id bigint,
> error_severity text,
> sql_state_code text,
> message text,
> detail text,
> hint text,
> internal_query text,
> internal_query_pos integer,
> context text,
> query text,
> bbb text,
> query_pos integer,
> location text,
> application_name text,
> backend_type text,
> ccc integer
> ) SERVER pglog_server
> OPTIONS ( filename 'log/pglog.csv', format 'csv' );
>
> 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: https://www.enterprisedb.com/
From | Date | Subject | |
---|---|---|---|
Next Message | PG Doc comments form | 2022-08-08 19:03:38 | 34.16. The Password File error re windows pgpass.conf location |
Previous Message | Masahiko Sawada | 2022-08-04 08:09:03 | Re: The sample FDW table: pglog not work in https://www.postgresql.org/docs/14/file-fdw.html |