8000 postgres_cluster/reinit.sh at xid_cache · postgrespro/postgres_cluster · GitHub
[go: up one dir, main page]

Skip to content
{"payload":{"allShortcutsEnabled":false,"fileTree":{"":{"items":[{"name":"config","path":"config","contentType":"directory"},{"name":"contrib","path":"contrib","contentType":"directory"},{"name":"doc","path":"doc","contentType":"directory"},{"name":"src","path":"src","contentType":"directory"},{"name":".dir-locals.el","path":".dir-locals.el","contentType":"file"},{"name":".gitattributes","path":".gitattributes","contentType":"file"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":"COPYRIGHT","path":"COPYRIGHT","contentType":"file"},{"name":"GNUmakefile.in","path":"GNUmakefile.in","contentType":"file"},{"name":"HISTORY","path":"HISTORY","contentType":"file"},{"name":"Makefile","path":"Makefile","contentType":"file"},{"name":"README","path":"README","contentType":"file"},{"name":"README.git","path":"README.git","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"aclocal.m4","path":"aclocal.m4","contentType":"file"},{"name":"configure","path":"configure","contentType":"file"},{"name":"configure.in","path":"configure.in","contentType":"file"},{"name":"install.sh","path":"install.sh","contentType":"file"},{"name":"install_pg_shard.sh","path":"install_pg_shard.sh","contentType":"file"},{"name":"install_pg_shard_xtm.sh","path":"install_pg_shard_xtm.sh","contentType":"file"},{"name":"regress.sql","path":"regress.sql","contentType":"file"},{"name":"reinit.sh","path":"reinit.sh","contentType":"file"}],"totalCount":22}},"fileTreeProcessingTime":7.409147,"foldersToFetch":[],"incompleteFileTree":false,"repo":{"id":47972005,"defaultBranch":"master","name":"postgres_cluster","ownerLogin":"postgrespro","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2015-12-14T11:48:31.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/12005770?v=4","public":true,"private":false,"isOrgOwned":true},"codeLineWrapEnabled":false,"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"xid_cache","listCacheKey":"v0:1616708665.064594","canEdit":false,"refType":"branch","currentOid":"b36e30c8e59cf971ac88eb9983c757e2e3622aee"},"path":"reinit.sh","currentUser":null,"blob":{"rawLines":["#!/bin/sh","","reinit_master() {","\trm -rf install/data","","\t./install/bin/initdb -A trust -D ./install/data","","\techo \"max_prepared_transactions = 100\" \u003e\u003e ./install/data/postgresql.conf","\techo \"shared_buffers = 512MB\" \u003e\u003e ./install/data/postgresql.conf","\techo \"fsync = off\" \u003e\u003e ./install/data/postgresql.conf","\techo \"log_checkpoints = on\" \u003e\u003e ./install/data/postgresql.conf","\techo \"max_wal_size = 48MB\" \u003e\u003e ./install/data/postgresql.conf","\techo \"min_wal_size = 32MB\" \u003e\u003e ./install/data/postgresql.conf","\techo \"wal_level = logical\" \u003e\u003e ./install/data/postgresql.conf","\techo \"wal_keep_segments = 64\" \u003e\u003e ./install/data/postgresql.conf","\techo \"max_wal_senders = 10\" \u003e\u003e ./install/data/postgresql.conf","\techo \"max_replication_slots = 10\" \u003e\u003e ./install/data/postgresql.conf","","\techo \"max_worker_processes = 10\" \u003e\u003e ./install/data/postgresql.conf","\techo \"shared_preload_libraries = 'pglogical'\" \u003e\u003e ./install/data/postgresql.conf","\techo \"track_commit_timestamp = on\" \u003e\u003e ./install/data/postgresql.conf","\t# echo \"client_min_messages = debug3\" \u003e\u003e ./install/data/postgresql.conf","\t# echo \"log_min_messages = debug3\" \u003e\u003e ./install/data/postgresql.conf","","\techo '' \u003e ./install/data/logfile","","\techo 'local replication stas trust' \u003e\u003e ./install/data/pg_hba.conf","","\t./install/bin/pg_ctl -sw -D ./install/data -l ./install/data/logfile start","\t./install/bin/createdb stas","\t./install/bin/psql -c \"create table t(id int primary key, v int);\"","}","","reinit_master2() {","\trm -rf install/data2","","\t./install/bin/initdb -A trust -D ./install/data2","","\techo \"port = 5433\" \u003e\u003e ./install/data2/postgresql.conf","","\techo \"max_prepared_transactions = 100\" \u003e\u003e ./install/data2/postgresql.conf","\techo \"shared_buffers = 512MB\" \u003e\u003e ./install/data2/postgresql.conf","\techo \"fsync = off\" \u003e\u003e ./install/data2/postgresql.conf","\techo \"log_checkpoints = on\" \u003e\u003e ./install/data2/postgresql.conf","\techo \"max_wal_size = 48MB\" \u003e\u003e ./install/data2/postgresql.conf","\techo \"min_wal_size = 32MB\" \u003e\u003e ./install/data2/postgresql.conf","\techo \"wal_level = logical\" \u003e\u003e ./install/data2/postgresql.conf","\techo \"wal_keep_segments = 64\" \u003e\u003e ./install/data2/postgresql.conf","\techo \"max_wal_senders = 10\" \u003e\u003e ./install/data2/postgresql.conf","\techo \"max_replication_slots = 10\" \u003e\u003e ./install/data2/postgresql.conf","","\techo \"max_worker_processes = 10\" \u003e\u003e ./install/data2/postgresql.conf","\techo \"shared_preload_libraries = 'pglogical'\" \u003e\u003e ./install/data2/postgresql.conf","\techo \"track_commit_timestamp = on\" \u003e\u003e ./install/data2/postgresql.conf","","\t# echo \"client_min_messages = debug3\" \u003e\u003e ./install/data2/postgresql.conf","\t# echo \"log_min_messages = debug3\" \u003e\u003e ./install/data2/postgresql.conf","","\techo '' \u003e ./install/data2/logfile","","\techo 'local replication stas trust' \u003e\u003e ./install/data2/pg_hba.conf","","\t./install/bin/pg_ctl -sw -D ./install/data2 -l ./install/data2/logfile start","\t./install/bin/createdb stas -p5433","}","","make install \u003e /dev/null","","cd contrib/pglogical","make clean \u0026\u0026 make install","cd ../..","cd contrib/pglogical_output","make clean \u0026\u0026 make install","cd ../..","","pkill -9 postgres","reinit_master","reinit_master2","","./install/bin/psql \u003c\u003cSQL","\tCREATE EXTENSION pglogical;","\tSELECT pglogical.create_node(","\t\tnode_name := 'provider1',","\t\tdsn := 'port=5432 dbname=stas'","\t);","\tSELECT pglogical.replication_set_add_all_tables('default', ARRAY['public']);","SQL","","./install/bin/psql -p 5433 \u003c\u003cSQL","\tCREATE EXTENSION pglogical;","\tSELECT pglogical.create_node(","\t\tnode_name := 'subscriber1',","\t\tdsn := 'port=5433 dbname=stas'","\t);","\tSELECT pglogical.create_subscription(","\t\tsubscription_name := 'subscription1',","\t\tprovider_dsn := 'port=5432 dbname=stas'","\t);","SQL","","./install/bin/psql \u003c\u003cSQL","select pg_sleep(2);","begin;","insert into t values (42);","prepare transaction 'hellyeah';","select * from pg_current_xlog_location();","select pg_stat_get_wal_senders();","select * from pg_current_xlog_location();","--select pg_sleep(3);","SQL","","./install/bin/psql -p 5433 \u003c\u003cSQL","select * from pg_prepared_xacts;","--select * from t;","SQL","","./install/bin/psql \u003c\u003cSQL","commit prepared 'hellyeah';","select pg_sleep(1);","SQL","","./install/bin/psql -p 5433 \u003c\u003cSQL","select * from pg_prepared_xacts;","select * from t;","SQL","","# ./install/bin/psql -c \"SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'pglogical_output');\"","","# ./install/bin/psql \u003c\u003cSQL","# \t--begin;","# \tinsert into t values (42);","# \t--prepare transaction 'hellyeah';","# \t--commit prepared 'hellyeah';","# SQL","","# ./install/bin/psql \u003c\u003cSQL","# SELECT * FROM pg_logical_slot_peek_changes('regression_slot',","# NULL, NULL,","# 'expected_encoding', 'UTF8',","# 'min_proto_version', '1',","# 'max_proto_version', '1',","# 'startup_params_format', '1',","# 'proto_format', 'json',","# 'no_txinfo', 't');","# SQL"],"stylingDirectives":null,"colorizedLines":null,"csv":null,"csvError":null,"dependabotInfo":{"showConfigurationBanner":false,"configFilePath":null,"networkDependabotPath":"/postgrespro/postgres_cluster/network/updates","dismissConfigurationNoticePath":"/settings/dismiss-notice/dependabot_configuration_notice","configurationNoticeDismissed":null},"displayName":"reinit.sh","displayUrl":"https://github.com/postgrespro/postgres_cluster/blob/xid_cache/reinit.sh?raw=true","headerInfo":{"blobSize":"4.45 KB","deleteTooltip":"You must be signed in to make or propose changes","editTooltip":"You must be signed in to make or propose changes","ghDesktopPath":"https://desktop.github.com","isGitLfs":false,"onBranch":true,"shortPath":"7a016cf","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fpostgrespro%2Fpostgres_cluster%2Fblob%2Fxid_cache%2Freinit.sh","isCSV":false,"isRichtext":false,"toc":null,"lineInfo":{"truncatedLoc":"152","truncatedSloc":"117"},"mode":"executable file"},"image":false,"isCodeownersFile":null,"isPlain":false,"isValidLegacyIssueTemplate":false,"issueTemplate":null,"discussionTemplate":null,"language":"Shell","languageID":346,"large":false,"planSupportInfo":{"repoIsFork":null,"repoOwnedByCurrentUser":null,"requestFullPath":"/postgrespro/postgres_cluster/blob/xid_cache/reinit.sh","showFreeOrgGatedFeatureMessage":null,"showPlanSupportBanner":null,"upgradeDataAttributes":null,"upgradePath":null},"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_dockerfile","releasePath":"/postgrespro/postgres_cluster/releases/new?marketplace=true","showPublishActionBanner":false},"rawBlobUrl":"https://github.com/postgrespro/postgres_cluster/raw/refs/heads/xid_cache/reinit.sh","renderImageOrRaw":false,"richText":null,"renderedFileInfo":null,"shortPath":null,"symbolsEnabled":true,"tabSize":8,"topBannersInfo":{"overridingGlobalFundingFile":false,"globalPreferredFundingPath":null,"showInvalidCitationWarning":false,"citationHelpUrl":"https://docs.github.com/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files","actionsOnboardingTip":null},"truncated":false,"viewable":true,"workflowRedirectUrl":null,"symbols":{"timed_out":false,"not_analyzed":false,"symbols":[{"name":"reinit_master","kind":"function","ident_start":11,"ident_end":24,"extent_start":11,"extent_end":1381,"fully_qualified_name":"reinit_master","ident_utf16":{"start":{"line_number":2,"utf16_col":0},"end":{"line_number":2,"utf16_col":13}},"extent_utf16":{"start":{"line_number":2,"utf16_col":0},"end":{"line_number":31,"utf16_col":1}}},{"name":"reinit_master2","kind":"function","ident_start":1383,"ident_end":1397,"extent_start":1383,"extent_end":2771,"fully_qualified_name":"reinit_master2","ident_utf16":{"start":{"line_number":33,"utf16_col":0},"end":{"line_number":33,"utf16_col":14}},"extent_utf16":{"start":{"line_number":33,"utf16_col":0},"end":{"line_number":64,"utf16_col":1}}}]}},"copilotInfo":null,"copilotAccessAllowed":false,"modelsAccessAllowed":false,"modelsRepoIntegrationEnabled":false,"csrf_tokens":{"/postgrespro/postgres_cluster/branches":{"post":"4yTfngszgMUmchWG5TCIN3XsLC2aRl-LLr9tHaK9WaOW-FjMrnEPGbssEqGMvCXfkHy1nEIJ7lUDcY7enZyN8Q"},"/repos/preferences":{"post":"5nGSS179yBImJixg0s00vjf3rrDSvVK86zPoCssmtDFeO2u-cImIF9bGy2BOGn_uxwnqeYx80B8DVlQBtWdFpw"}}},"title":"postgres_cluster/reinit.sh at xid_cache · postgrespro/postgres_cluster","appPayload":{"helpUrl":"https://docs.github.com","findFileWorkerPath":"/assets-cdn/worker/find-file-worker-263cab1760dd.js","findInFileWorkerPath":"/assets-cdn/worker/find-in-file-worker-1b17b3e7786a.js","githubDevUrl":null,"enabled_features":{"code_nav_ui_events":false,"react_blob_overlay":false,"accessible_code_button":true}}}
0