Re: Problem with backing up a large database
От | Mael Rimbault |
---|---|
Тема | Re: Problem with backing up a large database |
Дата | |
Msg-id | CAEKp92zuW_J3=XHWV3V3hoGm-HVGeav==ZPULbo5r8tFsWh5YA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Problem with backing up a large database (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Problem with backing up a large database
|
Список | pgsql-novice |
Hi all, 2013/8/20 Tom Lane <tgl@sss.pgh.pa.us>: > > I think it would be '[^z]*'. The basic notation is not regex, it's > like Unix shells' filename wildcards; so you *do* need a star. > But we do recognize regex-style character classes, else this > requirement couldn't be met at all. > Agreed that the notation is not regex, and that the star is required, but '[^z]*' does not seem to address Athanasios need to me : $ pg_dump -s -T '[^z]*' pgbench | grep "^CREATE TABLE" | cut -d" " -f3 ztest --> revert the "table name begins with a z" condition, and thus excludes everything except for the "ztest" table. --> same behaviour that : pg_dump -t 'z*' $ pg_dump -s -T '^z*' pgbench | grep "^CREATE TABLE" | cut -d" " -f3 pgbench_accounts pgbench_branches pgbench_history pgbench_tellers --> excludes tables using "table name begins with a z" condition, and thus do what Athanasios was expecting. --> for that matter, the "^" does not seem to be necessary, pg_dump -T 'z*' has the same behaviour But I may have missed your point. 2013/8/20 Athanasios Kostopoulos <athanasios.kostopoulos@classmarkets.com>: > > pg_dump -h XXX.XXX.XXX.XXX -p XXX -U postgres -T feedimport_log -T > error_item -T '^z*' -Fc some_large_db > > However, my backups are quite large (thus it takes too much time to process > them) and when I am doing a listing for tables that should not be there, I > get the following (among others): > > 307; 1259 5501792 TABLE feedimport feedimport_log postgres > > as well as the whole bunch of tables starting with z that I am trying to > exclude using the regex. > Any pointers about what I might be doing wrong and how I can improve the > backup process? Strange, from what I can see, this command line should work as you expect. That may be due to the schema feedimport not beeing in your search_path. -- Mael
В списке pgsql-novice по дате отправления: