Thread: Database 'xxxx', OID yyyyy, has disappeared from pg_database
I receive the following error when trying to connect to ALL postgres databases on my system. Database 'xxxx', OID yyyyy, has disappeared from pg_database The various archives have other users that had this problem and the solution is to vacuum the pg_database, however; bash$ vacuumdb pg_database psql: FATAL 1: Database "pg_database" does not exist in the system catalog. vacuumdb: vacuum failed I also cannot connect to any database precluding me from running vacuum pg_database from the psql command line. I cannot create a database and attempt this as, bash$ createdb tester psql: FATAL 1: Database 'template1', OID 17216, has disappeared from pg_database createdb: database creation failed Any suggestions? RedHat Linux Kernel 2.2.14-5 PostgreSQL 7.0.0 - yeah, I know I should have upgraded. SOL? Thanks in advance. -- Michael Glenn http://www.mglenn.com 416.544.9904
Michael Glenn <mike@mglenn.com> writes: > I receive the following error when trying to connect to ALL postgres > databases on my system. > Database 'xxxx', OID yyyyy, has disappeared from pg_database Hmm. The only thing I can think of that might cause that for all DBs at once is transaction ID wraparound. How large is your pg_log file ($PGDATA/pg_log, in 7.0)? If it's 1GB then that's what happened to you. > The various archives have other users that had this problem and the > solution is to vacuum the pg_database, however; > bash$ vacuumdb pg_database > psql: FATAL 1: Database "pg_database" does not exist in the system catalog. There are problems that can cause this error message for individual databases, and the solution is to connect to another database and vacuum the pg_database table (not the pg_database database; there isn't one). But that won't help if you can't get into anything to begin with. > PostgreSQL 7.0.0 - yeah, I know I should have upgraded. SOL? Could be :-(. If your pg_log is not 1GB in size then you didn't have a wraparound and maybe we can still help you. Otherwise, I hope you made a backup recently. regards, tom lane
Tom, The log is only 98K. -rw-rw-r-- 1 postgres postgres 98304 Apr 24 15:00 pg_log So it's not a wraparound problem. Recent backups unfortunately are not available for all the databases. Any suggestions? Thanks Tom Lane wrote: >Michael Glenn <mike@mglenn.com> writes: > > >>> I receive the following error when trying to connect to ALL postgres >>> databases on my system. >> >> > > > >>> Database 'xxxx', OID yyyyy, has disappeared from pg_database >> >> > >Hmm. The only thing I can think of that might cause that for all DBs >at once is transaction ID wraparound. How large is your pg_log file >($PGDATA/pg_log, in 7.0)? If it's 1GB then that's what happened to you. > > > >>> The various archives have other users that had this problem and the >>> solution is to vacuum the pg_database, however; >> >> > > > >>> bash$ vacuumdb pg_database >>> psql: FATAL 1: Database "pg_database" does not exist in the system catalog. >> >> > >There are problems that can cause this error message for individual >databases, and the solution is to connect to another database and vacuum >the pg_database table (not the pg_database database; there isn't one). >But that won't help if you can't get into anything to begin with. > > > >>> PostgreSQL 7.0.0 - yeah, I know I should have upgraded. SOL? >> >> > >Could be :-(. If your pg_log is not 1GB in size then you didn't have a >wraparound and maybe we can still help you. Otherwise, I hope you made >a backup recently. > > regards, tom lane > >---------------------------(end of broadcast)--------------------------- >TIP 5: Have you checked our extensive FAQ? > >http://www.postgresql.org/users-lounge/docs/faq.html > > > >
Michael Glenn <mike@mglenn.com> writes: > The log is only 98K. Okay, then you haven't executed four billion transactions... Probably the next thing is to look at pg_database and try to understand why all the rows are showing as dead. There are a couple of tools around that can dump out the contents of tuple headers. I'd suggest pg_filedump (http://sources.redhat.com/rhdb/tools.html), but it is intended for 7.1/7.2 and you'd need to do a little surgery to make it work on 7.0 files. (I think ripping out the code that expects an LSN field to be present in the page header would be enough.) If you check the PG list archives you will find references to one or two older programs in the same vein; there might still be something available that will work on 7.0 files without modification. regards, tom lane
I downloaded pg_dumpfile (thank you) then eventually found out I need to download, configure, and point to 7.2.1 source to compile, which makes sense now. I compiled and attempted a dump with the references and without the references to LSN from the function FormatHeader. In both cases I received the dump output below indicating "Invalid header information.". Now, is each block header corrupted OR is the dump utility not able to read older pg_database files? If switched both blockOptions and BLOCK_FORMAT to true (1 and 0x00000001 respectively) to print the raw data anyway. The first part is below. I have no idea how to interpret the information, perhaps somone else does. If you would like the entire dump please let me know. Thanks. ***************************************************************** * PostgreSQL File/Block Formatted Dump Utility * * File: /var/lib/pgsql/pg_database * Options used: None * * Dump created on: Thu Apr 25 13:37:24 2002 ***************************************************************** Block 0 ****************************************************** <Header> ----- Block Offset: 0x00000000 Offsets: Lower 40780 (0x9f4c) Block Size: 166 Upper 178 (0x00b2) Special 40696 (0x9ef8) Items: 10190 Free Space: 4294926694 Length (including item array): 166 Error: Invalid header information. Error: End of block encountered within the header. Bytes read: 166. 00000000: a0002013 00200020 a89faa00 4c9fb200 .. .. . ....L... 00000010: f89ea600 a89ea000 549ea200 f89db400 ........T....... 00000020: a49da400 549da000 f09ab200 989aae00 ....T........... 00000030: fc9caa00 a89ca800 449aa400 509cae00 ........D...P... 00000040: f89baa00 f099a800 a49ba800 4c9bae00 ............L... 00000050: 9c99a600 4899a200 f098ae00 9898aa00 ....H........... 00000060: 3c98b200 e897a400 9497a400 3c97b000 <...........<... 00000070: e896a800 8c96b400 3896a400 e095b000 ........8....... 00000080: 8895ac00 2c95b800 d094b800 7494b800 ....,.......t... 00000090: 1c94aa00 c893a800 7493a800 2093a800 ........t... ... 000000a0: 00000000 0000 ...... Block 1 ****************************************************** <Header> ----- Block Offset: 0x000000a6 Offsets: Lower 0 (0x0000) Block Size: 0 Upper 0 (0x0000) Special 0 (0x0000) Items: -5 Free Space: 0 Length (including item array): 24 Error: Invalid header information. 000000a6: 00000000 00000000 00000000 00000000 ................ 000000b6: 00000000 00000000 ........ <Data> ------ Error: Item index corrupt on block. Offset: <-5>. <Special Section> ----- Error: Invalid special section encountered. Error: Special section points off page. Unable to dump contents. Block 2 ****************************************************** <Header> ----- Block Offset: 0x0000014c Offsets: Lower 0 (0x0000) Block Size: 0 Upper 0 (0x0000) Special 0 (0x0000) Items: -5 Free Space: 0 Length (including item array): 24 Error: Invalid header information. 0000014c: 00000000 00000000 00000000 00000000 ................ 0000015c: 00000000 00000000 ........ <Data> ------ Error: Item index corrupt on block. Offset: <-5>. <Special Section> ----- Error: Invalid special section encountered. Error: Special section points off page. Unable to dump contents. . etc... . . Tom Lane wrote: >Michael Glenn <mike@mglenn.com> writes: > > >>The log is only 98K. >> >> > >Okay, then you haven't executed four billion transactions... > >Probably the next thing is to look at pg_database and try to understand >why all the rows are showing as dead. There are a couple of tools >around that can dump out the contents of tuple headers. I'd suggest >pg_filedump (http://sources.redhat.com/rhdb/tools.html), but it is >intended for 7.1/7.2 and you'd need to do a little surgery to make it >work on 7.0 files. (I think ripping out the code that expects an LSN >field to be present in the page header would be enough.) If you check >the PG list archives you will find references to one or two older >programs in the same vein; there might still be something available >that will work on 7.0 files without modification. > > regards, tom lane > >---------------------------(end of broadcast)--------------------------- >TIP 4: Don't 'kill -9' the postmaster > > > >
Michael Glenn <mike@mglenn.com> writes: > I downloaded pg_dumpfile (thank you) then eventually found out I need to > download, configure, and point to 7.2.1 source to compile, which makes > sense now. > I compiled and attempted a dump with the references and without the > references to LSN from the function FormatHeader. In both cases I > received the dump output below indicating "Invalid header > information.". Now, is each block header corrupted OR is the dump > utility not able to read older pg_database files? If you compiled the pg_dumpfile sources using 7.2 header files, then they'd be using the 7.2 page header struct, which is the wrong thing. You need to use the 7.0 version of the PageHeaderData struct (see src/include/storage/bufpage.h). My inclination would be to try to compile pg_dumpfile against the 7.0 headers not 7.2. You might have to rip out references to pg_control and CRC checking to make that work, but there are no CRCs in 7.0 files anyway so you won't lose any functionality. Once it does compile you could be pretty sure that it would actually work. regards, tom lane
Hi Tom, It's been quite a while since I've actually programmed in C but it appears to have worked. I commented out the imports that referred to header files that don't exist in 7.0 and commented out all code references. I may have made changes that were too broad and commented out functions to print critical data, but below is the dump. Let me know if it should have more detail. It seems a bit short and not very verbose. Excuse the lengthy dump, there are 32 databases that I've lost. 38 items are listed in the file dump. I'm not sure what the relationship is there. Thanks # ./pg_filedump -fa /var/lib/pgsql/pg_database ***************************************************************** * PostgreSQL File/Block Formatted Dump Utility * * File: /var/lib/pgsql/pg_database * Options used: -fa * * Dump created on: Thu Apr 25 15:15:38 2002 ***************************************************************** Block 0 ****************************************************** <Header> ----- Block Offset: 0x00000000 Offsets: Lower 160 (0x00a0) Block Size: 8192 Upper 4896 (0x1320) Special 8192 (0x2000) Items: 38 Free Space: 4736 Length (including item array): 164 00000000: a0002013 00200020 a89faa00 4c9fb200 .. .. . ....L... 00000010: f89ea600 a89ea000 549ea200 f89db400 ........T....... 00000020: a49da400 549da000 f09ab200 989aae00 ....T........... 00000030: fc9caa00 a89ca800 449aa400 509cae00 ........D...P... 00000040: f89baa00 f099a800 a49ba800 4c9bae00 ............L... 00000050: 9c99a600 4899a200 f098ae00 9898aa00 ....H........... 00000060: 3c98b200 e897a400 9497a400 3c97b000 <...........<... 00000070: e896a800 8c96b400 3896a400 e095b000 ........8....... 00000080: 8895ac00 2c95b800 d094b800 7494b800 ....,.......t... 00000090: 1c94aa00 c893a800 7493a800 2093a800 ........t... ... 000000a0: 00000000 .... <Data> ------ Item 1 -- Length: 85 Offset: 8104 (0x1fa8) Flags: USED 00001fa8: 40430000 00000000 00000000 00020000 @C.............. 00001fb8: 00000000 00000000 01000400 02092000 .............. . 00001fc8: 74656d70 6c617465 31000000 00000000 template1....... 00001fd8: 00000000 00000000 00000000 00000000 ................ 00001fe8: 1a000000 00000000 0d000000 74656d70 ............temp 00001ff8: 6c617465 31 late1 Item 2 -- Length: 89 Offset: 8012 (0x1f4c) Flags: USED 00001f4c: 60490000 00000000 00000000 16260000 `I...........&.. 00001f5c: 00000000 00000000 02000400 02092000 .............. . 00001f6c: 6e6f7274 68343964 65736967 6e000000 north49design... 00001f7c: 00000000 00000000 00000000 00000000 ................ 00001f8c: f6010000 00000000 11000000 6e6f7274 ............nort 00001f9c: 68343964 65736967 6e h49design Item 3 -- Length: 83 Offset: 7928 (0x1ef8) Flags: USED 00001ef8: 80490000 00000000 00000000 19260000 .I...........&.. 00001f08: 00000000 00000000 03000400 02092000 .............. . 00001f18: 636f6e74 72617800 00000000 00000000 contrax......... 00001f28: 00000000 00000000 00000000 00000000 ................ 00001f38: f6010000 00000000 0b000000 636f6e74 ............cont 00001f48: 726178 rax Item 4 -- Length: 80 Offset: 7848 (0x1ea8) Flags: USED 00001ea8: e0490000 00000000 00000000 102a0000 .I...........*.. 00001eb8: 00000000 00000000 04000400 02092000 .............. . 00001ec8: 6d696b65 00000000 00000000 00000000 mike............ 00001ed8: 00000000 00000000 00000000 00000000 ................ 00001ee8: f4010000 00000000 08000000 6d696b65 ............mike Item 5 -- Length: 81 Offset: 7764 (0x1e54) Flags: USED 00001e54: e0560000 00000000 00000000 aa440000 .V...........D.. 00001e64: 73620000 00000000 05000400 02052000 sb............ . 00001e74: 666f726d 73000000 00000000 00000000 forms........... 00001e84: 00000000 00000000 00000000 00000000 ................ 00001e94: f6010000 00000000 09000000 666f726d ............form 00001ea4: 73 s Item 6 -- Length: 90 Offset: 7672 (0x1df8) Flags: USED 00001df8: 80580000 00000000 00000000 75450000 .X..........uE.. 00001e08: 00000000 00000000 06000400 02092000 .............. . 00001e18: 736f6e69 63626f6f 6d657261 6e670000 sonicboomerang.. 00001e28: 00000000 00000000 00000000 00000000 ................ 00001e38: f4010000 00000000 12000000 736f6e69 ............soni 00001e48: 63626f6f 6d657261 6e67 cboomerang Item 7 -- Length: 82 Offset: 7588 (0x1da4) Flags: USED 00001da4: e06e0200 00000000 00000000 98980200 .n.............. 00001db4: 00000000 00000000 07000400 02092000 .............. . 00001dc4: 73627465 73740000 00000000 00000000 sbtest.......... 00001dd4: 00000000 00000000 00000000 00000000 ................ 00001de4: f7010000 00000000 0a000000 73627465 ............sbte 00001df4: 7374 st Item 8 -- Length: 80 Offset: 7508 (0x1d54) Flags: USED 00001d54: 20488706 00000000 00000000 ba527701 H...........Rw. 00001d64: 00000000 00000000 08000400 02092000 .............. . 00001d74: 6f616d6c 00000000 00000000 00000000 oaml............ 00001d84: 00000000 00000000 00000000 00000000 ................ 00001d94: f4010000 00000000 08000000 6f616d6c ............oaml Item 9 -- Length: 89 Offset: 6896 (0x1af0) Flags: USED 00001af0: e0aef007 00000000 00000000 5d140902 ............]... 00001b00: 00000000 00000000 09000400 02092000 .............. . 00001b10: 736f6e69 635f6d69 67726174 65000000 sonic_migrate... 00001b20: 00000000 00000000 00000000 00000000 ................ 00001b30: fb010000 00000000 11000000 736f6e69 ............soni 00001b40: 635f6d69 67726174 65 c_migrate Item 10 -- Length: 87 Offset: 6808 (0x1a98) Flags: USED 00001a98: c0e30708 00000000 00000000 b9440902 .............D.. 00001aa8: 3b630000 00000000 0a000400 02052000 ;c............ . 00001ab8: 70617261 76696e61 6c696100 00000000 paravinalia..... 00001ac8: 00000000 00000000 00000000 00000000 ................ 00001ad8: f6010000 00000000 0f000000 70617261 ............para 00001ae8: 76696e61 6c6961 vinalia Item 11 -- Length: 85 Offset: 7420 (0x1cfc) Flags: USED 00001cfc: a0bcb806 00000000 00000000 9e4ba401 .............K.. 00001d0c: 00000000 00000000 0b000400 02092000 .............. . 00001d1c: 63626170 74697374 65000000 00000000 cbaptiste....... 00001d2c: 00000000 00000000 00000000 00000000 ................ 00001d3c: f8010000 00000000 0d000000 63626170 ............cbap 00001d4c: 74697374 65 tiste Item 12 -- Length: 84 Offset: 7336 (0x1ca8) Flags: USED 00001ca8: 0075fc06 00000000 00000000 b89dc501 .u.............. 00001cb8: 00000000 00000000 0c000400 02092000 .............. . 00001cc8: 7a617869 736e6574 00000000 00000000 zaxisnet........ 00001cd8: 00000000 00000000 00000000 00000000 ................ 00001ce8: f9010000 00000000 0c000000 7a617869 ............zaxi 00001cf8: 736e6574 snet Item 13 -- Length: 82 Offset: 6724 (0x1a44) Flags: USED 00001a44: 20ee0708 00000000 00000000 815e0902 ............^.. 00001a54: b8730000 00000000 0d000400 02052000 .s............ . 00001a64: 6d676c65 6e6e0000 00000000 00000000 mglenn.......... 00001a74: 00000000 00000000 00000000 00000000 ................ 00001a84: f4010000 00000000 0a000000 6d676c65 ............mgle 00001a94: 6e6e nn Item 14 -- Length: 87 Offset: 7248 (0x1c50) Flags: USED 00001c50: 6077fc06 00000000 00000000 90ccc501 `w.............. 00001c60: 00000000 00000000 0e000400 02092000 .............. . 00001c70: 6d61696c 696e676c 69737400 00000000 mailinglist..... 00001c80: 00000000 00000000 00000000 00000000 ................ 00001c90: f4010000 00000000 0f000000 6d61696c ............mail 00001ca0: 696e676c 697374 inglist Item 15 -- Length: 85 Offset: 7160 (0x1bf8) Flags: USED 00001bf8: 4041fd06 00000000 00000000 f51fc601 @A.............. 00001c08: 00000000 00000000 0f000400 02092000 .............. . 00001c18: 70686f6e 656c6973 74000000 00000000 phonelist....... 00001c28: 00000000 00000000 00000000 00000000 ................ 00001c38: f9010000 00000000 0d000000 70686f6e ............phon 00001c48: 656c6973 74 elist Item 16 -- Length: 84 Offset: 6640 (0x19f0) Flags: USED 000019f0: c0fc0708 00000000 00000000 75060000 ............u... 00001a00: 00000000 00000000 10000400 02092000 .............. . 00001a10: 706f7374 67726573 00000000 00000000 postgres........ 00001a20: 00000000 00000000 00000000 00000000 ................ 00001a30: 1a000000 00000000 0c000000 706f7374 ............post 00001a40: 67726573 gres Item 17 -- Length: 84 Offset: 7076 (0x1ba4) Flags: USED 00001ba4: 207b0d07 00000000 00000000 dcd4c801 {.............. 00001bb4: 00000000 00000000 11000400 02092000 .............. . 00001bc4: 6375726f 7a6f6e65 00000000 00000000 curozone........ 00001bd4: 00000000 00000000 00000000 00000000 ................ 00001be4: fa010000 00000000 0c000000 6375726f ............curo 00001bf4: 7a6f6e65 zone Item 18 -- Length: 87 Offset: 6988 (0x1b4c) Flags: USED 00001b4c: 407b0d07 00000000 00000000 ded4c801 @{.............. 00001b5c: 00000000 00000000 12000400 02092000 .............. . 00001b6c: 6375726f 6d61696c 696e6700 00000000 curomailing..... 00001b7c: 00000000 00000000 00000000 00000000 ................ 00001b8c: fa010000 00000000 0f000000 6375726f ............curo 00001b9c: 6d61696c 696e67 mailing Item 19 -- Length: 83 Offset: 6556 (0x199c) Flags: USED 0000199c: e0fc0708 00000000 00000000 031e0000 ................ 000019ac: 00000000 00000000 13000400 02092000 .............. . 000019bc: 74657374 696e6700 00000000 00000000 testing......... 000019cc: 00000000 00000000 00000000 00000000 ................ 000019dc: f6010000 00000000 0b000000 74657374 ............test 000019ec: 696e67 ing Item 20 -- Length: 81 Offset: 6472 (0x1948) Flags: USED 00001948: 60fd0708 00000000 00000000 75620000 `...........ub.. 00001958: 00000000 00000000 14000400 02092000 .............. . 00001968: 666f726d 73000000 00000000 00000000 forms........... 00001978: 00000000 00000000 00000000 00000000 ................ 00001988: f6010000 00000000 09000000 666f726d ............form 00001998: 73 s Item 21 -- Length: 87 Offset: 6384 (0x18f0) Flags: USED 000018f0: c0fe0708 00000000 00000000 3d630000 ............=c.. 00001900: 00000000 00000000 15000400 02092000 .............. . 00001910: 70617261 76696e61 6c696100 00000000 paravinalia..... 00001920: 00000000 00000000 00000000 00000000 ................ 00001930: f6010000 00000000 0f000000 70617261 ............para 00001940: 76696e61 6c6961 vinalia Item 22 -- Length: 85 Offset: 6296 (0x1898) Flags: USED 00001898: 20030808 00000000 00000000 496e0000 ...........In.. 000018a8: 00000000 00000000 16000400 02092000 .............. . 000018b8: 73626665 61747572 65000000 00000000 sbfeature....... 000018c8: 00000000 00000000 00000000 00000000 ................ 000018d8: f7010000 00000000 0d000000 73626665 ............sbfe 000018e8: 61747572 65 ature Item 23 -- Length: 89 Offset: 6204 (0x183c) Flags: USED 0000183c: 60050808 00000000 00000000 1f730000 `............s.. 0000184c: 00000000 00000000 17000400 02092000 .............. . 0000185c: 7a617869 736e6574 666f7275 6d000000 zaxisnetforum... 0000186c: 00000000 00000000 00000000 00000000 ................ 0000187c: f9010000 00000000 11000000 7a617869 ............zaxi 0000188c: 736e6574 666f7275 6d snetforum Item 24 -- Length: 82 Offset: 6120 (0x17e8) Flags: USED 000017e8: 80050808 00000000 00000000 bc730000 .............s.. 000017f8: 00000000 00000000 18000400 02092000 .............. . 00001808: 6d676c65 6e6e0000 00000000 00000000 mglenn.......... 00001818: 00000000 00000000 00000000 00000000 ................ 00001828: f4010000 00000000 0a000000 6d676c65 ............mgle 00001838: 6e6e nn Item 25 -- Length: 82 Offset: 6036 (0x1794) Flags: USED 00001794: 20290808 00000000 00000000 278c0100 )..........'... 000017a4: 00000000 00000000 19000400 02092000 .............. . 000017b4: 666f726d 616e0000 00000000 00000000 forman.......... 000017c4: 00000000 00000000 00000000 00000000 ................ 000017d4: f6010000 00000000 0a000000 666f726d ............form 000017e4: 616e an Item 26 -- Length: 88 Offset: 5948 (0x173c) Flags: USED 0000173c: 202b0808 00000000 00000000 209a0100 +.......... ... 0000174c: 00000000 00000000 1a000400 02092000 .............. . 0000175c: 666f726d 616e6d67 6c656e6e 00000000 formanmglenn.... 0000176c: 00000000 00000000 00000000 00000000 ................ 0000177c: f4010000 00000000 10000000 666f726d ............form 0000178c: 616e6d67 6c656e6e anmglenn Item 27 -- Length: 84 Offset: 5864 (0x16e8) Flags: USED 000016e8: c02e0808 00000000 00000000 0d9b0100 ................ 000016f8: 00000000 00000000 1b000400 02092000 .............. . 00001708: 6e656564 74657874 00000000 00000000 needtext........ 00001718: 00000000 00000000 00000000 00000000 ................ 00001728: f6010000 00000000 0c000000 6e656564 ............need 00001738: 74657874 text Item 28 -- Length: 90 Offset: 5772 (0x168c) Flags: USED 0000168c: e02e0808 00000000 00000000 0f9b0100 ................ 0000169c: 00000000 00000000 1c000400 02092000 .............. . 000016ac: 666f726d 616e6e65 65647465 78740000 formanneedtext.. 000016bc: 00000000 00000000 00000000 00000000 ................ 000016cc: f6010000 00000000 12000000 666f726d ............form 000016dc: 616e6e65 65647465 7874 anneedtext Item 29 -- Length: 82 Offset: 5688 (0x1638) Flags: USED 00001638: c0370808 00000000 00000000 2fd30100 .7........../... 00001648: 00000000 00000000 1d000400 02092000 .............. . 00001658: 67676c65 6e6e0000 00000000 00000000 gglenn.......... 00001668: 00000000 00000000 00000000 00000000 ................ 00001678: fc010000 00000000 0a000000 67676c65 ............ggle 00001688: 6e6e nn Item 30 -- Length: 88 Offset: 5600 (0x15e0) Flags: USED 000015e0: e0370808 00000000 00000000 33d30100 .7..........3... 000015f0: 39d30100 00000000 1e000400 02052000 9............. . 00001600: 666f726d 616e6767 6c656e6e 00000000 formangglenn.... 00001610: 00000000 00000000 00000000 00000000 ................ 00001620: fc010000 00000000 10000000 666f726d ............form 00001630: 616e6767 6c656e6e angglenn Item 31 -- Length: 86 Offset: 5512 (0x1588) Flags: USED 00001588: 00380808 00000000 00000000 35d30100 .8..........5... 00001598: 00000000 00000000 1f000400 02092000 .............. . 000015a8: 676c656e 6e67726f 75700000 00000000 glenngroup...... 000015b8: 00000000 00000000 00000000 00000000 ................ 000015c8: fc010000 00000000 0e000000 676c656e ............glen 000015d8: 6e67726f 7570 ngroup Item 32 -- Length: 92 Offset: 5420 (0x152c) Flags: USED 0000152c: 20380808 00000000 00000000 3bd30100 8..........;... 0000153c: 54d30100 00000000 20000400 02052000 T....... ..... . 0000154c: 666f726d 616e676c 656e6e67 726f7570 formanglenngroup 0000155c: 00000000 00000000 00000000 00000000 ................ 0000156c: fc010000 00000000 14000000 666f726d ............form 0000157c: 616e676c 656e6e67 726f7570 anglenngroup Item 33 -- Length: 92 Offset: 5328 (0x14d0) Flags: USED 000014d0: c0390808 00000000 00000000 56d30100 .9..........V... 000014e0: 98d30100 00000000 21000400 02052000 ........!..... . 000014f0: 666f726d 616e676c 656e6e67 726f7570 formanglenngroup 00001500: 00000000 00000000 00000000 00000000 ................ 00001510: fc010000 00000000 14000000 666f726d ............form 00001520: 616e676c 656e6e67 726f7570 anglenngroup Item 34 -- Length: 92 Offset: 5236 (0x1474) Flags: USED 00001474: 803b0808 00000000 00000000 9ad30100 .;.............. 00001484: 00000000 00000000 22000400 02092000 ........"..... . 00001494: 666f726d 616e676c 656e6e67 726f7570 formanglenngroup 000014a4: 00000000 00000000 00000000 00000000 ................ 000014b4: fc010000 00000000 14000000 666f726d ............form 000014c4: 616e676c 656e6e67 726f7570 anglenngroup Item 35 -- Length: 85 Offset: 5148 (0x141c) Flags: USED 0000141c: 80680808 00000000 00000000 e7f10200 .h.............. 0000142c: 00000000 00000000 23000400 02092000 ........#..... . 0000143c: 67666361 74616c6f 67000000 00000000 gfcatalog....... 0000144c: 00000000 00000000 00000000 00000000 ................ 0000145c: fd010000 00000000 0d000000 67666361 ............gfca 0000146c: 74616c6f 67 talog Item 36 -- Length: 84 Offset: 5064 (0x13c8) Flags: USED 000013c8: 00690808 00000000 00000000 732d0300 .i..........s-.. 000013d8: 00000000 00000000 24000400 02092000 ........$..... . 000013e8: 666f726d 616e6766 00000000 00000000 formangf........ 000013f8: 00000000 00000000 00000000 00000000 ................ 00001408: fd010000 00000000 0c000000 666f726d ............form 00001418: 616e6766 angf Item 37 -- Length: 84 Offset: 4980 (0x1374) Flags: USED 00001374: e0720808 00000000 00000000 e90b0400 .r.............. 00001384: 00000000 00000000 25000400 02092000 ........%..... . 00001394: 63746d62 6f617264 00000000 00000000 ctmboard........ 000013a4: 00000000 00000000 00000000 00000000 ................ 000013b4: fe010000 00000000 0c000000 63746d62 ............ctmb 000013c4: 6f617264 oard Item 38 -- Length: 84 Offset: 4896 (0x1320) Flags: USED 00001320: 20730808 00000000 00000000 1c0f0400 s.............. 00001330: 00000000 00000000 26000400 02092000 ........&..... . 00001340: 666f726d 616e6374 00000000 00000000 formanct........ 00001350: 00000000 00000000 00000000 00000000 ................ 00001360: fe010000 00000000 0c000000 666f726d ............form 00001370: 616e6374 anct Tom Lane wrote: >Michael Glenn <mike@mglenn.com> writes: > > >>I downloaded pg_dumpfile (thank you) then eventually found out I need to >>download, configure, and point to 7.2.1 source to compile, which makes >>sense now. >>I compiled and attempted a dump with the references and without the >>references to LSN from the function FormatHeader. In both cases I >>received the dump output below indicating "Invalid header >>information.". Now, is each block header corrupted OR is the dump >>utility not able to read older pg_database files? >> >> > >If you compiled the pg_dumpfile sources using 7.2 header files, then >they'd be using the 7.2 page header struct, which is the wrong thing. >You need to use the 7.0 version of the PageHeaderData struct >(see src/include/storage/bufpage.h). > >My inclination would be to try to compile pg_dumpfile against the 7.0 >headers not 7.2. You might have to rip out references to pg_control and >CRC checking to make that work, but there are no CRCs in 7.0 files >anyway so you won't lose any functionality. Once it does compile you >could be pretty sure that it would actually work. > > regards, tom lane > >---------------------------(end of broadcast)--------------------------- >TIP 6: Have you searched our list archives? > >http://archives.postgresql.org > > > >
Michael Glenn <mike@mglenn.com> writes: > It's been quite a while since I've actually programmed in C but it > appears to have worked. Looks reasonable. Could I trouble you for the output with switches -f -i though? It's the item details we need. regards, tom lane
Tom Lane wrote: >Michael Glenn <mike@mglenn.com> writes: > > >>It's been quite a while since I've actually programmed in C but it >>appears to have worked. >> >> > >Looks reasonable. Could I trouble you for the output with switches -f -i >though? It's the item details we need. > > Trouble me? I'm grateful your looking at at. Eternally grateful if you can solve it. Thanks again. # ./pg_filedump -f -i /var/lib/pgsql/pg_database ***************************************************************** * PostgreSQL File/Block Formatted Dump Utility * * File: /var/lib/pgsql/pg_database * Options used: -f -i * * Dump created on: Thu Apr 25 16:07:22 2002 ***************************************************************** Block 0 ****************************************************** <Header> ----- Block Offset: 0x00000000 Offsets: Lower 160 (0x00a0) Block Size: 8192 Upper 4896 (0x1320) Special 8192 (0x2000) Items: 38 Free Space: 4736 Length (including item array): 164 0000: a0002013 00200020 a89faa00 4c9fb200 .. .. . ....L... 0010: f89ea600 a89ea000 549ea200 f89db400 ........T....... 0020: a49da400 549da000 f09ab200 989aae00 ....T........... 0030: fc9caa00 a89ca800 449aa400 509cae00 ........D...P... 0040: f89baa00 f099a800 a49ba800 4c9bae00 ............L... 0050: 9c99a600 4899a200 f098ae00 9898aa00 ....H........... 0060: 3c98b200 e897a400 9497a400 3c97b000 <...........<... 0070: e896a800 8c96b400 3896a400 e095b000 ........8....... 0080: 8895ac00 2c95b800 d094b800 7494b800 ....,.......t... 0090: 1c94aa00 c893a800 7493a800 2093a800 ........t... ... 00a0: 00000000 .... <Data> ------ Item 1 -- Length: 85 Offset: 8104 (0x1fa8) Flags: USED OID: 17216 CID: min(0) max(0) XID: min(512) max(0) Block Id: 0 linp Index: 1 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 1fa8: 40430000 00000000 00000000 00020000 @C.............. 1fb8: 00000000 00000000 01000400 02092000 .............. . 1fc8: 74656d70 6c617465 31000000 00000000 template1....... 1fd8: 00000000 00000000 00000000 00000000 ................ 1fe8: 1a000000 00000000 0d000000 74656d70 ............temp 1ff8: 6c617465 31 late1 Item 2 -- Length: 89 Offset: 8012 (0x1f4c) Flags: USED OID: 18784 CID: min(0) max(0) XID: min(9750) max(0) Block Id: 0 linp Index: 2 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 1f4c: 60490000 00000000 00000000 16260000 `I...........&.. 1f5c: 00000000 00000000 02000400 02092000 .............. . 1f6c: 6e6f7274 68343964 65736967 6e000000 north49design... 1f7c: 00000000 00000000 00000000 00000000 ................ 1f8c: f6010000 00000000 11000000 6e6f7274 ............nort 1f9c: 68343964 65736967 6e h49design Item 3 -- Length: 83 Offset: 7928 (0x1ef8) Flags: USED OID: 18816 CID: min(0) max(0) XID: min(9753) max(0) Block Id: 0 linp Index: 3 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 1ef8: 80490000 00000000 00000000 19260000 .I...........&.. 1f08: 00000000 00000000 03000400 02092000 .............. . 1f18: 636f6e74 72617800 00000000 00000000 contrax......... 1f28: 00000000 00000000 00000000 00000000 ................ 1f38: f6010000 00000000 0b000000 636f6e74 ............cont 1f48: 726178 rax Item 4 -- Length: 80 Offset: 7848 (0x1ea8) Flags: USED OID: 18912 CID: min(0) max(0) XID: min(10768) max(0) Block Id: 0 linp Index: 4 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 1ea8: e0490000 00000000 00000000 102a0000 .I...........*.. 1eb8: 00000000 00000000 04000400 02092000 .............. . 1ec8: 6d696b65 00000000 00000000 00000000 mike............ 1ed8: 00000000 00000000 00000000 00000000 ................ 1ee8: f4010000 00000000 08000000 6d696b65 ............mike Item 5 -- Length: 81 Offset: 7764 (0x1e54) Flags: USED OID: 22240 CID: min(0) max(0) XID: min(17578) max(25203) Block Id: 0 linp Index: 5 Attributes: 4 Size: 32 infomask: 0x0502 (HASVARLENA|XMIN_COMMITTED|XMAX_COMMITTED) 1e54: e0560000 00000000 00000000 aa440000 .V...........D.. 1e64: 73620000 00000000 05000400 02052000 sb............ . 1e74: 666f726d 73000000 00000000 00000000 forms........... 1e84: 00000000 00000000 00000000 00000000 ................ 1e94: f6010000 00000000 09000000 666f726d ............form 1ea4: 73 s Item 6 -- Length: 90 Offset: 7672 (0x1df8) Flags: USED OID: 22656 CID: min(0) max(0) XID: min(17781) max(0) Block Id: 0 linp Index: 6 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 1df8: 80580000 00000000 00000000 75450000 .X..........uE.. 1e08: 00000000 00000000 06000400 02092000 .............. . 1e18: 736f6e69 63626f6f 6d657261 6e670000 sonicboomerang.. 1e28: 00000000 00000000 00000000 00000000 ................ 1e38: f4010000 00000000 12000000 736f6e69 ............soni 1e48: 63626f6f 6d657261 6e67 cboomerang Item 7 -- Length: 82 Offset: 7588 (0x1da4) Flags: USED OID: 159456 CID: min(0) max(0) XID: min(170136) max(0) Block Id: 0 linp Index: 7 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 1da4: e06e0200 00000000 00000000 98980200 .n.............. 1db4: 00000000 00000000 07000400 02092000 .............. . 1dc4: 73627465 73740000 00000000 00000000 sbtest.......... 1dd4: 00000000 00000000 00000000 00000000 ................ 1de4: f7010000 00000000 0a000000 73627465 ............sbte 1df4: 7374 st Item 8 -- Length: 80 Offset: 7508 (0x1d54) Flags: USED OID: 109529120 CID: min(0) max(0) XID: min(24597178) max(0) Block Id: 0 linp Index: 8 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 1d54: 20488706 00000000 00000000 ba527701 H...........Rw. 1d64: 00000000 00000000 08000400 02092000 .............. . 1d74: 6f616d6c 00000000 00000000 00000000 oaml............ 1d84: 00000000 00000000 00000000 00000000 ................ 1d94: f4010000 00000000 08000000 6f616d6c ............oaml Item 9 -- Length: 89 Offset: 6896 (0x1af0) Flags: USED OID: 133213920 CID: min(0) max(0) XID: min(34149469) max(0) Block Id: 0 linp Index: 9 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 1af0: e0aef007 00000000 00000000 5d140902 ............]... 1b00: 00000000 00000000 09000400 02092000 .............. . 1b10: 736f6e69 635f6d69 67726174 65000000 sonic_migrate... 1b20: 00000000 00000000 00000000 00000000 ................ 1b30: fb010000 00000000 11000000 736f6e69 ............soni 1b40: 635f6d69 67726174 65 c_migrate Item 10 -- Length: 87 Offset: 6808 (0x1a98) Flags: USED OID: 134734784 CID: min(0) max(0) XID: min(34161849) max(25403) Block Id: 0 linp Index: 10 Attributes: 4 Size: 32 infomask: 0x0502 (HASVARLENA|XMIN_COMMITTED|XMAX_COMMITTED) 1a98: c0e30708 00000000 00000000 b9440902 .............D.. 1aa8: 3b630000 00000000 0a000400 02052000 ;c............ . 1ab8: 70617261 76696e61 6c696100 00000000 paravinalia..... 1ac8: 00000000 00000000 00000000 00000000 ................ 1ad8: f6010000 00000000 0f000000 70617261 ............para 1ae8: 76696e61 6c6961 vinalia Item 11 -- Length: 85 Offset: 7420 (0x1cfc) Flags: USED OID: 112770208 CID: min(0) max(0) XID: min(27544478) max(0) Block Id: 0 linp Index: 11 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 1cfc: a0bcb806 00000000 00000000 9e4ba401 .............K.. 1d0c: 00000000 00000000 0b000400 02092000 .............. . 1d1c: 63626170 74697374 65000000 00000000 cbaptiste....... 1d2c: 00000000 00000000 00000000 00000000 ................ 1d3c: f8010000 00000000 0d000000 63626170 ............cbap 1d4c: 74697374 65 tiste Item 12 -- Length: 84 Offset: 7336 (0x1ca8) Flags: USED OID: 117208320 CID: min(0) max(0) XID: min(29728184) max(0) Block Id: 0 linp Index: 12 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 1ca8: 0075fc06 00000000 00000000 b89dc501 .u.............. 1cb8: 00000000 00000000 0c000400 02092000 .............. . 1cc8: 7a617869 736e6574 00000000 00000000 zaxisnet........ 1cd8: 00000000 00000000 00000000 00000000 ................ 1ce8: f9010000 00000000 0c000000 7a617869 ............zaxi 1cf8: 736e6574 snet Item 13 -- Length: 82 Offset: 6724 (0x1a44) Flags: USED OID: 134737440 CID: min(0) max(0) XID: min(34168449) max(29624) Block Id: 0 linp Index: 13 Attributes: 4 Size: 32 infomask: 0x0502 (HASVARLENA|XMIN_COMMITTED|XMAX_COMMITTED) 1a44: 20ee0708 00000000 00000000 815e0902 ............^.. 1a54: b8730000 00000000 0d000400 02052000 .s............ . 1a64: 6d676c65 6e6e0000 00000000 00000000 mglenn.......... 1a74: 00000000 00000000 00000000 00000000 ................ 1a84: f4010000 00000000 0a000000 6d676c65 ............mgle 1a94: 6e6e nn Item 14 -- Length: 87 Offset: 7248 (0x1c50) Flags: USED OID: 117208928 CID: min(0) max(0) XID: min(29740176) max(0) Block Id: 0 linp Index: 14 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 1c50: 6077fc06 00000000 00000000 90ccc501 `w.............. 1c60: 00000000 00000000 0e000400 02092000 .............. . 1c70: 6d61696c 696e676c 69737400 00000000 mailinglist..... 1c80: 00000000 00000000 00000000 00000000 ................ 1c90: f4010000 00000000 0f000000 6d61696c ............mail 1ca0: 696e676c 697374 inglist Item 15 -- Length: 85 Offset: 7160 (0x1bf8) Flags: USED OID: 117260608 CID: min(0) max(0) XID: min(29761525) max(0) Block Id: 0 linp Index: 15 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 1bf8: 4041fd06 00000000 00000000 f51fc601 @A.............. 1c08: 00000000 00000000 0f000400 02092000 .............. . 1c18: 70686f6e 656c6973 74000000 00000000 phonelist....... 1c28: 00000000 00000000 00000000 00000000 ................ 1c38: f9010000 00000000 0d000000 70686f6e ............phon 1c48: 656c6973 74 elist Item 16 -- Length: 84 Offset: 6640 (0x19f0) Flags: USED OID: 134741184 CID: min(0) max(0) XID: min(1653) max(0) Block Id: 0 linp Index: 16 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 19f0: c0fc0708 00000000 00000000 75060000 ............u... 1a00: 00000000 00000000 10000400 02092000 .............. . 1a10: 706f7374 67726573 00000000 00000000 postgres........ 1a20: 00000000 00000000 00000000 00000000 ................ 1a30: 1a000000 00000000 0c000000 706f7374 ............post 1a40: 67726573 gres Item 17 -- Length: 84 Offset: 7076 (0x1ba4) Flags: USED OID: 118324000 CID: min(0) max(0) XID: min(29938908) max(0) Block Id: 0 linp Index: 17 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 1ba4: 207b0d07 00000000 00000000 dcd4c801 {.............. 1bb4: 00000000 00000000 11000400 02092000 .............. . 1bc4: 6375726f 7a6f6e65 00000000 00000000 curozone........ 1bd4: 00000000 00000000 00000000 00000000 ................ 1be4: fa010000 00000000 0c000000 6375726f ............curo 1bf4: 7a6f6e65 zone Item 18 -- Length: 87 Offset: 6988 (0x1b4c) Flags: USED OID: 118324032 CID: min(0) max(0) XID: min(29938910) max(0) Block Id: 0 linp Index: 18 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 1b4c: 407b0d07 00000000 00000000 ded4c801 @{.............. 1b5c: 00000000 00000000 12000400 02092000 .............. . 1b6c: 6375726f 6d61696c 696e6700 00000000 curomailing..... 1b7c: 00000000 00000000 00000000 00000000 ................ 1b8c: fa010000 00000000 0f000000 6375726f ............curo 1b9c: 6d61696c 696e67 mailing Item 19 -- Length: 83 Offset: 6556 (0x199c) Flags: USED OID: 134741216 CID: min(0) max(0) XID: min(7683) max(0) Block Id: 0 linp Index: 19 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 199c: e0fc0708 00000000 00000000 031e0000 ................ 19ac: 00000000 00000000 13000400 02092000 .............. . 19bc: 74657374 696e6700 00000000 00000000 testing......... 19cc: 00000000 00000000 00000000 00000000 ................ 19dc: f6010000 00000000 0b000000 74657374 ............test 19ec: 696e67 ing Item 20 -- Length: 81 Offset: 6472 (0x1948) Flags: USED OID: 134741344 CID: min(0) max(0) XID: min(25205) max(0) Block Id: 0 linp Index: 20 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 1948: 60fd0708 00000000 00000000 75620000 `...........ub.. 1958: 00000000 00000000 14000400 02092000 .............. . 1968: 666f726d 73000000 00000000 00000000 forms........... 1978: 00000000 00000000 00000000 00000000 ................ 1988: f6010000 00000000 09000000 666f726d ............form 1998: 73 s Item 21 -- Length: 87 Offset: 6384 (0x18f0) Flags: USED OID: 134741696 CID: min(0) max(0) XID: min(25405) max(0) Block Id: 0 linp Index: 21 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 18f0: c0fe0708 00000000 00000000 3d630000 ............=c.. 1900: 00000000 00000000 15000400 02092000 .............. . 1910: 70617261 76696e61 6c696100 00000000 paravinalia..... 1920: 00000000 00000000 00000000 00000000 ................ 1930: f6010000 00000000 0f000000 70617261 ............para 1940: 76696e61 6c6961 vinalia Item 22 -- Length: 85 Offset: 6296 (0x1898) Flags: USED OID: 134742816 CID: min(0) max(0) XID: min(28233) max(0) Block Id: 0 linp Index: 22 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 1898: 20030808 00000000 00000000 496e0000 ...........In.. 18a8: 00000000 00000000 16000400 02092000 .............. . 18b8: 73626665 61747572 65000000 00000000 sbfeature....... 18c8: 00000000 00000000 00000000 00000000 ................ 18d8: f7010000 00000000 0d000000 73626665 ............sbfe 18e8: 61747572 65 ature Item 23 -- Length: 89 Offset: 6204 (0x183c) Flags: USED OID: 134743392 CID: min(0) max(0) XID: min(29471) max(0) Block Id: 0 linp Index: 23 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 183c: 60050808 00000000 00000000 1f730000 `............s.. 184c: 00000000 00000000 17000400 02092000 .............. . 185c: 7a617869 736e6574 666f7275 6d000000 zaxisnetforum... 186c: 00000000 00000000 00000000 00000000 ................ 187c: f9010000 00000000 11000000 7a617869 ............zaxi 188c: 736e6574 666f7275 6d snetforum Item 24 -- Length: 82 Offset: 6120 (0x17e8) Flags: USED OID: 134743424 CID: min(0) max(0) XID: min(29628) max(0) Block Id: 0 linp Index: 24 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 17e8: 80050808 00000000 00000000 bc730000 .............s.. 17f8: 00000000 00000000 18000400 02092000 .............. . 1808: 6d676c65 6e6e0000 00000000 00000000 mglenn.......... 1818: 00000000 00000000 00000000 00000000 ................ 1828: f4010000 00000000 0a000000 6d676c65 ............mgle 1838: 6e6e nn Item 25 -- Length: 82 Offset: 6036 (0x1794) Flags: USED OID: 134752544 CID: min(0) max(0) XID: min(101415) max(0) Block Id: 0 linp Index: 25 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 1794: 20290808 00000000 00000000 278c0100 )..........'... 17a4: 00000000 00000000 19000400 02092000 .............. . 17b4: 666f726d 616e0000 00000000 00000000 forman.......... 17c4: 00000000 00000000 00000000 00000000 ................ 17d4: f6010000 00000000 0a000000 666f726d ............form 17e4: 616e an Item 26 -- Length: 88 Offset: 5948 (0x173c) Flags: USED OID: 134753056 CID: min(0) max(0) XID: min(104992) max(0) Block Id: 0 linp Index: 26 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 173c: 202b0808 00000000 00000000 209a0100 +.......... ... 174c: 00000000 00000000 1a000400 02092000 .............. . 175c: 666f726d 616e6d67 6c656e6e 00000000 formanmglenn.... 176c: 00000000 00000000 00000000 00000000 ................ 177c: f4010000 00000000 10000000 666f726d ............form 178c: 616e6d67 6c656e6e anmglenn Item 27 -- Length: 84 Offset: 5864 (0x16e8) Flags: USED OID: 134753984 CID: min(0) max(0) XID: min(105229) max(0) Block Id: 0 linp Index: 27 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 16e8: c02e0808 00000000 00000000 0d9b0100 ................ 16f8: 00000000 00000000 1b000400 02092000 .............. . 1708: 6e656564 74657874 00000000 00000000 needtext........ 1718: 00000000 00000000 00000000 00000000 ................ 1728: f6010000 00000000 0c000000 6e656564 ............need 1738: 74657874 text Item 28 -- Length: 90 Offset: 5772 (0x168c) Flags: USED OID: 134754016 CID: min(0) max(0) XID: min(105231) max(0) Block Id: 0 linp Index: 28 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 168c: e02e0808 00000000 00000000 0f9b0100 ................ 169c: 00000000 00000000 1c000400 02092000 .............. . 16ac: 666f726d 616e6e65 65647465 78740000 formanneedtext.. 16bc: 00000000 00000000 00000000 00000000 ................ 16cc: f6010000 00000000 12000000 666f726d ............form 16dc: 616e6e65 65647465 7874 anneedtext Item 29 -- Length: 82 Offset: 5688 (0x1638) Flags: USED OID: 134756288 CID: min(0) max(0) XID: min(119599) max(0) Block Id: 0 linp Index: 29 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 1638: c0370808 00000000 00000000 2fd30100 .7........../... 1648: 00000000 00000000 1d000400 02092000 .............. . 1658: 67676c65 6e6e0000 00000000 00000000 gglenn.......... 1668: 00000000 00000000 00000000 00000000 ................ 1678: fc010000 00000000 0a000000 67676c65 ............ggle 1688: 6e6e nn Item 30 -- Length: 88 Offset: 5600 (0x15e0) Flags: USED OID: 134756320 CID: min(0) max(0) XID: min(119603) max(119609) Block Id: 0 linp Index: 30 Attributes: 4 Size: 32 infomask: 0x0502 (HASVARLENA|XMIN_COMMITTED|XMAX_COMMITTED) 15e0: e0370808 00000000 00000000 33d30100 .7..........3... 15f0: 39d30100 00000000 1e000400 02052000 9............. . 1600: 666f726d 616e6767 6c656e6e 00000000 formangglenn.... 1610: 00000000 00000000 00000000 00000000 ................ 1620: fc010000 00000000 10000000 666f726d ............form 1630: 616e6767 6c656e6e angglenn Item 31 -- Length: 86 Offset: 5512 (0x1588) Flags: USED OID: 134756352 CID: min(0) max(0) XID: min(119605) max(0) Block Id: 0 linp Index: 31 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 1588: 00380808 00000000 00000000 35d30100 .8..........5... 1598: 00000000 00000000 1f000400 02092000 .............. . 15a8: 676c656e 6e67726f 75700000 00000000 glenngroup...... 15b8: 00000000 00000000 00000000 00000000 ................ 15c8: fc010000 00000000 0e000000 676c656e ............glen 15d8: 6e67726f 7570 ngroup Item 32 -- Length: 92 Offset: 5420 (0x152c) Flags: USED OID: 134756384 CID: min(0) max(0) XID: min(119611) max(119636) Block Id: 0 linp Index: 32 Attributes: 4 Size: 32 infomask: 0x0502 (HASVARLENA|XMIN_COMMITTED|XMAX_COMMITTED) 152c: 20380808 00000000 00000000 3bd30100 8..........;... 153c: 54d30100 00000000 20000400 02052000 T....... ..... . 154c: 666f726d 616e676c 656e6e67 726f7570 formanglenngroup 155c: 00000000 00000000 00000000 00000000 ................ 156c: fc010000 00000000 14000000 666f726d ............form 157c: 616e676c 656e6e67 726f7570 anglenngroup Item 33 -- Length: 92 Offset: 5328 (0x14d0) Flags: USED OID: 134756800 CID: min(0) max(0) XID: min(119638) max(119704) Block Id: 0 linp Index: 33 Attributes: 4 Size: 32 infomask: 0x0502 (HASVARLENA|XMIN_COMMITTED|XMAX_COMMITTED) 14d0: c0390808 00000000 00000000 56d30100 .9..........V... 14e0: 98d30100 00000000 21000400 02052000 ........!..... . 14f0: 666f726d 616e676c 656e6e67 726f7570 formanglenngroup 1500: 00000000 00000000 00000000 00000000 ................ 1510: fc010000 00000000 14000000 666f726d ............form 1520: 616e676c 656e6e67 726f7570 anglenngroup Item 34 -- Length: 92 Offset: 5236 (0x1474) Flags: USED OID: 134757248 CID: min(0) max(0) XID: min(119706) max(0) Block Id: 0 linp Index: 34 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 1474: 803b0808 00000000 00000000 9ad30100 .;.............. 1484: 00000000 00000000 22000400 02092000 ........"..... . 1494: 666f726d 616e676c 656e6e67 726f7570 formanglenngroup 14a4: 00000000 00000000 00000000 00000000 ................ 14b4: fc010000 00000000 14000000 666f726d ............form 14c4: 616e676c 656e6e67 726f7570 anglenngroup Item 35 -- Length: 85 Offset: 5148 (0x141c) Flags: USED OID: 134768768 CID: min(0) max(0) XID: min(192999) max(0) Block Id: 0 linp Index: 35 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 141c: 80680808 00000000 00000000 e7f10200 .h.............. 142c: 00000000 00000000 23000400 02092000 ........#..... . 143c: 67666361 74616c6f 67000000 00000000 gfcatalog....... 144c: 00000000 00000000 00000000 00000000 ................ 145c: fd010000 00000000 0d000000 67666361 ............gfca 146c: 74616c6f 67 talog Item 36 -- Length: 84 Offset: 5064 (0x13c8) Flags: USED OID: 134768896 CID: min(0) max(0) XID: min(208243) max(0) Block Id: 0 linp Index: 36 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 13c8: 00690808 00000000 00000000 732d0300 .i..........s-.. 13d8: 00000000 00000000 24000400 02092000 ........$..... . 13e8: 666f726d 616e6766 00000000 00000000 formangf........ 13f8: 00000000 00000000 00000000 00000000 ................ 1408: fd010000 00000000 0c000000 666f726d ............form 1418: 616e6766 angf Item 37 -- Length: 84 Offset: 4980 (0x1374) Flags: USED OID: 134771424 CID: min(0) max(0) XID: min(265193) max(0) Block Id: 0 linp Index: 37 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 1374: e0720808 00000000 00000000 e90b0400 .r.............. 1384: 00000000 00000000 25000400 02092000 ........%..... . 1394: 63746d62 6f617264 00000000 00000000 ctmboard........ 13a4: 00000000 00000000 00000000 00000000 ................ 13b4: fe010000 00000000 0c000000 63746d62 ............ctmb 13c4: 6f617264 oard Item 38 -- Length: 84 Offset: 4896 (0x1320) Flags: USED OID: 134771488 CID: min(0) max(0) XID: min(266012) max(0) Block Id: 0 linp Index: 38 Attributes: 4 Size: 32 infomask: 0x0902 (HASVARLENA|XMIN_COMMITTED|XMAX_INVALID) 1320: 20730808 00000000 00000000 1c0f0400 s.............. 1330: 00000000 00000000 26000400 02092000 ........&..... . 1340: 666f726d 616e6374 00000000 00000000 formanct........ 1350: 00000000 00000000 00000000 00000000 ................ 1360: fe010000 00000000 0c000000 666f726d ............form 1370: 616e6374 anct *** End of File Encountered. Last Block Read: 0 ***
Michael Glenn <mike@mglenn.com> writes: > [ pg_filedump output ] Looking at this, I'm kind of wondering whether you didn't have a transaction ID wrap after all. You've got a number of rows here that appear to have been touched by quite large transaction numbers, for instance: > Item 8 -- Length: 80 Offset: 7508 (0x1d54) Flags: USED > OID: 109529120 CID: min(0) max(0) XID: min(24597178) max(0) ^^^^^^^^ > Item 9 -- Length: 89 Offset: 6896 (0x1af0) Flags: USED > OID: 133213920 CID: min(0) max(0) XID: min(34149469) max(0) ^^^^^^^^ and they're marked committed too, which means that some other transaction agreed that that XID had gotten committed. You sure that there's not anything you've forgotten to tell us about past sins with pg_log? There's no way that XID 34149469 could have been marked committed unless pg_log were at least 8.5 megabytes. What I think you might be able to do as a band-aid solution is to force up the current-XID counter, which lives in, hmm, $PGDATA/pg_variable in 7.0.*. Without the former contents of pg_log this will not give you a completely accurate reconstruction of your data, but it should be good at least back to the last vacuum, which is a lot better than nothing (assuming you were more religious about vacuuming than backups ;-)). What do you get from "od -x pg_variable"? regards, tom lane
I haven't had any issues with pg_log that I know of. Until this incident I didn't even know what it did. I did lose a few databases a little over a year ago but didn't persue it a agressively as this situation because it wasn't as dire. The scarry thing is I almost never use vacuum becuase I just plain forgot a long time ago about it. I didn't realise that it could lead to such corruption and was under the impression that it was more for performance than anything else. I have an old database that was very high in transactions but has been dormant for over a year now. I thought that 98K seemed way too small for a transaction log file. Perhaps it was damaged. Well, it will probably be a few months worth of restoration if there isn't any other solution, but I guess it serves me right for not reading the docs more closely. What is the procedure for bumping up the current-XID counter in pg_variable? Is it theoretically possible to restore a database from all of it's related files. Thanks Also, are the source code modifications for pg_filedump useful to anyone? Tom Lane wrote: >Michael Glenn <mike@mglenn.com> writes: > > >>[ pg_filedump output ] >> >> > >Looking at this, I'm kind of wondering whether you didn't have a >transaction ID wrap after all. You've got a number of rows here that >appear to have been touched by quite large transaction numbers, >for instance: > > > >> Item 8 -- Length: 80 Offset: 7508 (0x1d54) Flags: USED >> OID: 109529120 CID: min(0) max(0) XID: min(24597178) max(0) >> >> > ^^^^^^^^ > > > >> Item 9 -- Length: 89 Offset: 6896 (0x1af0) Flags: USED >> OID: 133213920 CID: min(0) max(0) XID: min(34149469) max(0) >> >> > ^^^^^^^^ > >and they're marked committed too, which means that some other >transaction agreed that that XID had gotten committed. You sure >that there's not anything you've forgotten to tell us about past >sins with pg_log? There's no way that XID 34149469 could have >been marked committed unless pg_log were at least 8.5 megabytes. > >What I think you might be able to do as a band-aid solution is to force >up the current-XID counter, which lives in, hmm, $PGDATA/pg_variable in >7.0.*. Without the former contents of pg_log this will not give you a >completely accurate reconstruction of your data, but it should be good >at least back to the last vacuum, which is a lot better than nothing >(assuming you were more religious about vacuuming than backups ;-)). > >What do you get from "od -x pg_variable"? > > regards, tom lane > >---------------------------(end of broadcast)--------------------------- >TIP 5: Have you checked our extensive FAQ? > >http://www.postgresql.org/users-lounge/docs/faq.html > > > > -- Michael Glenn http://www.mglenn.com 416.544.9904 -----BEGIN PGP PUBLIC KEY BLOCK----- Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com> mQGiBDi1W3gRBADgkh1Qvms9Qz1zpStGDdSs36K0KGX8mhuXMn21C6cE9DQ4V6d7 S8yQo+fFwos0lV+iIy0vWomq2LI1tiniV46v8cn7OyM0QI2c4IVgNn7h5hwq8Yue RmdSk9Nc1B8FJjWXZKkAxrZ9UtBRpl1USUnh8NnN0uQ+4pB9QoRK77OFnQCg/8hh KqMCe7y3FF5jHtSK/pHT308D/ifQNxg97Sp1BQxrOGA07Jj4MbWwZDUZH3h0loSJ TmqEZU8dykPFu3+MCgiUP6en2b5Qk0r/ayHiS7cOwCMUnsmI2Ys4TC36w2CXIhUh yt8xWqR8uGJDw3OsRr4bOgOm2rhcBtsCx4CSCZ80ysWcDT2KERg4l9kgP1poI27x l38MA/9cJiLDhT84+ktmTpwkzDIbBWqBEa9avd28fMLjziJMw6Ak2a5B3lONDBWD ymd0UHjuuHm3aXDA2xAiZtQRvYpEFKsIOoL6+eMjkDC2VfEjoYOACqSlPxO5lxb4 oINcoxBWHjPMWIjS29LydC+OyVZW0RfCqLyANEZFqZT0lkJPI7QfTWljaGFlbCBH bGVubiA8bWlrZUBtZ2xlbm4uY29tPokATgQQEQIADgUCOLVbeAQLAwIBAhkBAAoJ EG/6eNodQfh3VAQAoOiLvTGsq59pmWUh9XdjjU4SS3aUAJ4ywgkjUkmUJ5ImThp2 3k1rEax3i7kCDQQ4tVt4EAgA9kJXtwh/CBdyorrWqULzBej5UxE5T7bxbrlLOCDa AadWoxTpj0BV89AHxstDqZSt90xkhkn4DIO9ZekX1KHTUPj1WV/cdlJPPT2N286Z 4VeSWc39uK50T8X8dryDxUcwYc58yWb/Ffm7/ZFexwGq01uejaClcjrUGvC/RgBY K+X0iP1YTknbzSC0neSRBzZrM2w4DUUdD3yIsxx8Wy2O9vPJI8BD8KVbGI2Ou1WM uF040zT9fBdXQ6MdGGzeMyEstSr/POGxKUAYEY18hKcKctaGxAMZyAcpesqVDNmW n6vQClCbAkbTCD1mpF1Bn5x8vYlLIhkmuquiXsNV6TILOwACAgf9H57D7zhr/7t6 IxbxBMCFy4EHkD5awkfpxSjv0kLV4AQsXfdk1LsEJLFp8WLquo2ftPpSsMR2vYMa qtyK6FB9I+wq8h76m2RsHoAYVeXYpxckbXtNstz/9qENctdYn2f190v46FCxun3c IghoP4rBnJQNOQIcSQWSEWyOfFjCSlEv/7RSS3cL19r7OE0m7yJprBvAmav+TuHM UmG4Etdi89VEiMYXeFV08CmT12xt+Lel7/YpDlcFBQEjy810nb19w2HCOxh/JMEO C5gXXKMMgtWUTfY/gw9oZOXSy5EffcLjk4jJ2J3FJSwqhOQgBKi0l8I4r1QMmOdE 9WPpnDrHrYkARgQYEQIABgUCOLVbeAAKCRBv+njaHUH4d547AJ9ze+4zXlsv/NdX GhsLTWp+BOQEvACgqEN5l2RiBVEYJDx1ktz9cSuvcrI= =KXHB -----END PGP PUBLIC KEY BLOCK-----
Michael Glenn <mike@mglenn.com> writes: > Well, it will probably be a few months worth of restoration if there > isn't any other solution, but I guess it serves me right for not reading > the docs more closely. What is the procedure for bumping up the > current-XID counter in pg_variable? Is it theoretically possible to > restore a database from all of it's related files. If you haven't vacuumed in a long time then it could be pretty messy; you will have a problem with not being able to tell aborted transactions from committed ones. If you didn't abort transactions very often then maybe the headaches won't be too bad, but otherwise ... What I would do at this point is: 1. Make a tarball copy of your entire $PGDATA tree, if at all possible. This will let you start over when you want to. 2. Use a binary-file editor to insert some very large value (4 billion minus a few hundred, perhaps) into nextXid, which is the second 4 bytes of the pg_variable file. (You might want to take note of what's there now, too.) 3. Replace pg_log with a file containing 1Gb worth of 0xAA bytes. This will make it look like all your transactions committed. 4. Start postmaster --- it should start happily at this point. 5. Without doing anything else, pg_dumpall. You have a few hundred transactions before everything goes to hell again, so don't waste 'em. (You don't want to give yourself too much headroom here, because you are certainly losing the effects of every transaction after the nextXid you chose.) 6. initdb a fresh installation (might as well move up to 7.2.1 here...), try to restore pg_dumpall script into it, settle down to a lot of cross-checking to try to validate data. The reason you will have consistency problems is that some aborted transactions will be taken as committed --- maybe in only some of their effects, not all. As a rule of thumb, any tuple that was read by another transaction before the wrap happened will be marked with the correct commit state. Anything that hadn't been examined will be taken to be committed, which might be wrong. So the newer and more seldom-examined the update, the riskier it will be. It's very likely the pgdump script will not even restore (due to unique-key violations) until it's hand-edited, so you might want to dump schema and data separately to ease editing. It might be useful to try this procedure with a few different nextXid selections --- that will give you snapshots further and further back in the past, with hopefully correspondingly fewer inconsistencies. In any case you're in for a lot of no-fun. Sorry the news is not better. regards, tom lane
It worked! This is a few days after success but I wanted to test out the databases before I declared victory. Many thanks Tom. This incident has spurred me to vacuum more often, backup every day, and RTFM. See "The Postgres Incident" http://www.mglenn.com/archives/2002/05/01/ for a synopsis. Thanks again, I'm in your debt. Tom Lane wrote: >Michael Glenn <mike@mglenn.com> writes: > > >>Well, it will probably be a few months worth of restoration if there >>isn't any other solution, but I guess it serves me right for not reading >>the docs more closely. What is the procedure for bumping up the >>current-XID counter in pg_variable? Is it theoretically possible to >>restore a database from all of it's related files. >> >> > >If you haven't vacuumed in a long time then it could be pretty messy; >you will have a problem with not being able to tell aborted transactions >from committed ones. If you didn't abort transactions very often then >maybe the headaches won't be too bad, but otherwise ... > >What I would do at this point is: > >1. Make a tarball copy of your entire $PGDATA tree, if at all possible. >This will let you start over when you want to. > >2. Use a binary-file editor to insert some very large value (4 billion >minus a few hundred, perhaps) into nextXid, which is the second 4 bytes >of the pg_variable file. (You might want to take note of what's there >now, too.) > >3. Replace pg_log with a file containing 1Gb worth of 0xAA bytes. This >will make it look like all your transactions committed. > >4. Start postmaster --- it should start happily at this point. > >5. Without doing anything else, pg_dumpall. You have a few hundred >transactions before everything goes to hell again, so don't waste 'em. >(You don't want to give yourself too much headroom here, because you >are certainly losing the effects of every transaction after the nextXid >you chose.) > >6. initdb a fresh installation (might as well move up to 7.2.1 here...), >try to restore pg_dumpall script into it, settle down to a lot of >cross-checking to try to validate data. > >The reason you will have consistency problems is that some aborted >transactions will be taken as committed --- maybe in only some of their >effects, not all. As a rule of thumb, any tuple that was read by >another transaction before the wrap happened will be marked with >the correct commit state. Anything that hadn't been examined will >be taken to be committed, which might be wrong. So the newer and >more seldom-examined the update, the riskier it will be. It's very >likely the pgdump script will not even restore (due to unique-key >violations) until it's hand-edited, so you might want to dump schema >and data separately to ease editing. > >It might be useful to try this procedure with a few different nextXid >selections --- that will give you snapshots further and further back >in the past, with hopefully correspondingly fewer inconsistencies. >In any case you're in for a lot of no-fun. Sorry the news is not >better. > > regards, tom lane > >---------------------------(end of broadcast)--------------------------- >TIP 5: Have you checked our extensive FAQ? > >http://www.postgresql.org/users-lounge/docs/faq.html > > > > -- Michael Glenn http://www.mglenn.com 416.544.9904 -----BEGIN PGP PUBLIC KEY BLOCK----- Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com> mQGiBDi1W3gRBADgkh1Qvms9Qz1zpStGDdSs36K0KGX8mhuXMn21C6cE9DQ4V6d7 S8yQo+fFwos0lV+iIy0vWomq2LI1tiniV46v8cn7OyM0QI2c4IVgNn7h5hwq8Yue RmdSk9Nc1B8FJjWXZKkAxrZ9UtBRpl1USUnh8NnN0uQ+4pB9QoRK77OFnQCg/8hh KqMCe7y3FF5jHtSK/pHT308D/ifQNxg97Sp1BQxrOGA07Jj4MbWwZDUZH3h0loSJ TmqEZU8dykPFu3+MCgiUP6en2b5Qk0r/ayHiS7cOwCMUnsmI2Ys4TC36w2CXIhUh yt8xWqR8uGJDw3OsRr4bOgOm2rhcBtsCx4CSCZ80ysWcDT2KERg4l9kgP1poI27x l38MA/9cJiLDhT84+ktmTpwkzDIbBWqBEa9avd28fMLjziJMw6Ak2a5B3lONDBWD ymd0UHjuuHm3aXDA2xAiZtQRvYpEFKsIOoL6+eMjkDC2VfEjoYOACqSlPxO5lxb4 oINcoxBWHjPMWIjS29LydC+OyVZW0RfCqLyANEZFqZT0lkJPI7QfTWljaGFlbCBH bGVubiA8bWlrZUBtZ2xlbm4uY29tPokATgQQEQIADgUCOLVbeAQLAwIBAhkBAAoJ EG/6eNodQfh3VAQAoOiLvTGsq59pmWUh9XdjjU4SS3aUAJ4ywgkjUkmUJ5ImThp2 3k1rEax3i7kCDQQ4tVt4EAgA9kJXtwh/CBdyorrWqULzBej5UxE5T7bxbrlLOCDa AadWoxTpj0BV89AHxstDqZSt90xkhkn4DIO9ZekX1KHTUPj1WV/cdlJPPT2N286Z 4VeSWc39uK50T8X8dryDxUcwYc58yWb/Ffm7/ZFexwGq01uejaClcjrUGvC/RgBY K+X0iP1YTknbzSC0neSRBzZrM2w4DUUdD3yIsxx8Wy2O9vPJI8BD8KVbGI2Ou1WM uF040zT9fBdXQ6MdGGzeMyEstSr/POGxKUAYEY18hKcKctaGxAMZyAcpesqVDNmW n6vQClCbAkbTCD1mpF1Bn5x8vYlLIhkmuquiXsNV6TILOwACAgf9H57D7zhr/7t6 IxbxBMCFy4EHkD5awkfpxSjv0kLV4AQsXfdk1LsEJLFp8WLquo2ftPpSsMR2vYMa qtyK6FB9I+wq8h76m2RsHoAYVeXYpxckbXtNstz/9qENctdYn2f190v46FCxun3c IghoP4rBnJQNOQIcSQWSEWyOfFjCSlEv/7RSS3cL19r7OE0m7yJprBvAmav+TuHM UmG4Etdi89VEiMYXeFV08CmT12xt+Lel7/YpDlcFBQEjy810nb19w2HCOxh/JMEO C5gXXKMMgtWUTfY/gw9oZOXSy5EffcLjk4jJ2J3FJSwqhOQgBKi0l8I4r1QMmOdE 9WPpnDrHrYkARgQYEQIABgUCOLVbeAAKCRBv+njaHUH4d547AJ9ze+4zXlsv/NdX GhsLTWp+BOQEvACgqEN5l2RiBVEYJDx1ktz9cSuvcrI= =KXHB -----END PGP PUBLIC KEY BLOCK-----