public inbox for [email protected]help / color / mirror / Atom feed
pageinspect forks 8+ messages / 3 participants [nested] [flat]
* pageinspect forks @ 2014-07-30 12:11 Vik Fearing <[email protected]> 2014-08-10 13:24 ` Re: pageinspect forks MauMau <[email protected]> 2014-08-10 15:48 ` Re: pageinspect forks Fujii Masao <[email protected]> 0 siblings, 2 replies; 8+ messages in thread From: Vik Fearing @ 2014-07-30 12:11 UTC (permalink / raw) To: pgsql-docs I noticed that the documentation for pageinspect lists the different forks but omits the initialization fork. Here is a trivial patch to fix that. -- Vik -- Sent via pgsql-docs mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs Attachments: [text/x-diff] pageinspect_init_fork.v1.patch (1004B, 2-pageinspect_init_fork.v1.patch) download | inline diff: *** a/doc/src/sgml/pageinspect.sgml --- b/doc/src/sgml/pageinspect.sgml *************** *** 31,38 **** table and returns a copy as a <type>bytea</> value. This allows a single time-consistent copy of the block to be obtained. <replaceable>fork</replaceable> should be <literal>'main'</literal> for ! the main data fork, or <literal>'fsm'</literal> for the free space map, ! or <literal>'vm'</literal> for the visibility map. </para> </listitem> </varlistentry> --- 31,39 ---- table and returns a copy as a <type>bytea</> value. This allows a single time-consistent copy of the block to be obtained. <replaceable>fork</replaceable> should be <literal>'main'</literal> for ! the main data fork, <literal>'fsm'</literal> for the free space map, ! <literal>'vm'</literal> for the visibility map, or <literal>'init'</literal> ! for the initialization fork. </para> </listitem> </varlistentry> ^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pageinspect forks 2014-07-30 12:11 pageinspect forks Vik Fearing <[email protected]> @ 2014-08-10 13:24 ` MauMau <[email protected]> 2014-08-10 18:59 ` Re: pageinspect forks Vik Fearing <[email protected]> 1 sibling, 1 reply; 8+ messages in thread From: MauMau @ 2014-08-10 13:24 UTC (permalink / raw) To: Vik Fearing <[email protected]>; pgsql-docs From: "Vik Fearing" <[email protected]> >I noticed that the documentation for pageinspect lists the different > forks but omits the initialization fork. > > Here is a trivial patch to fix that. Could you also improve the doc by changing "table" to "relation" in the description of get_raw_page()? Having a quick look at the code, it seems that the function can also handle indexes. table and returns a copy as a <type>bytea</> value. This allows a Regards MauMau -- Sent via pgsql-docs mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs ^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pageinspect forks 2014-07-30 12:11 pageinspect forks Vik Fearing <[email protected]> 2014-08-10 13:24 ` Re: pageinspect forks MauMau <[email protected]> @ 2014-08-10 18:59 ` Vik Fearing <[email protected]> 2014-08-10 22:22 ` Re: pageinspect forks MauMau <[email protected]> 0 siblings, 1 reply; 8+ messages in thread From: Vik Fearing @ 2014-08-10 18:59 UTC (permalink / raw) To: MauMau <[email protected]>; pgsql-docs On 08/10/2014 03:24 PM, MauMau wrote: > From: "Vik Fearing" <[email protected]> >> I noticed that the documentation for pageinspect lists the different >> forks but omits the initialization fork. >> >> Here is a trivial patch to fix that. > > Could you also improve the doc by changing "table" to "relation" in the > description of get_raw_page()? Having a quick look at the code, it > seems that the function can also handle indexes. > > table and returns a copy as a <type>bytea</> value. This allows a Good catch. I wasn't sure whether using "relation" or "table or index" was better, but after a quick test it seems it works for sequences, too, so I've gone with "relation". It doesn't work with views, of course, but it does work with materialized views. Modified patch attached. -- Vik -- Sent via pgsql-docs mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs Attachments: [text/x-diff] pageinspect_init_fork.v2.patch (1.2K, 2-pageinspect_init_fork.v2.patch) download | inline diff: *** a/doc/src/sgml/pageinspect.sgml --- b/doc/src/sgml/pageinspect.sgml *************** *** 28,38 **** <listitem> <para> <function>get_raw_page</function> reads the specified block of the named ! table and returns a copy as a <type>bytea</> value. This allows a single time-consistent copy of the block to be obtained. <replaceable>fork</replaceable> should be <literal>'main'</literal> for ! the main data fork, or <literal>'fsm'</literal> for the free space map, ! or <literal>'vm'</literal> for the visibility map. </para> </listitem> </varlistentry> --- 28,39 ---- <listitem> <para> <function>get_raw_page</function> reads the specified block of the named ! relation and returns a copy as a <type>bytea</> value. This allows a single time-consistent copy of the block to be obtained. <replaceable>fork</replaceable> should be <literal>'main'</literal> for ! the main data fork, <literal>'fsm'</literal> for the free space map, ! <literal>'vm'</literal> for the visibility map, or <literal>'init'</literal> ! for the initialization fork. </para> </listitem> </varlistentry> ^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pageinspect forks 2014-07-30 12:11 pageinspect forks Vik Fearing <[email protected]> 2014-08-10 13:24 ` Re: pageinspect forks MauMau <[email protected]> 2014-08-10 18:59 ` Re: pageinspect forks Vik Fearing <[email protected]> @ 2014-08-10 22:22 ` MauMau <[email protected]> 2014-08-11 12:34 ` Re: pageinspect forks Vik Fearing <[email protected]> 0 siblings, 1 reply; 8+ messages in thread From: MauMau @ 2014-08-10 22:22 UTC (permalink / raw) To: Vik Fearing <[email protected]>; pgsql-docs From: "Vik Fearing" <[email protected]> > On 08/10/2014 03:24 PM, MauMau wrote: >> Could you also improve the doc by changing "table" to "relation" in the >> description of get_raw_page()? Having a quick look at the code, it >> seems that the function can also handle indexes. >> >> table and returns a copy as a <type>bytea</> value. This allows a > > > Good catch. I wasn't sure whether using "relation" or "table or index" > was better, but after a quick test it seems it works for sequences, too, > so I've gone with "relation". > > It doesn't work with views, of course, but it does work with > materialized views. > > Modified patch attached. Thanks, I marked this as ready for committer. I think I'll leave it up to you to decide whether you improve the HINT message Fujii-san pointed out, which is in src/backend/catalog/catalog.c. Regards MauMau -- Sent via pgsql-docs mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs ^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pageinspect forks 2014-07-30 12:11 pageinspect forks Vik Fearing <[email protected]> 2014-08-10 13:24 ` Re: pageinspect forks MauMau <[email protected]> 2014-08-10 18:59 ` Re: pageinspect forks Vik Fearing <[email protected]> 2014-08-10 22:22 ` Re: pageinspect forks MauMau <[email protected]> @ 2014-08-11 12:34 ` Vik Fearing <[email protected]> 2014-08-11 13:42 ` Re: pageinspect forks MauMau <[email protected]> 0 siblings, 1 reply; 8+ messages in thread From: Vik Fearing @ 2014-08-11 12:34 UTC (permalink / raw) To: MauMau <[email protected]>; pgsql-docs On 08/11/2014 12:22 AM, MauMau wrote: > From: "Vik Fearing" <[email protected]> >> On 08/10/2014 03:24 PM, MauMau wrote: >>> Could you also improve the doc by changing "table" to "relation" in the >>> description of get_raw_page()? Having a quick look at the code, it >>> seems that the function can also handle indexes. >>> >>> table and returns a copy as a <type>bytea</> value. This >>> allows a >> >> >> Good catch. I wasn't sure whether using "relation" or "table or index" >> was better, but after a quick test it seems it works for sequences, too, >> so I've gone with "relation". >> >> It doesn't work with views, of course, but it does work with >> materialized views. >> >> Modified patch attached. > > Thanks, I marked this as ready for committer. > > I think I'll leave it up to you to decide whether you improve the HINT > message Fujii-san pointed out, which is in src/backend/catalog/catalog.c. I think you're looking at an old version of the code. My understanding of his message was that that patch had already been applied but not backpatched and he wants it backpatched. To wit, that hint message does include "init" on master and it's located in src/common/relpath.c. However, I did find another occurence in the documentation, so third patch attached. -- Vik -- Sent via pgsql-docs mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs Attachments: [text/x-diff] pageinspect_init_fork.v3.patch (2.1K, 2-pageinspect_init_fork.v3.patch) download | inline diff: *** a/doc/src/sgml/pageinspect.sgml --- b/doc/src/sgml/pageinspect.sgml *************** *** 28,38 **** <listitem> <para> <function>get_raw_page</function> reads the specified block of the named ! table and returns a copy as a <type>bytea</> value. This allows a single time-consistent copy of the block to be obtained. <replaceable>fork</replaceable> should be <literal>'main'</literal> for ! the main data fork, or <literal>'fsm'</literal> for the free space map, ! or <literal>'vm'</literal> for the visibility map. </para> </listitem> </varlistentry> --- 28,39 ---- <listitem> <para> <function>get_raw_page</function> reads the specified block of the named ! relation and returns a copy as a <type>bytea</> value. This allows a single time-consistent copy of the block to be obtained. <replaceable>fork</replaceable> should be <literal>'main'</literal> for ! the main data fork, <literal>'fsm'</literal> for the free space map, ! <literal>'vm'</literal> for the visibility map, or <literal>'init'</literal> ! for the initialization fork. </para> </listitem> </varlistentry> *** a/doc/src/sgml/storage.sgml --- b/doc/src/sgml/storage.sgml *************** *** 265,272 **** The <function>pg_relation_filepath()</> function shows the entire path as a substitute for remembering many of the above rules. But keep in mind that this function just gives the name of the first segment of the main fork of the relation — you may need to append a segment number ! and/or <literal>_fsm</> or <literal>_vm</> to find all the files associated ! with the relation. </para> <para> --- 265,272 ---- as a substitute for remembering many of the above rules. But keep in mind that this function just gives the name of the first segment of the main fork of the relation — you may need to append a segment number ! and/or <literal>_fsm</>, <literal>_vm</>, or <literal>_init</> to find all ! the files associated with the relation. </para> <para> ^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pageinspect forks 2014-07-30 12:11 pageinspect forks Vik Fearing <[email protected]> 2014-08-10 13:24 ` Re: pageinspect forks MauMau <[email protected]> 2014-08-10 18:59 ` Re: pageinspect forks Vik Fearing <[email protected]> 2014-08-10 22:22 ` Re: pageinspect forks MauMau <[email protected]> 2014-08-11 12:34 ` Re: pageinspect forks Vik Fearing <[email protected]> @ 2014-08-11 13:42 ` MauMau <[email protected]> 2014-08-11 14:38 ` Re: pageinspect forks Fujii Masao <[email protected]> 0 siblings, 1 reply; 8+ messages in thread From: MauMau @ 2014-08-11 13:42 UTC (permalink / raw) To: Vik Fearing <[email protected]>; pgsql-docs From: "Vik Fearing" <[email protected]> > I think you're looking at an old version of the code. My understanding > of his message was that that patch had already been applied but not > backpatched and he wants it backpatched. To wit, that hint message does > include "init" on master and it's located in src/common/relpath.c. > > However, I did find another occurence in the documentation, so third > patch attached. You are right, I was looking at the code of 9.3.4 at hand. The latest code certainly has the accurate HINT message. Your v3 patch looks reasonable. Regards MauMau -- Sent via pgsql-docs mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs ^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pageinspect forks 2014-07-30 12:11 pageinspect forks Vik Fearing <[email protected]> 2014-08-10 13:24 ` Re: pageinspect forks MauMau <[email protected]> 2014-08-10 18:59 ` Re: pageinspect forks Vik Fearing <[email protected]> 2014-08-10 22:22 ` Re: pageinspect forks MauMau <[email protected]> 2014-08-11 12:34 ` Re: pageinspect forks Vik Fearing <[email protected]> 2014-08-11 13:42 ` Re: pageinspect forks MauMau <[email protected]> @ 2014-08-11 14:38 ` Fujii Masao <[email protected]> 0 siblings, 0 replies; 8+ messages in thread From: Fujii Masao @ 2014-08-11 14:38 UTC (permalink / raw) To: MauMau <[email protected]>; +Cc: Vik Fearing <[email protected]>; pgsql-docs On Mon, Aug 11, 2014 at 10:42 PM, MauMau <[email protected]> wrote: > From: "Vik Fearing" <[email protected]> > >> I think you're looking at an old version of the code. My understanding >> of his message was that that patch had already been applied but not >> backpatched and he wants it backpatched. To wit, that hint message does >> include "init" on master and it's located in src/common/relpath.c. >> >> However, I did find another occurence in the documentation, so third >> patch attached. > > > You are right, I was looking at the code of 9.3.4 at hand. The latest code > certainly has the accurate HINT message. > > Your v3 patch looks reasonable. Thanks for the patch! Applied. Regards, -- Fujii Masao -- Sent via pgsql-docs mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs ^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pageinspect forks 2014-07-30 12:11 pageinspect forks Vik Fearing <[email protected]> @ 2014-08-10 15:48 ` Fujii Masao <[email protected]> 1 sibling, 0 replies; 8+ messages in thread From: Fujii Masao @ 2014-08-10 15:48 UTC (permalink / raw) To: Vik Fearing <[email protected]>; +Cc: pgsql-docs On Wed, Jul 30, 2014 at 9:11 PM, Vik Fearing <[email protected]> wrote: > I noticed that the documentation for pageinspect lists the different > forks but omits the initialization fork. > > Here is a trivial patch to fix that. ISTM that this fix needs to back-patched to 9.1 where the initialization fork was introduced. I found that the document of pg_relation_size() had the same problem and it has been fixed recently by 2d00190495b22e0d0ba351b2cda9c95fb2e3d083, but it has not been back-patched to 9.1, 9.2 and 9.3. I think that we should back-patch that to those versions. That commit also fixed the HINT message "HINT: Valid fork names are "main", "fsm", and "vm".", so that the initialization fork is included in that message. This also needs to be back-patched to those versions. Regards, -- Fujii Masao -- Sent via pgsql-docs mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs ^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2014-08-11 14:38 UTC | newest] Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2014-07-30 12:11 pageinspect forks Vik Fearing <[email protected]> 2014-08-10 13:24 ` MauMau <[email protected]> 2014-08-10 18:59 ` Vik Fearing <[email protected]> 2014-08-10 22:22 ` MauMau <[email protected]> 2014-08-11 12:34 ` Vik Fearing <[email protected]> 2014-08-11 13:42 ` MauMau <[email protected]> 2014-08-11 14:38 ` Fujii Masao <[email protected]> 2014-08-10 15:48 ` Fujii Masao <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox