Re: Database 'xxxx', OID yyyyy, has disappeared from pg_database - Mailing list pgsql-admin

From Michael Glenn
Subject Re: Database 'xxxx', OID yyyyy, has disappeared from pg_database
Date
Msg-id 3CC858AA.8000901@mglenn.com
Whole thread Raw
In response to Re: Database 'xxxx', OID yyyyy, has disappeared from pg_database  (Michael Glenn <mike@mglenn.com>)
Responses Re: Database 'xxxx', OID yyyyy, has disappeared from pg_database
List pgsql-admin
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
>
>
>
>




pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_restore and permissions
Next
From: Tom Lane
Date:
Subject: Re: Database 'xxxx', OID yyyyy, has disappeared from pg_database