Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am parallelo3301 on github.
  • I am parallelo3301 (https://keybase.io/parallelo3301) on keybase.
  • I have a public key ASAbQwOwJ2Hs49l1S1yf67jlE4CYTnxt3ZeJCAbGpcpp-Qo

To claim this, I am signing this object:

@parallelo3301
parallelo3301 / reindex_by_bloat_percent.sql
Last active December 11, 2020 14:14
reindex by bloat percent concurrently for postgres < 12
create extension dblink;
drop function if exists reindex_by_bloat_percent;
create or replace function reindex_by_bloat_percent (connection_string text, schema_to_process text = 'public', threshold integer = 40, min_index_bytes integer = 20971520) returns text
language PLPGSQL as $$
declare
processed text[];
index_info record;
index_indexes record;
constraint_type text;
@parallelo3301
parallelo3301 / utils.sql
Last active May 6, 2024 02:56
PostgreSQL utils
-- v5
----------------------------------------------------------- basic instance info
-- show db version
SELECT version();
-- uptime
SELECT pg_postmaster_start_time();
-- show connections
@parallelo3301
parallelo3301 / EntityComponent.vue
Created August 14, 2017 19:02
Vue Dynamic web - defined by YAML definition loaded from server
<template>
<div>
<component v-if="source"
:is="source.type || 'div'"
:items="source.data"
:config="source.config"
:query="source.query"
:dataField="source.dataField"
:pageEntityObject="pageEntityObject"
:parentBlockTitle="source.parentBlockTitle"