wrote:
> Amin writes:
> > To simplify: Can CustomScan scan multiple relations in the same query or
> it
> > will always be assigned to one or zero relations?
>
> There's barely any code in the core planner that is specific to custom
> scans. Almost certainly this
To simplify: Can CustomScan scan multiple relations in the same query or it
will always be assigned to one or zero relations?
On Fri, Apr 14, 2023 at 4:33 PM Amin wrote:
> Hi there,
>
> In my implementation of CustomScan, when I have a query that scans
> multiple tables (select c f
Hi there,
In my implementation of CustomScan, when I have a query that scans multiple
tables (select c from t1,t2,t3), the planner always picks one table to be
scanned by CustomScan and offloads the rest to SeqScan. I tried assigning a
cost of 0 to the CustomScan path, but still not working. Begin
Hi,
- How can I determine which format will be used for a numeric type?
- What the precision and scale values should be for pgsql to use the long
format? Is there a threshold?
Hi,
I am looking for a way to define a global variable in CustomScan plugin
that is shared between different psql backends. Is it possible without
using shared memory? Does postgresql implement any function that
facilitates this?
Thank you,
Amin
ffers. However, I want to scan a specific table cache pages.
On Mon, Jan 30, 2023 at 6:43 PM Justin Pryzby wrote:
> On Mon, Jan 30, 2023 at 06:01:08PM -0800, Amin wrote:
> > Hi,
> >
> > I am looking for function calls to scan the buffer cache for a table and
> > find the
Hi,
I am looking for function calls to scan the buffer cache for a table and
find the cached pages. I want to find out which pages are cached and which
of them are dirty. Having the relation id, how can I do that? I have gone
through bufmgr.c and relcache.c, but could not find a way to get
relatio
2023 at 6:27 PM Andres Freund wrote:
> Hi,
>
> On 2023-01-13 17:28:31 -0800, Amin wrote:
> > Before scanning a relation, in the planner stage, I want to make a call
> to
> > retrieve information about how many pages will be a hit for a specific
> > relation. The m
Hi,
Having a query string, I am trying to use the postgres parser to find which
relations the query accesses. This is what I currently have:
const char *query_string="select * from dummytable;";
List *parsetree_list=pg_parse_query(query_string);
ListCell *parsetree_item;
foreach(parsetree_item,p
Hi,
Before scanning a relation, in the planner stage, I want to make a call to
retrieve information about how many pages will be a hit for a specific
relation. The module pg_buffercache seems to be doing a similar thing.
Also, pg_statio_all_tables seems to be having that information, but it is
upd
I cannot find any information related to other relations in the query other
than the one which is being scanned in the root pointer. Is there any
function call which can be used to get access to it?
On Wed, Dec 21, 2022 at 9:46 AM Tom Lane wrote:
> Amin writes:
> > The goal is to ha
Hi,
In CustomScan cost estimator, where PlannerInfo and RelOptInfo are passed,
I want to get access to the relation stats (for example pg_stat_all_tables)
by calling pg_stat_fetch_stat_tabentry(). However, I don't have access to
relid to pass to this function. For a sample relation, when I hardcod
Hi,
The goal is to have access to all the tables that are being scanned or will
be scanned as a part of the query. Basically, the callback looks like this:
typedef void (*set_rel_pathlist_hook_type) (PlannerInfo *root,
RelOptInfo *rel,
Hi All,
I am trying to create HeapTuple data structure.
First, I create a tuple descriptor:
TupleDesc *td=CreateTemplateTupleDesc(colCount);
Then, for each variable, I do:
TupleDescInitEntry(*td,v->varattno,NULL,v->vartype,v->vartypmod,0);
Then, I assign values:
if int32: values[v
Hi,
Having a query, I am trying to find out all the columns that need to be
accessed (their varattno and vartype). I have access to a targetlist
representing a tree like this. So, I am looking for a function that
recursively traverses the tree and gives me the VARs. So, for SELECT
a,b,b+c from tab
15 matches
Mail list logo